Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- data/miniconda3/include/curl/curl.h +0 -0
- data/miniconda3/include/curl/curlver.h +78 -0
- data/miniconda3/include/curl/easy.h +125 -0
- data/miniconda3/include/curl/header.h +74 -0
- data/miniconda3/include/curl/mprintf.h +85 -0
- data/miniconda3/include/curl/multi.h +525 -0
- data/miniconda3/include/curl/options.h +70 -0
- data/miniconda3/include/curl/stdcheaders.h +35 -0
- data/miniconda3/include/curl/system.h +408 -0
- data/miniconda3/include/curl/typecheck-gcc.h +947 -0
- data/miniconda3/include/curl/urlapi.h +155 -0
- data/miniconda3/include/curl/websockets.h +98 -0
- data/miniconda3/include/ncursesw/curses.h +0 -0
- data/miniconda3/include/ncursesw/cursesapp.h +191 -0
- data/miniconda3/include/ncursesw/cursesf.h +968 -0
- data/miniconda3/include/ncursesw/cursesm.h +674 -0
- data/miniconda3/include/ncursesw/cursesp.h +271 -0
- data/miniconda3/include/ncursesw/cursesw.h +1581 -0
- data/miniconda3/include/ncursesw/cursslk.h +240 -0
- data/miniconda3/include/ncursesw/eti.h +55 -0
- data/miniconda3/include/ncursesw/etip.h +406 -0
- data/miniconda3/include/ncursesw/form.h +460 -0
- data/miniconda3/include/ncursesw/menu.h +281 -0
- data/miniconda3/include/ncursesw/ncurses.h +0 -0
- data/miniconda3/include/ncursesw/ncurses_dll.h +103 -0
- data/miniconda3/include/ncursesw/panel.h +100 -0
- data/miniconda3/include/ncursesw/term.h +890 -0
- data/miniconda3/include/ncursesw/term_entry.h +220 -0
- data/miniconda3/include/ncursesw/termcap.h +73 -0
- data/miniconda3/include/ncursesw/unctrl.h +68 -0
- data/miniconda3/include/openssl/aes.h +109 -0
- data/miniconda3/include/openssl/async.h +102 -0
- data/miniconda3/include/openssl/bio.h +1028 -0
- data/miniconda3/include/openssl/bioerr.h +70 -0
- data/miniconda3/include/openssl/blowfish.h +78 -0
- data/miniconda3/include/openssl/buffer.h +60 -0
- data/miniconda3/include/openssl/buffererr.h +23 -0
- data/miniconda3/include/openssl/byteorder.h +339 -0
- data/miniconda3/include/openssl/camellia.h +117 -0
- data/miniconda3/include/openssl/cast.h +71 -0
- data/miniconda3/include/openssl/cmp_util.h +56 -0
- data/miniconda3/include/openssl/cms.h +524 -0
- data/miniconda3/include/openssl/cmserr.h +128 -0
- data/miniconda3/include/openssl/comp.h +101 -0
- data/miniconda3/include/openssl/conf.h +219 -0
- data/miniconda3/include/openssl/conf_api.h +46 -0
- data/miniconda3/include/openssl/conferr.h +50 -0
- data/miniconda3/include/openssl/configuration.h +208 -0
- data/miniconda3/include/openssl/core_dispatch.h +1061 -0
- data/miniconda3/include/openssl/core_object.h +41 -0
data/miniconda3/include/curl/curl.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/miniconda3/include/curl/curlver.h
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_CURLVER_H
|
| 2 |
+
#define CURLINC_CURLVER_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
/* This header file contains nothing but libcurl version info, generated by
|
| 28 |
+
a script at release-time. This was made its own header file in 7.11.2 */
|
| 29 |
+
|
| 30 |
+
/* This is the global package copyright */
|
| 31 |
+
#define LIBCURL_COPYRIGHT "Daniel Stenberg, <daniel@haxx.se>."
|
| 32 |
+
|
| 33 |
+
/* This is the version number of the libcurl package from which this header
|
| 34 |
+
file origins: */
|
| 35 |
+
#define LIBCURL_VERSION "8.16.0"
|
| 36 |
+
|
| 37 |
+
/* The numeric version number is also available "in parts" by using these
|
| 38 |
+
defines: */
|
| 39 |
+
#define LIBCURL_VERSION_MAJOR 8
|
| 40 |
+
#define LIBCURL_VERSION_MINOR 16
|
| 41 |
+
#define LIBCURL_VERSION_PATCH 0
|
| 42 |
+
/* This is the numeric version of the libcurl version number, meant for easier
|
| 43 |
+
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
|
| 44 |
+
always follow this syntax:
|
| 45 |
+
|
| 46 |
+
0xXXYYZZ
|
| 47 |
+
|
| 48 |
+
Where XX, YY and ZZ are the main version, release and patch numbers in
|
| 49 |
+
hexadecimal (using 8 bits each). All three numbers are always represented
|
| 50 |
+
using two digits. 1.2 would appear as "0x010200" while version 9.11.7
|
| 51 |
+
appears as "0x090b07".
|
| 52 |
+
|
| 53 |
+
This 6-digit (24 bits) hexadecimal number does not show pre-release number,
|
| 54 |
+
and it is always a greater number in a more recent release. It makes
|
| 55 |
+
comparisons with greater than and less than work.
|
| 56 |
+
|
| 57 |
+
Note: This define is the full hex number and _does not_ use the
|
| 58 |
+
CURL_VERSION_BITS() macro since curl's own configure script greps for it
|
| 59 |
+
and needs it to contain the full number.
|
| 60 |
+
*/
|
| 61 |
+
#define LIBCURL_VERSION_NUM 0x081000
|
| 62 |
+
|
| 63 |
+
/*
|
| 64 |
+
* This is the date and time when the full source package was created. The
|
| 65 |
+
* timestamp is not stored in git, as the timestamp is properly set in the
|
| 66 |
+
* tarballs by the maketgz script.
|
| 67 |
+
*
|
| 68 |
+
* The format of the date follows this template:
|
| 69 |
+
*
|
| 70 |
+
* "2007-11-23"
|
| 71 |
+
*/
|
| 72 |
+
#define LIBCURL_TIMESTAMP "2025-09-10"
|
| 73 |
+
|
| 74 |
+
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
|
| 75 |
+
#define CURL_AT_LEAST_VERSION(x,y,z) \
|
| 76 |
+
(LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
|
| 77 |
+
|
| 78 |
+
#endif /* CURLINC_CURLVER_H */
|
data/miniconda3/include/curl/easy.h
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_EASY_H
|
| 2 |
+
#define CURLINC_EASY_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
#ifdef __cplusplus
|
| 27 |
+
extern "C" {
|
| 28 |
+
#endif
|
| 29 |
+
|
| 30 |
+
/* Flag bits in the curl_blob struct: */
|
| 31 |
+
#define CURL_BLOB_COPY 1 /* tell libcurl to copy the data */
|
| 32 |
+
#define CURL_BLOB_NOCOPY 0 /* tell libcurl to NOT copy the data */
|
| 33 |
+
|
| 34 |
+
struct curl_blob {
|
| 35 |
+
void *data;
|
| 36 |
+
size_t len;
|
| 37 |
+
unsigned int flags; /* bit 0 is defined, the rest are reserved and should be
|
| 38 |
+
left zeroes */
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
CURL_EXTERN CURL *curl_easy_init(void);
|
| 42 |
+
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
|
| 43 |
+
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
|
| 44 |
+
CURL_EXTERN void curl_easy_cleanup(CURL *curl);
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* NAME curl_easy_getinfo()
|
| 48 |
+
*
|
| 49 |
+
* DESCRIPTION
|
| 50 |
+
*
|
| 51 |
+
* Request internal information from the curl session with this function.
|
| 52 |
+
* The third argument MUST be pointing to the specific type of the used option
|
| 53 |
+
* which is documented in each manpage of the option. The data pointed to
|
| 54 |
+
* will be filled in accordingly and can be relied upon only if the function
|
| 55 |
+
* returns CURLE_OK. This function is intended to get used *AFTER* a performed
|
| 56 |
+
* transfer, all results from this function are undefined until the transfer
|
| 57 |
+
* is completed.
|
| 58 |
+
*/
|
| 59 |
+
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
/*
|
| 63 |
+
* NAME curl_easy_duphandle()
|
| 64 |
+
*
|
| 65 |
+
* DESCRIPTION
|
| 66 |
+
*
|
| 67 |
+
* Creates a new curl session handle with the same options set for the handle
|
| 68 |
+
* passed in. Duplicating a handle could only be a matter of cloning data and
|
| 69 |
+
* options, internal state info and things like persistent connections cannot
|
| 70 |
+
* be transferred. It is useful in multithreaded applications when you can run
|
| 71 |
+
* curl_easy_duphandle() for each new thread to avoid a series of identical
|
| 72 |
+
* curl_easy_setopt() invokes in every thread.
|
| 73 |
+
*/
|
| 74 |
+
CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl);
|
| 75 |
+
|
| 76 |
+
/*
|
| 77 |
+
* NAME curl_easy_reset()
|
| 78 |
+
*
|
| 79 |
+
* DESCRIPTION
|
| 80 |
+
*
|
| 81 |
+
* Re-initializes a curl handle to the default values. This puts back the
|
| 82 |
+
* handle to the same state as it was in when it was just created.
|
| 83 |
+
*
|
| 84 |
+
* It does keep: live connections, the Session ID cache, the DNS cache and the
|
| 85 |
+
* cookies.
|
| 86 |
+
*/
|
| 87 |
+
CURL_EXTERN void curl_easy_reset(CURL *curl);
|
| 88 |
+
|
| 89 |
+
/*
|
| 90 |
+
* NAME curl_easy_recv()
|
| 91 |
+
*
|
| 92 |
+
* DESCRIPTION
|
| 93 |
+
*
|
| 94 |
+
* Receives data from the connected socket. Use after successful
|
| 95 |
+
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
| 96 |
+
*/
|
| 97 |
+
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
|
| 98 |
+
size_t *n);
|
| 99 |
+
|
| 100 |
+
/*
|
| 101 |
+
* NAME curl_easy_send()
|
| 102 |
+
*
|
| 103 |
+
* DESCRIPTION
|
| 104 |
+
*
|
| 105 |
+
* Sends data over the connected socket. Use after successful
|
| 106 |
+
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
| 107 |
+
*/
|
| 108 |
+
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
|
| 109 |
+
size_t buflen, size_t *n);
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
/*
|
| 113 |
+
* NAME curl_easy_upkeep()
|
| 114 |
+
*
|
| 115 |
+
* DESCRIPTION
|
| 116 |
+
*
|
| 117 |
+
* Performs connection upkeep for the given session handle.
|
| 118 |
+
*/
|
| 119 |
+
CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl);
|
| 120 |
+
|
| 121 |
+
#ifdef __cplusplus
|
| 122 |
+
} /* end of extern "C" */
|
| 123 |
+
#endif
|
| 124 |
+
|
| 125 |
+
#endif
|
data/miniconda3/include/curl/header.h
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_HEADER_H
|
| 2 |
+
#define CURLINC_HEADER_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
struct curl_header {
|
| 32 |
+
char *name; /* this might not use the same case */
|
| 33 |
+
char *value;
|
| 34 |
+
size_t amount; /* number of headers using this name */
|
| 35 |
+
size_t index; /* ... of this instance, 0 or higher */
|
| 36 |
+
unsigned int origin; /* see bits below */
|
| 37 |
+
void *anchor; /* handle privately used by libcurl */
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
/* 'origin' bits */
|
| 41 |
+
#define CURLH_HEADER (1<<0) /* plain server header */
|
| 42 |
+
#define CURLH_TRAILER (1<<1) /* trailers */
|
| 43 |
+
#define CURLH_CONNECT (1<<2) /* CONNECT headers */
|
| 44 |
+
#define CURLH_1XX (1<<3) /* 1xx headers */
|
| 45 |
+
#define CURLH_PSEUDO (1<<4) /* pseudo headers */
|
| 46 |
+
|
| 47 |
+
typedef enum {
|
| 48 |
+
CURLHE_OK,
|
| 49 |
+
CURLHE_BADINDEX, /* header exists but not with this index */
|
| 50 |
+
CURLHE_MISSING, /* no such header exists */
|
| 51 |
+
CURLHE_NOHEADERS, /* no headers at all exist (yet) */
|
| 52 |
+
CURLHE_NOREQUEST, /* no request with this number was used */
|
| 53 |
+
CURLHE_OUT_OF_MEMORY, /* out of memory while processing */
|
| 54 |
+
CURLHE_BAD_ARGUMENT, /* a function argument was not okay */
|
| 55 |
+
CURLHE_NOT_BUILT_IN /* if API was disabled in the build */
|
| 56 |
+
} CURLHcode;
|
| 57 |
+
|
| 58 |
+
CURL_EXTERN CURLHcode curl_easy_header(CURL *easy,
|
| 59 |
+
const char *name,
|
| 60 |
+
size_t index,
|
| 61 |
+
unsigned int origin,
|
| 62 |
+
int request,
|
| 63 |
+
struct curl_header **hout);
|
| 64 |
+
|
| 65 |
+
CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy,
|
| 66 |
+
unsigned int origin,
|
| 67 |
+
int request,
|
| 68 |
+
struct curl_header *prev);
|
| 69 |
+
|
| 70 |
+
#ifdef __cplusplus
|
| 71 |
+
} /* end of extern "C" */
|
| 72 |
+
#endif
|
| 73 |
+
|
| 74 |
+
#endif /* CURLINC_HEADER_H */
|
data/miniconda3/include/curl/mprintf.h
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_MPRINTF_H
|
| 2 |
+
#define CURLINC_MPRINTF_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#include <stdarg.h>
|
| 28 |
+
#include <stdio.h> /* needed for FILE */
|
| 29 |
+
#include "curl.h" /* for CURL_EXTERN */
|
| 30 |
+
|
| 31 |
+
#ifdef __cplusplus
|
| 32 |
+
extern "C" {
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
#ifndef CURL_TEMP_PRINTF
|
| 36 |
+
#if (defined(__GNUC__) || defined(__clang__) || \
|
| 37 |
+
defined(__IAR_SYSTEMS_ICC__)) && \
|
| 38 |
+
defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
|
| 39 |
+
!defined(CURL_NO_FMT_CHECKS)
|
| 40 |
+
#if defined(__MINGW32__) && !defined(__clang__)
|
| 41 |
+
#ifdef __MINGW_PRINTF_FORMAT /* mingw-w64 3.0.0+. Needs stdio.h. */
|
| 42 |
+
#define CURL_TEMP_PRINTF(fmt, arg) \
|
| 43 |
+
__attribute__((format(__MINGW_PRINTF_FORMAT, fmt, arg)))
|
| 44 |
+
#else
|
| 45 |
+
#define CURL_TEMP_PRINTF(fmt, arg)
|
| 46 |
+
#endif
|
| 47 |
+
#else
|
| 48 |
+
#define CURL_TEMP_PRINTF(fmt, arg) \
|
| 49 |
+
__attribute__((format(printf, fmt, arg)))
|
| 50 |
+
#endif
|
| 51 |
+
#else
|
| 52 |
+
#define CURL_TEMP_PRINTF(fmt, arg)
|
| 53 |
+
#endif
|
| 54 |
+
#endif
|
| 55 |
+
|
| 56 |
+
CURL_EXTERN int curl_mprintf(const char *format, ...)
|
| 57 |
+
CURL_TEMP_PRINTF(1, 2);
|
| 58 |
+
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...)
|
| 59 |
+
CURL_TEMP_PRINTF(2, 3);
|
| 60 |
+
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...)
|
| 61 |
+
CURL_TEMP_PRINTF(2, 3);
|
| 62 |
+
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
|
| 63 |
+
const char *format, ...)
|
| 64 |
+
CURL_TEMP_PRINTF(3, 4);
|
| 65 |
+
CURL_EXTERN int curl_mvprintf(const char *format, va_list args)
|
| 66 |
+
CURL_TEMP_PRINTF(1, 0);
|
| 67 |
+
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args)
|
| 68 |
+
CURL_TEMP_PRINTF(2, 0);
|
| 69 |
+
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args)
|
| 70 |
+
CURL_TEMP_PRINTF(2, 0);
|
| 71 |
+
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
|
| 72 |
+
const char *format, va_list args)
|
| 73 |
+
CURL_TEMP_PRINTF(3, 0);
|
| 74 |
+
CURL_EXTERN char *curl_maprintf(const char *format, ...)
|
| 75 |
+
CURL_TEMP_PRINTF(1, 2);
|
| 76 |
+
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args)
|
| 77 |
+
CURL_TEMP_PRINTF(1, 0);
|
| 78 |
+
|
| 79 |
+
#undef CURL_TEMP_PRINTF
|
| 80 |
+
|
| 81 |
+
#ifdef __cplusplus
|
| 82 |
+
} /* end of extern "C" */
|
| 83 |
+
#endif
|
| 84 |
+
|
| 85 |
+
#endif /* CURLINC_MPRINTF_H */
|
data/miniconda3/include/curl/multi.h
ADDED
|
@@ -0,0 +1,525 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_MULTI_H
|
| 2 |
+
#define CURLINC_MULTI_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
/*
|
| 27 |
+
This is an "external" header file. Do not give away any internals here!
|
| 28 |
+
|
| 29 |
+
GOALS
|
| 30 |
+
|
| 31 |
+
o Enable a "pull" interface. The application that uses libcurl decides where
|
| 32 |
+
and when to ask libcurl to get/send data.
|
| 33 |
+
|
| 34 |
+
o Enable multiple simultaneous transfers in the same thread without making it
|
| 35 |
+
complicated for the application.
|
| 36 |
+
|
| 37 |
+
o Enable the application to select() on its own file descriptors and curl's
|
| 38 |
+
file descriptors simultaneous easily.
|
| 39 |
+
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
/*
|
| 43 |
+
* This header file should not really need to include "curl.h" since curl.h
|
| 44 |
+
* itself includes this file and we expect user applications to do #include
|
| 45 |
+
* <curl/curl.h> without the need for especially including multi.h.
|
| 46 |
+
*
|
| 47 |
+
* For some reason we added this include here at one point, and rather than to
|
| 48 |
+
* break existing (wrongly written) libcurl applications, we leave it as-is
|
| 49 |
+
* but with this warning attached.
|
| 50 |
+
*/
|
| 51 |
+
#include "curl.h"
|
| 52 |
+
|
| 53 |
+
#ifdef __cplusplus
|
| 54 |
+
extern "C" {
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
typedef void CURLM;
|
| 58 |
+
|
| 59 |
+
typedef enum {
|
| 60 |
+
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
|
| 61 |
+
curl_multi_socket*() soon */
|
| 62 |
+
CURLM_OK,
|
| 63 |
+
CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
|
| 64 |
+
CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
|
| 65 |
+
CURLM_OUT_OF_MEMORY, /* if you ever get this, you are in deep sh*t */
|
| 66 |
+
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
|
| 67 |
+
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
|
| 68 |
+
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
|
| 69 |
+
CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
|
| 70 |
+
attempted to get added - again */
|
| 71 |
+
CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a
|
| 72 |
+
callback */
|
| 73 |
+
CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */
|
| 74 |
+
CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */
|
| 75 |
+
CURLM_ABORTED_BY_CALLBACK,
|
| 76 |
+
CURLM_UNRECOVERABLE_POLL,
|
| 77 |
+
CURLM_LAST
|
| 78 |
+
} CURLMcode;
|
| 79 |
+
|
| 80 |
+
/* just to make code nicer when using curl_multi_socket() you can now check
|
| 81 |
+
for CURLM_CALL_MULTI_SOCKET too in the same style it works for
|
| 82 |
+
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
|
| 83 |
+
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
|
| 84 |
+
|
| 85 |
+
/* bitmask bits for CURLMOPT_PIPELINING */
|
| 86 |
+
#define CURLPIPE_NOTHING 0L
|
| 87 |
+
#define CURLPIPE_HTTP1 1L
|
| 88 |
+
#define CURLPIPE_MULTIPLEX 2L
|
| 89 |
+
|
| 90 |
+
typedef enum {
|
| 91 |
+
CURLMSG_NONE, /* first, not used */
|
| 92 |
+
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
|
| 93 |
+
the CURLcode of the transfer */
|
| 94 |
+
CURLMSG_LAST /* last, not used */
|
| 95 |
+
} CURLMSG;
|
| 96 |
+
|
| 97 |
+
struct CURLMsg {
|
| 98 |
+
CURLMSG msg; /* what this message means */
|
| 99 |
+
CURL *easy_handle; /* the handle it concerns */
|
| 100 |
+
union {
|
| 101 |
+
void *whatever; /* message-specific data */
|
| 102 |
+
CURLcode result; /* return code for transfer */
|
| 103 |
+
} data;
|
| 104 |
+
};
|
| 105 |
+
typedef struct CURLMsg CURLMsg;
|
| 106 |
+
|
| 107 |
+
/* Based on poll(2) structure and values.
|
| 108 |
+
* We do not use pollfd and POLL* constants explicitly
|
| 109 |
+
* to cover platforms without poll(). */
|
| 110 |
+
#define CURL_WAIT_POLLIN 0x0001
|
| 111 |
+
#define CURL_WAIT_POLLPRI 0x0002
|
| 112 |
+
#define CURL_WAIT_POLLOUT 0x0004
|
| 113 |
+
|
| 114 |
+
struct curl_waitfd {
|
| 115 |
+
curl_socket_t fd;
|
| 116 |
+
short events;
|
| 117 |
+
short revents;
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
/*
|
| 121 |
+
* Name: curl_multi_init()
|
| 122 |
+
*
|
| 123 |
+
* Desc: initialize multi-style curl usage
|
| 124 |
+
*
|
| 125 |
+
* Returns: a new CURLM handle to use in all 'curl_multi' functions.
|
| 126 |
+
*/
|
| 127 |
+
CURL_EXTERN CURLM *curl_multi_init(void);
|
| 128 |
+
|
| 129 |
+
/*
|
| 130 |
+
* Name: curl_multi_add_handle()
|
| 131 |
+
*
|
| 132 |
+
* Desc: add a standard curl handle to the multi stack
|
| 133 |
+
*
|
| 134 |
+
* Returns: CURLMcode type, general multi error code.
|
| 135 |
+
*/
|
| 136 |
+
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
| 137 |
+
CURL *curl_handle);
|
| 138 |
+
|
| 139 |
+
/*
|
| 140 |
+
* Name: curl_multi_remove_handle()
|
| 141 |
+
*
|
| 142 |
+
* Desc: removes a curl handle from the multi stack again
|
| 143 |
+
*
|
| 144 |
+
* Returns: CURLMcode type, general multi error code.
|
| 145 |
+
*/
|
| 146 |
+
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
| 147 |
+
CURL *curl_handle);
|
| 148 |
+
|
| 149 |
+
/*
|
| 150 |
+
* Name: curl_multi_fdset()
|
| 151 |
+
*
|
| 152 |
+
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
|
| 153 |
+
* poll() on. We want curl_multi_perform() called as soon as one of
|
| 154 |
+
* them are ready.
|
| 155 |
+
*
|
| 156 |
+
* Returns: CURLMcode type, general multi error code.
|
| 157 |
+
*/
|
| 158 |
+
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
| 159 |
+
fd_set *read_fd_set,
|
| 160 |
+
fd_set *write_fd_set,
|
| 161 |
+
fd_set *exc_fd_set,
|
| 162 |
+
int *max_fd);
|
| 163 |
+
|
| 164 |
+
/*
|
| 165 |
+
* Name: curl_multi_wait()
|
| 166 |
+
*
|
| 167 |
+
* Desc: Poll on all fds within a CURLM set as well as any
|
| 168 |
+
* additional fds passed to the function.
|
| 169 |
+
*
|
| 170 |
+
* Returns: CURLMcode type, general multi error code.
|
| 171 |
+
*/
|
| 172 |
+
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
|
| 173 |
+
struct curl_waitfd extra_fds[],
|
| 174 |
+
unsigned int extra_nfds,
|
| 175 |
+
int timeout_ms,
|
| 176 |
+
int *ret);
|
| 177 |
+
|
| 178 |
+
/*
|
| 179 |
+
* Name: curl_multi_poll()
|
| 180 |
+
*
|
| 181 |
+
* Desc: Poll on all fds within a CURLM set as well as any
|
| 182 |
+
* additional fds passed to the function.
|
| 183 |
+
*
|
| 184 |
+
* Returns: CURLMcode type, general multi error code.
|
| 185 |
+
*/
|
| 186 |
+
CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
|
| 187 |
+
struct curl_waitfd extra_fds[],
|
| 188 |
+
unsigned int extra_nfds,
|
| 189 |
+
int timeout_ms,
|
| 190 |
+
int *ret);
|
| 191 |
+
|
| 192 |
+
/*
|
| 193 |
+
* Name: curl_multi_wakeup()
|
| 194 |
+
*
|
| 195 |
+
* Desc: wakes up a sleeping curl_multi_poll call.
|
| 196 |
+
*
|
| 197 |
+
* Returns: CURLMcode type, general multi error code.
|
| 198 |
+
*/
|
| 199 |
+
CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle);
|
| 200 |
+
|
| 201 |
+
/*
|
| 202 |
+
* Name: curl_multi_perform()
|
| 203 |
+
*
|
| 204 |
+
* Desc: When the app thinks there is data available for curl it calls this
|
| 205 |
+
* function to read/write whatever there is right now. This returns
|
| 206 |
+
* as soon as the reads and writes are done. This function does not
|
| 207 |
+
* require that there actually is data available for reading or that
|
| 208 |
+
* data can be written, it can be called just in case. It returns
|
| 209 |
+
* the number of handles that still transfer data in the second
|
| 210 |
+
* argument's integer-pointer.
|
| 211 |
+
*
|
| 212 |
+
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
|
| 213 |
+
* returns errors etc regarding the whole multi stack. There might
|
| 214 |
+
* still have occurred problems on individual transfers even when
|
| 215 |
+
* this returns OK.
|
| 216 |
+
*/
|
| 217 |
+
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
|
| 218 |
+
int *running_handles);
|
| 219 |
+
|
| 220 |
+
/*
|
| 221 |
+
* Name: curl_multi_cleanup()
|
| 222 |
+
*
|
| 223 |
+
* Desc: Cleans up and removes a whole multi stack. It does not free or
|
| 224 |
+
* touch any individual easy handles in any way. We need to define
|
| 225 |
+
* in what state those handles will be if this function is called
|
| 226 |
+
* in the middle of a transfer.
|
| 227 |
+
*
|
| 228 |
+
* Returns: CURLMcode type, general multi error code.
|
| 229 |
+
*/
|
| 230 |
+
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
| 231 |
+
|
| 232 |
+
/*
|
| 233 |
+
* Name: curl_multi_info_read()
|
| 234 |
+
*
|
| 235 |
+
* Desc: Ask the multi handle if there is any messages/informationals from
|
| 236 |
+
* the individual transfers. Messages include informationals such as
|
| 237 |
+
* error code from the transfer or just the fact that a transfer is
|
| 238 |
+
* completed. More details on these should be written down as well.
|
| 239 |
+
*
|
| 240 |
+
* Repeated calls to this function will return a new struct each
|
| 241 |
+
* time, until a special "end of msgs" struct is returned as a signal
|
| 242 |
+
* that there is no more to get at this point.
|
| 243 |
+
*
|
| 244 |
+
* The data the returned pointer points to will not survive calling
|
| 245 |
+
* curl_multi_cleanup().
|
| 246 |
+
*
|
| 247 |
+
* The 'CURLMsg' struct is meant to be simple and only contain basic
|
| 248 |
+
* information. If more involved information is wanted, we will
|
| 249 |
+
* provide the particular "transfer handle" in that struct and that
|
| 250 |
+
* should/could/would be used in subsequent curl_easy_getinfo() calls
|
| 251 |
+
* (or similar). The point being that we must never expose complex
|
| 252 |
+
* structs to applications, as then we will undoubtably get backwards
|
| 253 |
+
* compatibility problems in the future.
|
| 254 |
+
*
|
| 255 |
+
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
|
| 256 |
+
* of structs. It also writes the number of messages left in the
|
| 257 |
+
* queue (after this read) in the integer the second argument points
|
| 258 |
+
* to.
|
| 259 |
+
*/
|
| 260 |
+
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
| 261 |
+
int *msgs_in_queue);
|
| 262 |
+
|
| 263 |
+
/*
|
| 264 |
+
* Name: curl_multi_strerror()
|
| 265 |
+
*
|
| 266 |
+
* Desc: The curl_multi_strerror function may be used to turn a CURLMcode
|
| 267 |
+
* value into the equivalent human readable error string. This is
|
| 268 |
+
* useful for printing meaningful error messages.
|
| 269 |
+
*
|
| 270 |
+
* Returns: A pointer to a null-terminated error message.
|
| 271 |
+
*/
|
| 272 |
+
CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* Name: curl_multi_socket() and
|
| 276 |
+
* curl_multi_socket_all()
|
| 277 |
+
*
|
| 278 |
+
* Desc: An alternative version of curl_multi_perform() that allows the
|
| 279 |
+
* application to pass in one of the file descriptors that have been
|
| 280 |
+
* detected to have "action" on them and let libcurl perform.
|
| 281 |
+
* See manpage for details.
|
| 282 |
+
*/
|
| 283 |
+
#define CURL_POLL_NONE 0
|
| 284 |
+
#define CURL_POLL_IN 1
|
| 285 |
+
#define CURL_POLL_OUT 2
|
| 286 |
+
#define CURL_POLL_INOUT 3
|
| 287 |
+
#define CURL_POLL_REMOVE 4
|
| 288 |
+
|
| 289 |
+
#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
|
| 290 |
+
|
| 291 |
+
#define CURL_CSELECT_IN 0x01
|
| 292 |
+
#define CURL_CSELECT_OUT 0x02
|
| 293 |
+
#define CURL_CSELECT_ERR 0x04
|
| 294 |
+
|
| 295 |
+
typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
|
| 296 |
+
curl_socket_t s, /* socket */
|
| 297 |
+
int what, /* see above */
|
| 298 |
+
void *userp, /* private callback
|
| 299 |
+
pointer */
|
| 300 |
+
void *socketp); /* private socket
|
| 301 |
+
pointer */
|
| 302 |
+
/*
|
| 303 |
+
* Name: curl_multi_timer_callback
|
| 304 |
+
*
|
| 305 |
+
* Desc: Called by libcurl whenever the library detects a change in the
|
| 306 |
+
* maximum number of milliseconds the app is allowed to wait before
|
| 307 |
+
* curl_multi_socket() or curl_multi_perform() must be called
|
| 308 |
+
* (to allow libcurl's timed events to take place).
|
| 309 |
+
*
|
| 310 |
+
* Returns: The callback should return zero.
|
| 311 |
+
*/
|
| 312 |
+
typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
|
| 313 |
+
long timeout_ms, /* see above */
|
| 314 |
+
void *userp); /* private callback
|
| 315 |
+
pointer */
|
| 316 |
+
|
| 317 |
+
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
| 318 |
+
curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles);
|
| 319 |
+
|
| 320 |
+
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
|
| 321 |
+
curl_socket_t s,
|
| 322 |
+
int ev_bitmask,
|
| 323 |
+
int *running_handles);
|
| 324 |
+
|
| 325 |
+
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
| 326 |
+
curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
|
| 327 |
+
|
| 328 |
+
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
|
| 329 |
+
/* This macro below was added in 7.16.3 to push users who recompile to use
|
| 330 |
+
the new curl_multi_socket_action() instead of the old curl_multi_socket()
|
| 331 |
+
*/
|
| 332 |
+
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
|
| 333 |
+
#endif
|
| 334 |
+
|
| 335 |
+
/*
|
| 336 |
+
* Name: curl_multi_timeout()
|
| 337 |
+
*
|
| 338 |
+
* Desc: Returns the maximum number of milliseconds the app is allowed to
|
| 339 |
+
* wait before curl_multi_socket() or curl_multi_perform() must be
|
| 340 |
+
* called (to allow libcurl's timed events to take place).
|
| 341 |
+
*
|
| 342 |
+
* Returns: CURLM error code.
|
| 343 |
+
*/
|
| 344 |
+
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
|
| 345 |
+
long *milliseconds);
|
| 346 |
+
|
| 347 |
+
typedef enum {
|
| 348 |
+
/* This is the socket callback function pointer */
|
| 349 |
+
CURLOPT(CURLMOPT_SOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 1),
|
| 350 |
+
|
| 351 |
+
/* This is the argument passed to the socket callback */
|
| 352 |
+
CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2),
|
| 353 |
+
|
| 354 |
+
/* set to 1 to enable pipelining for this multi handle */
|
| 355 |
+
CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3),
|
| 356 |
+
|
| 357 |
+
/* This is the timer callback function pointer */
|
| 358 |
+
CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4),
|
| 359 |
+
|
| 360 |
+
/* This is the argument passed to the timer callback */
|
| 361 |
+
CURLOPT(CURLMOPT_TIMERDATA, CURLOPTTYPE_OBJECTPOINT, 5),
|
| 362 |
+
|
| 363 |
+
/* maximum number of entries in the connection cache */
|
| 364 |
+
CURLOPT(CURLMOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 6),
|
| 365 |
+
|
| 366 |
+
/* maximum number of (pipelining) connections to one host */
|
| 367 |
+
CURLOPT(CURLMOPT_MAX_HOST_CONNECTIONS, CURLOPTTYPE_LONG, 7),
|
| 368 |
+
|
| 369 |
+
/* maximum number of requests in a pipeline */
|
| 370 |
+
CURLOPT(CURLMOPT_MAX_PIPELINE_LENGTH, CURLOPTTYPE_LONG, 8),
|
| 371 |
+
|
| 372 |
+
/* a connection with a content-length longer than this
|
| 373 |
+
will not be considered for pipelining */
|
| 374 |
+
CURLOPT(CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 9),
|
| 375 |
+
|
| 376 |
+
/* a connection with a chunk length longer than this
|
| 377 |
+
will not be considered for pipelining */
|
| 378 |
+
CURLOPT(CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, CURLOPTTYPE_OFF_T, 10),
|
| 379 |
+
|
| 380 |
+
/* a list of site names(+port) that are blocked from pipelining */
|
| 381 |
+
CURLOPT(CURLMOPT_PIPELINING_SITE_BL, CURLOPTTYPE_OBJECTPOINT, 11),
|
| 382 |
+
|
| 383 |
+
/* a list of server types that are blocked from pipelining */
|
| 384 |
+
CURLOPT(CURLMOPT_PIPELINING_SERVER_BL, CURLOPTTYPE_OBJECTPOINT, 12),
|
| 385 |
+
|
| 386 |
+
/* maximum number of open connections in total */
|
| 387 |
+
CURLOPT(CURLMOPT_MAX_TOTAL_CONNECTIONS, CURLOPTTYPE_LONG, 13),
|
| 388 |
+
|
| 389 |
+
/* This is the server push callback function pointer */
|
| 390 |
+
CURLOPT(CURLMOPT_PUSHFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 14),
|
| 391 |
+
|
| 392 |
+
/* This is the argument passed to the server push callback */
|
| 393 |
+
CURLOPT(CURLMOPT_PUSHDATA, CURLOPTTYPE_OBJECTPOINT, 15),
|
| 394 |
+
|
| 395 |
+
/* maximum number of concurrent streams to support on a connection */
|
| 396 |
+
CURLOPT(CURLMOPT_MAX_CONCURRENT_STREAMS, CURLOPTTYPE_LONG, 16),
|
| 397 |
+
|
| 398 |
+
/* network has changed, adjust caches/connection reuse */
|
| 399 |
+
CURLOPT(CURLMOPT_NETWORK_CHANGED, CURLOPTTYPE_LONG, 17),
|
| 400 |
+
|
| 401 |
+
CURLMOPT_LASTENTRY /* the last unused */
|
| 402 |
+
} CURLMoption;
|
| 403 |
+
|
| 404 |
+
/* Definition of bits for the CURLMOPT_NETWORK_CHANGED argument: */
|
| 405 |
+
|
| 406 |
+
/* - CURLMNWC_CLEAR_CONNS tells libcurl to prevent further reuse of existing
|
| 407 |
+
connections. Connections that are idle will be closed. Ongoing transfers
|
| 408 |
+
will continue with the connection they have. */
|
| 409 |
+
#define CURLMNWC_CLEAR_CONNS (1L<<0)
|
| 410 |
+
|
| 411 |
+
/* - CURLMNWC_CLEAR_DNS tells libcurl to prevent further reuse of existing
|
| 412 |
+
connections. Connections that are idle will be closed. Ongoing transfers
|
| 413 |
+
will continue with the connection they have. */
|
| 414 |
+
#define CURLMNWC_CLEAR_DNS (1L<<0)
|
| 415 |
+
|
| 416 |
+
/*
|
| 417 |
+
* Name: curl_multi_setopt()
|
| 418 |
+
*
|
| 419 |
+
* Desc: Sets options for the multi handle.
|
| 420 |
+
*
|
| 421 |
+
* Returns: CURLM error code.
|
| 422 |
+
*/
|
| 423 |
+
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
|
| 424 |
+
CURLMoption option, ...);
|
| 425 |
+
|
| 426 |
+
|
| 427 |
+
/*
|
| 428 |
+
* Name: curl_multi_assign()
|
| 429 |
+
*
|
| 430 |
+
* Desc: This function sets an association in the multi handle between the
|
| 431 |
+
* given socket and a private pointer of the application. This is
|
| 432 |
+
* (only) useful for curl_multi_socket uses.
|
| 433 |
+
*
|
| 434 |
+
* Returns: CURLM error code.
|
| 435 |
+
*/
|
| 436 |
+
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
|
| 437 |
+
curl_socket_t sockfd, void *sockp);
|
| 438 |
+
|
| 439 |
+
/*
|
| 440 |
+
* Name: curl_multi_get_handles()
|
| 441 |
+
*
|
| 442 |
+
* Desc: Returns an allocated array holding all handles currently added to
|
| 443 |
+
* the multi handle. Marks the final entry with a NULL pointer. If
|
| 444 |
+
* there is no easy handle added to the multi handle, this function
|
| 445 |
+
* returns an array with the first entry as a NULL pointer.
|
| 446 |
+
*
|
| 447 |
+
* Returns: NULL on failure, otherwise a CURL **array pointer
|
| 448 |
+
*/
|
| 449 |
+
CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle);
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
typedef enum {
|
| 453 |
+
CURLMINFO_NONE, /* first, never use this */
|
| 454 |
+
/* The number of easy handles currently managed by the multi handle,
|
| 455 |
+
* e.g. have been added but not yet removed. */
|
| 456 |
+
CURLMINFO_XFERS_CURRENT = 1,
|
| 457 |
+
/* The number of easy handles running, e.g. not done and not queueing. */
|
| 458 |
+
CURLMINFO_XFERS_RUNNING = 2,
|
| 459 |
+
/* The number of easy handles waiting to start, e.g. for a connection
|
| 460 |
+
* to become available due to limits on parallelism, max connections
|
| 461 |
+
* or other factors. */
|
| 462 |
+
CURLMINFO_XFERS_PENDING = 3,
|
| 463 |
+
/* The number of easy handles finished, waiting for their results to
|
| 464 |
+
* be read via `curl_multi_info_read()`. */
|
| 465 |
+
CURLMINFO_XFERS_DONE = 4,
|
| 466 |
+
/* The total number of easy handles added to the multi handle, ever. */
|
| 467 |
+
CURLMINFO_XFERS_ADDED = 5
|
| 468 |
+
} CURLMinfo_offt;
|
| 469 |
+
|
| 470 |
+
/*
|
| 471 |
+
* Name: curl_multi_get_offt()
|
| 472 |
+
*
|
| 473 |
+
* Desc: Retrieves a numeric value for the `CURLMINFO_*` enums.
|
| 474 |
+
*
|
| 475 |
+
* Returns: CULRM_OK or error when value could not be obtained.
|
| 476 |
+
*/
|
| 477 |
+
CURL_EXTERN CURLMcode curl_multi_get_offt(CURLM *multi_handle,
|
| 478 |
+
CURLMinfo_offt info,
|
| 479 |
+
curl_off_t *pvalue);
|
| 480 |
+
|
| 481 |
+
/*
|
| 482 |
+
* Name: curl_push_callback
|
| 483 |
+
*
|
| 484 |
+
* Desc: This callback gets called when a new stream is being pushed by the
|
| 485 |
+
* server. It approves or denies the new stream. It can also decide
|
| 486 |
+
* to completely fail the connection.
|
| 487 |
+
*
|
| 488 |
+
* Returns: CURL_PUSH_OK, CURL_PUSH_DENY or CURL_PUSH_ERROROUT
|
| 489 |
+
*/
|
| 490 |
+
#define CURL_PUSH_OK 0
|
| 491 |
+
#define CURL_PUSH_DENY 1
|
| 492 |
+
#define CURL_PUSH_ERROROUT 2 /* added in 7.72.0 */
|
| 493 |
+
|
| 494 |
+
struct curl_pushheaders; /* forward declaration only */
|
| 495 |
+
|
| 496 |
+
CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
|
| 497 |
+
size_t num);
|
| 498 |
+
CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
|
| 499 |
+
const char *name);
|
| 500 |
+
|
| 501 |
+
typedef int (*curl_push_callback)(CURL *parent,
|
| 502 |
+
CURL *easy,
|
| 503 |
+
size_t num_headers,
|
| 504 |
+
struct curl_pushheaders *headers,
|
| 505 |
+
void *userp);
|
| 506 |
+
|
| 507 |
+
/*
|
| 508 |
+
* Name: curl_multi_waitfds()
|
| 509 |
+
*
|
| 510 |
+
* Desc: Ask curl for fds for polling. The app can use these to poll on.
|
| 511 |
+
* We want curl_multi_perform() called as soon as one of them are
|
| 512 |
+
* ready. Passing zero size allows to get just a number of fds.
|
| 513 |
+
*
|
| 514 |
+
* Returns: CURLMcode type, general multi error code.
|
| 515 |
+
*/
|
| 516 |
+
CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *multi,
|
| 517 |
+
struct curl_waitfd *ufds,
|
| 518 |
+
unsigned int size,
|
| 519 |
+
unsigned int *fd_count);
|
| 520 |
+
|
| 521 |
+
#ifdef __cplusplus
|
| 522 |
+
} /* end of extern "C" */
|
| 523 |
+
#endif
|
| 524 |
+
|
| 525 |
+
#endif
|
data/miniconda3/include/curl/options.h
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_OPTIONS_H
|
| 2 |
+
#define CURLINC_OPTIONS_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
typedef enum {
|
| 32 |
+
CURLOT_LONG, /* long (a range of values) */
|
| 33 |
+
CURLOT_VALUES, /* (a defined set or bitmask) */
|
| 34 |
+
CURLOT_OFF_T, /* curl_off_t (a range of values) */
|
| 35 |
+
CURLOT_OBJECT, /* pointer (void *) */
|
| 36 |
+
CURLOT_STRING, /* (char * to null-terminated buffer) */
|
| 37 |
+
CURLOT_SLIST, /* (struct curl_slist *) */
|
| 38 |
+
CURLOT_CBPTR, /* (void * passed as-is to a callback) */
|
| 39 |
+
CURLOT_BLOB, /* blob (struct curl_blob *) */
|
| 40 |
+
CURLOT_FUNCTION /* function pointer */
|
| 41 |
+
} curl_easytype;
|
| 42 |
+
|
| 43 |
+
/* Flag bits */
|
| 44 |
+
|
| 45 |
+
/* "alias" means it is provided for old programs to remain functional,
|
| 46 |
+
we prefer another name */
|
| 47 |
+
#define CURLOT_FLAG_ALIAS (1<<0)
|
| 48 |
+
|
| 49 |
+
/* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
|
| 50 |
+
to use for curl_easy_setopt() for the given id */
|
| 51 |
+
struct curl_easyoption {
|
| 52 |
+
const char *name;
|
| 53 |
+
CURLoption id;
|
| 54 |
+
curl_easytype type;
|
| 55 |
+
unsigned int flags;
|
| 56 |
+
};
|
| 57 |
+
|
| 58 |
+
CURL_EXTERN const struct curl_easyoption *
|
| 59 |
+
curl_easy_option_by_name(const char *name);
|
| 60 |
+
|
| 61 |
+
CURL_EXTERN const struct curl_easyoption *
|
| 62 |
+
curl_easy_option_by_id(CURLoption id);
|
| 63 |
+
|
| 64 |
+
CURL_EXTERN const struct curl_easyoption *
|
| 65 |
+
curl_easy_option_next(const struct curl_easyoption *prev);
|
| 66 |
+
|
| 67 |
+
#ifdef __cplusplus
|
| 68 |
+
} /* end of extern "C" */
|
| 69 |
+
#endif
|
| 70 |
+
#endif /* CURLINC_OPTIONS_H */
|
data/miniconda3/include/curl/stdcheaders.h
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_STDCHEADERS_H
|
| 2 |
+
#define CURLINC_STDCHEADERS_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#include <sys/types.h>
|
| 28 |
+
|
| 29 |
+
size_t fread(void *, size_t, size_t, FILE *);
|
| 30 |
+
size_t fwrite(const void *, size_t, size_t, FILE *);
|
| 31 |
+
|
| 32 |
+
int strcasecmp(const char *, const char *);
|
| 33 |
+
int strncasecmp(const char *, const char *, size_t);
|
| 34 |
+
|
| 35 |
+
#endif /* CURLINC_STDCHEADERS_H */
|
data/miniconda3/include/curl/system.h
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_SYSTEM_H
|
| 2 |
+
#define CURLINC_SYSTEM_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
/*
|
| 28 |
+
* Try to keep one section per platform, compiler and architecture, otherwise,
|
| 29 |
+
* if an existing section is reused for a different one and later on the
|
| 30 |
+
* original is adjusted, probably the piggybacking one can be adversely
|
| 31 |
+
* changed.
|
| 32 |
+
*
|
| 33 |
+
* In order to differentiate between platforms/compilers/architectures use
|
| 34 |
+
* only compiler built-in predefined preprocessor symbols.
|
| 35 |
+
*
|
| 36 |
+
* curl_off_t
|
| 37 |
+
* ----------
|
| 38 |
+
*
|
| 39 |
+
* For any given platform/compiler curl_off_t MUST be typedef'ed to a 64-bit
|
| 40 |
+
* wide signed integral data type. The width of this data type must remain
|
| 41 |
+
* constant and independent of any possible large file support settings.
|
| 42 |
+
*
|
| 43 |
+
* As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
|
| 44 |
+
* only be violated if off_t is the only 64-bit data type available and the
|
| 45 |
+
* size of off_t is independent of large file support settings. Keep your
|
| 46 |
+
* build on the safe side avoiding an off_t gating. If you have a 64-bit
|
| 47 |
+
* off_t then take for sure that another 64-bit data type exists, dig deeper
|
| 48 |
+
* and you will find it.
|
| 49 |
+
*
|
| 50 |
+
*/
|
| 51 |
+
|
| 52 |
+
#ifdef __DJGPP__
|
| 53 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 54 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 55 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 56 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 57 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 58 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 59 |
+
|
| 60 |
+
#elif defined(__BORLANDC__)
|
| 61 |
+
# define CURL_TYPEOF_CURL_OFF_T __int64
|
| 62 |
+
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
| 63 |
+
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
| 64 |
+
# define CURL_SUFFIX_CURL_OFF_T i64
|
| 65 |
+
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
| 66 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 67 |
+
|
| 68 |
+
#elif defined(__POCC__)
|
| 69 |
+
# ifdef _MSC_VER
|
| 70 |
+
# define CURL_TYPEOF_CURL_OFF_T __int64
|
| 71 |
+
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
| 72 |
+
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
| 73 |
+
# define CURL_SUFFIX_CURL_OFF_T i64
|
| 74 |
+
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
| 75 |
+
# else
|
| 76 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 77 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 78 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 79 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 80 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 81 |
+
# endif
|
| 82 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 83 |
+
|
| 84 |
+
#elif defined(__LCC__)
|
| 85 |
+
# ifdef __MCST__ /* MCST eLbrus Compiler Collection */
|
| 86 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 87 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 88 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 89 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 90 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 91 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 92 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 93 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 94 |
+
# else /* Local (or Little) C Compiler */
|
| 95 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 96 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 97 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 98 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 99 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 100 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 101 |
+
# endif
|
| 102 |
+
|
| 103 |
+
#elif defined(macintosh)
|
| 104 |
+
# include <ConditionalMacros.h>
|
| 105 |
+
# if TYPE_LONGLONG
|
| 106 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 107 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 108 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 109 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 110 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 111 |
+
# else
|
| 112 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 113 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 114 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 115 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 116 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 117 |
+
# endif
|
| 118 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
|
| 119 |
+
|
| 120 |
+
#elif defined(__TANDEM)
|
| 121 |
+
# ifndef __LP64
|
| 122 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 123 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 124 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 125 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 126 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 127 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 128 |
+
# else
|
| 129 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 130 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 131 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 132 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 133 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 134 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
|
| 135 |
+
# endif
|
| 136 |
+
|
| 137 |
+
#elif defined(UNDER_CE)
|
| 138 |
+
# ifdef __MINGW32CE__
|
| 139 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 140 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 141 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 142 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 143 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 144 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 145 |
+
# else
|
| 146 |
+
# define CURL_TYPEOF_CURL_OFF_T __int64
|
| 147 |
+
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
| 148 |
+
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
| 149 |
+
# define CURL_SUFFIX_CURL_OFF_T i64
|
| 150 |
+
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
| 151 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 152 |
+
# endif
|
| 153 |
+
|
| 154 |
+
#elif defined(__MINGW32__)
|
| 155 |
+
# include <inttypes.h>
|
| 156 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 157 |
+
# define CURL_FORMAT_CURL_OFF_T PRId64
|
| 158 |
+
# define CURL_FORMAT_CURL_OFF_TU PRIu64
|
| 159 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 160 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 161 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 162 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 163 |
+
|
| 164 |
+
#elif defined(__VMS)
|
| 165 |
+
# ifdef __VAX
|
| 166 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 167 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 168 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 169 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 170 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 171 |
+
# else
|
| 172 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 173 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 174 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 175 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 176 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 177 |
+
# endif
|
| 178 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
|
| 179 |
+
|
| 180 |
+
#elif defined(__OS400__)
|
| 181 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 182 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 183 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 184 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 185 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 186 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 187 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 188 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 189 |
+
|
| 190 |
+
#elif defined(__MVS__)
|
| 191 |
+
# ifdef _LONG_LONG
|
| 192 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 193 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 194 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 195 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 196 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 197 |
+
# else /* _LP64 and default */
|
| 198 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 199 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 200 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 201 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 202 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 203 |
+
# endif
|
| 204 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 205 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 206 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 207 |
+
|
| 208 |
+
#elif defined(__370__)
|
| 209 |
+
# if defined(__IBMC__) || defined(__IBMCPP__)
|
| 210 |
+
# ifdef _LONG_LONG
|
| 211 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 212 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 213 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 214 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 215 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 216 |
+
# else /* _LP64 and default */
|
| 217 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 218 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 219 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 220 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 221 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 222 |
+
# endif
|
| 223 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 224 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 225 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 226 |
+
# endif
|
| 227 |
+
|
| 228 |
+
#elif defined(TPF)
|
| 229 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 230 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 231 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 232 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 233 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 234 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 235 |
+
|
| 236 |
+
#elif defined(__TINYC__) /* also known as tcc */
|
| 237 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 238 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 239 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 240 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 241 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 242 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 243 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 244 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 245 |
+
|
| 246 |
+
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */
|
| 247 |
+
# if !defined(__LP64) && (defined(__ILP32) || \
|
| 248 |
+
defined(__i386) || \
|
| 249 |
+
defined(__sparcv8) || \
|
| 250 |
+
defined(__sparcv8plus))
|
| 251 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 252 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 253 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 254 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 255 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 256 |
+
# elif defined(__LP64) || \
|
| 257 |
+
defined(__amd64) || defined(__sparcv9)
|
| 258 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 259 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 260 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 261 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 262 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 263 |
+
# endif
|
| 264 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 265 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 266 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 267 |
+
|
| 268 |
+
#elif defined(__xlc__) /* IBM xlc compiler */
|
| 269 |
+
# ifndef _LP64
|
| 270 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 271 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 272 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 273 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 274 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 275 |
+
# else
|
| 276 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 277 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 278 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 279 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 280 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 281 |
+
# endif
|
| 282 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 283 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 284 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 285 |
+
|
| 286 |
+
#elif defined(__hpux) /* HP aCC compiler */
|
| 287 |
+
# ifndef _LP64
|
| 288 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 289 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 290 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 291 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 292 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 293 |
+
# else
|
| 294 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 295 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 296 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 297 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 298 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 299 |
+
# endif
|
| 300 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 301 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 302 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 303 |
+
|
| 304 |
+
/* ===================================== */
|
| 305 |
+
/* KEEP MSVC THE PENULTIMATE ENTRY */
|
| 306 |
+
/* ===================================== */
|
| 307 |
+
|
| 308 |
+
#elif defined(_MSC_VER)
|
| 309 |
+
# if (_MSC_VER >= 1800)
|
| 310 |
+
# include <inttypes.h>
|
| 311 |
+
# define CURL_FORMAT_CURL_OFF_T PRId64
|
| 312 |
+
# define CURL_FORMAT_CURL_OFF_TU PRIu64
|
| 313 |
+
# else
|
| 314 |
+
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
| 315 |
+
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
| 316 |
+
# endif
|
| 317 |
+
# define CURL_TYPEOF_CURL_OFF_T __int64
|
| 318 |
+
# define CURL_SUFFIX_CURL_OFF_T i64
|
| 319 |
+
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
| 320 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 321 |
+
|
| 322 |
+
/* ===================================== */
|
| 323 |
+
/* KEEP GENERIC GCC THE LAST ENTRY */
|
| 324 |
+
/* ===================================== */
|
| 325 |
+
|
| 326 |
+
#elif defined(__GNUC__) && !defined(_SCO_DS)
|
| 327 |
+
# if !defined(__LP64__) && \
|
| 328 |
+
(defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \
|
| 329 |
+
defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \
|
| 330 |
+
defined(__sparc__) || defined(__mips__) || defined(__sh__) || \
|
| 331 |
+
defined(__XTENSA__) || \
|
| 332 |
+
(defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \
|
| 333 |
+
(defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L))
|
| 334 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 335 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 336 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 337 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 338 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 339 |
+
# if (__GNUC__ >= 4) || \
|
| 340 |
+
((__GNUC__ == 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 4))
|
| 341 |
+
# define CURL_POPCOUNT64(x) __builtin_popcountll(x)
|
| 342 |
+
# define CURL_CTZ64(x) __builtin_ctzll(x)
|
| 343 |
+
# endif
|
| 344 |
+
# elif defined(__LP64__) || \
|
| 345 |
+
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \
|
| 346 |
+
defined(__e2k__) || \
|
| 347 |
+
(defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \
|
| 348 |
+
(defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L)
|
| 349 |
+
# define CURL_TYPEOF_CURL_OFF_T long
|
| 350 |
+
# define CURL_FORMAT_CURL_OFF_T "ld"
|
| 351 |
+
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
| 352 |
+
# define CURL_SUFFIX_CURL_OFF_T L
|
| 353 |
+
# define CURL_SUFFIX_CURL_OFF_TU UL
|
| 354 |
+
# if (__GNUC__ >= 4) || \
|
| 355 |
+
((__GNUC__ == 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 4))
|
| 356 |
+
# define CURL_POPCOUNT64(x) __builtin_popcountl(x)
|
| 357 |
+
# define CURL_CTZ64(x) __builtin_ctzl(x)
|
| 358 |
+
# endif
|
| 359 |
+
# endif
|
| 360 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
| 361 |
+
# define CURL_PULL_SYS_TYPES_H 1
|
| 362 |
+
# define CURL_PULL_SYS_SOCKET_H 1
|
| 363 |
+
|
| 364 |
+
#else
|
| 365 |
+
/* generic "safe guess" on old 32-bit style */
|
| 366 |
+
# define CURL_TYPEOF_CURL_OFF_T long long
|
| 367 |
+
# define CURL_FORMAT_CURL_OFF_T "lld"
|
| 368 |
+
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
| 369 |
+
# define CURL_SUFFIX_CURL_OFF_T LL
|
| 370 |
+
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
| 371 |
+
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
| 372 |
+
#endif
|
| 373 |
+
|
| 374 |
+
#ifdef _AIX
|
| 375 |
+
/* AIX needs <sys/poll.h> */
|
| 376 |
+
#define CURL_PULL_SYS_POLL_H
|
| 377 |
+
#endif
|
| 378 |
+
|
| 379 |
+
/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
|
| 380 |
+
/* sys/types.h is required here to properly make type definitions below. */
|
| 381 |
+
#ifdef CURL_PULL_SYS_TYPES_H
|
| 382 |
+
# include <sys/types.h>
|
| 383 |
+
#endif
|
| 384 |
+
|
| 385 |
+
/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
|
| 386 |
+
/* sys/socket.h is required here to properly make type definitions below. */
|
| 387 |
+
#ifdef CURL_PULL_SYS_SOCKET_H
|
| 388 |
+
# include <sys/socket.h>
|
| 389 |
+
#endif
|
| 390 |
+
|
| 391 |
+
/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */
|
| 392 |
+
/* sys/poll.h is required here to properly make type definitions below. */
|
| 393 |
+
#ifdef CURL_PULL_SYS_POLL_H
|
| 394 |
+
# include <sys/poll.h>
|
| 395 |
+
#endif
|
| 396 |
+
|
| 397 |
+
/* Data type definition of curl_socklen_t. */
|
| 398 |
+
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
|
| 399 |
+
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
|
| 400 |
+
#endif
|
| 401 |
+
|
| 402 |
+
/* Data type definition of curl_off_t. */
|
| 403 |
+
|
| 404 |
+
#ifdef CURL_TYPEOF_CURL_OFF_T
|
| 405 |
+
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
|
| 406 |
+
#endif
|
| 407 |
+
|
| 408 |
+
#endif /* CURLINC_SYSTEM_H */
|
data/miniconda3/include/curl/typecheck-gcc.h
ADDED
|
@@ -0,0 +1,947 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_TYPECHECK_GCC_H
|
| 2 |
+
#define CURLINC_TYPECHECK_GCC_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
/* wraps curl_easy_setopt() with typechecking */
|
| 28 |
+
|
| 29 |
+
/* To add a new kind of warning, add an
|
| 30 |
+
* if(curlcheck_sometype_option(_curl_opt))
|
| 31 |
+
* if(!curlcheck_sometype(value))
|
| 32 |
+
* _curl_easy_setopt_err_sometype();
|
| 33 |
+
* block and define curlcheck_sometype_option, curlcheck_sometype and
|
| 34 |
+
* _curl_easy_setopt_err_sometype below
|
| 35 |
+
*
|
| 36 |
+
* NOTE: We use two nested 'if' statements here instead of the && operator, in
|
| 37 |
+
* order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
|
| 38 |
+
* when compiling with -Wlogical-op.
|
| 39 |
+
*
|
| 40 |
+
* To add an option that uses the same type as an existing option, you will
|
| 41 |
+
* just need to extend the appropriate _curl_*_option macro
|
| 42 |
+
*/
|
| 43 |
+
|
| 44 |
+
#define curl_easy_setopt(handle, option, value) \
|
| 45 |
+
__extension__({ \
|
| 46 |
+
if(__builtin_constant_p(option)) { \
|
| 47 |
+
CURL_IGNORE_DEPRECATION( \
|
| 48 |
+
if(curlcheck_long_option(option)) \
|
| 49 |
+
if(!curlcheck_long(value)) \
|
| 50 |
+
_curl_easy_setopt_err_long(); \
|
| 51 |
+
if(curlcheck_off_t_option(option)) \
|
| 52 |
+
if(!curlcheck_off_t(value)) \
|
| 53 |
+
_curl_easy_setopt_err_curl_off_t(); \
|
| 54 |
+
if(curlcheck_string_option(option)) \
|
| 55 |
+
if(!curlcheck_string(value)) \
|
| 56 |
+
_curl_easy_setopt_err_string(); \
|
| 57 |
+
if((option) == CURLOPT_PRIVATE) { } \
|
| 58 |
+
if(curlcheck_write_cb_option(option)) \
|
| 59 |
+
if(!curlcheck_write_cb(value)) \
|
| 60 |
+
_curl_easy_setopt_err_write_callback(); \
|
| 61 |
+
if(curlcheck_curl_option(option)) \
|
| 62 |
+
if(!curlcheck_curl(value)) \
|
| 63 |
+
_curl_easy_setopt_err_curl(); \
|
| 64 |
+
if((option) == CURLOPT_RESOLVER_START_FUNCTION) \
|
| 65 |
+
if(!curlcheck_resolver_start_callback(value)) \
|
| 66 |
+
_curl_easy_setopt_err_resolver_start_callback(); \
|
| 67 |
+
if((option) == CURLOPT_READFUNCTION) \
|
| 68 |
+
if(!curlcheck_read_cb(value)) \
|
| 69 |
+
_curl_easy_setopt_err_read_cb(); \
|
| 70 |
+
if((option) == CURLOPT_IOCTLFUNCTION) \
|
| 71 |
+
if(!curlcheck_ioctl_cb(value)) \
|
| 72 |
+
_curl_easy_setopt_err_ioctl_cb(); \
|
| 73 |
+
if((option) == CURLOPT_SOCKOPTFUNCTION) \
|
| 74 |
+
if(!curlcheck_sockopt_cb(value)) \
|
| 75 |
+
_curl_easy_setopt_err_sockopt_cb(); \
|
| 76 |
+
if((option) == CURLOPT_OPENSOCKETFUNCTION) \
|
| 77 |
+
if(!curlcheck_opensocket_cb(value)) \
|
| 78 |
+
_curl_easy_setopt_err_opensocket_cb(); \
|
| 79 |
+
if((option) == CURLOPT_PROGRESSFUNCTION) \
|
| 80 |
+
if(!curlcheck_progress_cb(value)) \
|
| 81 |
+
_curl_easy_setopt_err_progress_cb(); \
|
| 82 |
+
if((option) == CURLOPT_XFERINFOFUNCTION) \
|
| 83 |
+
if(!curlcheck_xferinfo_cb(value)) \
|
| 84 |
+
_curl_easy_setopt_err_xferinfo_cb(); \
|
| 85 |
+
if((option) == CURLOPT_DEBUGFUNCTION) \
|
| 86 |
+
if(!curlcheck_debug_cb(value)) \
|
| 87 |
+
_curl_easy_setopt_err_debug_cb(); \
|
| 88 |
+
if((option) == CURLOPT_SSL_CTX_FUNCTION) \
|
| 89 |
+
if(!curlcheck_ssl_ctx_cb(value)) \
|
| 90 |
+
_curl_easy_setopt_err_ssl_ctx_cb(); \
|
| 91 |
+
if(curlcheck_conv_cb_option(option)) \
|
| 92 |
+
if(!curlcheck_conv_cb(value)) \
|
| 93 |
+
_curl_easy_setopt_err_conv_cb(); \
|
| 94 |
+
if((option) == CURLOPT_SEEKFUNCTION) \
|
| 95 |
+
if(!curlcheck_seek_cb(value)) \
|
| 96 |
+
_curl_easy_setopt_err_seek_cb(); \
|
| 97 |
+
if((option) == CURLOPT_CHUNK_BGN_FUNCTION) \
|
| 98 |
+
if(!curlcheck_chunk_bgn_cb(value)) \
|
| 99 |
+
_curl_easy_setopt_err_chunk_bgn_cb(); \
|
| 100 |
+
if((option) == CURLOPT_CHUNK_END_FUNCTION) \
|
| 101 |
+
if(!curlcheck_chunk_end_cb(value)) \
|
| 102 |
+
_curl_easy_setopt_err_chunk_end_cb(); \
|
| 103 |
+
if((option) == CURLOPT_CLOSESOCKETFUNCTION) \
|
| 104 |
+
if(!curlcheck_close_socket_cb(value)) \
|
| 105 |
+
_curl_easy_setopt_err_close_socket_cb(); \
|
| 106 |
+
if((option) == CURLOPT_FNMATCH_FUNCTION) \
|
| 107 |
+
if(!curlcheck_fnmatch_cb(value)) \
|
| 108 |
+
_curl_easy_setopt_err_fnmatch_cb(); \
|
| 109 |
+
if((option) == CURLOPT_HSTSREADFUNCTION) \
|
| 110 |
+
if(!curlcheck_hstsread_cb(value)) \
|
| 111 |
+
_curl_easy_setopt_err_hstsread_cb(); \
|
| 112 |
+
if((option) == CURLOPT_HSTSWRITEFUNCTION) \
|
| 113 |
+
if(!curlcheck_hstswrite_cb(value)) \
|
| 114 |
+
_curl_easy_setopt_err_hstswrite_cb(); \
|
| 115 |
+
if((option) == CURLOPT_SSH_HOSTKEYFUNCTION) \
|
| 116 |
+
if(!curlcheck_ssh_hostkey_cb(value)) \
|
| 117 |
+
_curl_easy_setopt_err_ssh_hostkey_cb(); \
|
| 118 |
+
if((option) == CURLOPT_SSH_KEYFUNCTION) \
|
| 119 |
+
if(!curlcheck_ssh_key_cb(value)) \
|
| 120 |
+
_curl_easy_setopt_err_ssh_key_cb(); \
|
| 121 |
+
if((option) == CURLOPT_INTERLEAVEFUNCTION) \
|
| 122 |
+
if(!curlcheck_interleave_cb(value)) \
|
| 123 |
+
_curl_easy_setopt_err_interleave_cb(); \
|
| 124 |
+
if((option) == CURLOPT_PREREQFUNCTION) \
|
| 125 |
+
if(!curlcheck_prereq_cb(value)) \
|
| 126 |
+
_curl_easy_setopt_err_prereq_cb(); \
|
| 127 |
+
if((option) == CURLOPT_TRAILERFUNCTION) \
|
| 128 |
+
if(!curlcheck_trailer_cb(value)) \
|
| 129 |
+
_curl_easy_setopt_err_trailer_cb(); \
|
| 130 |
+
if(curlcheck_cb_data_option(option)) \
|
| 131 |
+
if(!curlcheck_cb_data(value)) \
|
| 132 |
+
_curl_easy_setopt_err_cb_data(); \
|
| 133 |
+
if((option) == CURLOPT_ERRORBUFFER) \
|
| 134 |
+
if(!curlcheck_error_buffer(value)) \
|
| 135 |
+
_curl_easy_setopt_err_error_buffer(); \
|
| 136 |
+
if((option) == CURLOPT_CURLU) \
|
| 137 |
+
if(!curlcheck_ptr((value), CURLU)) \
|
| 138 |
+
_curl_easy_setopt_err_curlu(); \
|
| 139 |
+
if((option) == CURLOPT_STDERR) \
|
| 140 |
+
if(!curlcheck_FILE(value)) \
|
| 141 |
+
_curl_easy_setopt_err_FILE(); \
|
| 142 |
+
if(curlcheck_postfields_option(option)) \
|
| 143 |
+
if(!curlcheck_postfields(value)) \
|
| 144 |
+
_curl_easy_setopt_err_postfields(); \
|
| 145 |
+
if((option) == CURLOPT_HTTPPOST) \
|
| 146 |
+
if(!curlcheck_arr((value), struct curl_httppost)) \
|
| 147 |
+
_curl_easy_setopt_err_curl_httpost(); \
|
| 148 |
+
if((option) == CURLOPT_MIMEPOST) \
|
| 149 |
+
if(!curlcheck_ptr((value), curl_mime)) \
|
| 150 |
+
_curl_easy_setopt_err_curl_mimepost(); \
|
| 151 |
+
if(curlcheck_slist_option(option)) \
|
| 152 |
+
if(!curlcheck_arr((value), struct curl_slist)) \
|
| 153 |
+
_curl_easy_setopt_err_curl_slist(); \
|
| 154 |
+
if((option) == CURLOPT_SHARE) \
|
| 155 |
+
if(!curlcheck_ptr((value), CURLSH)) \
|
| 156 |
+
_curl_easy_setopt_err_CURLSH(); \
|
| 157 |
+
) \
|
| 158 |
+
} \
|
| 159 |
+
curl_easy_setopt(handle, option, value); \
|
| 160 |
+
})
|
| 161 |
+
|
| 162 |
+
/* wraps curl_easy_getinfo() with typechecking */
|
| 163 |
+
#define curl_easy_getinfo(handle, info, arg) \
|
| 164 |
+
__extension__({ \
|
| 165 |
+
if(__builtin_constant_p(info)) { \
|
| 166 |
+
CURL_IGNORE_DEPRECATION( \
|
| 167 |
+
if(curlcheck_string_info(info)) \
|
| 168 |
+
if(!curlcheck_arr((arg), char *)) \
|
| 169 |
+
_curl_easy_getinfo_err_string(); \
|
| 170 |
+
if(curlcheck_long_info(info)) \
|
| 171 |
+
if(!curlcheck_arr((arg), long)) \
|
| 172 |
+
_curl_easy_getinfo_err_long(); \
|
| 173 |
+
if(curlcheck_double_info(info)) \
|
| 174 |
+
if(!curlcheck_arr((arg), double)) \
|
| 175 |
+
_curl_easy_getinfo_err_double(); \
|
| 176 |
+
if(curlcheck_slist_info(info)) \
|
| 177 |
+
if(!curlcheck_arr((arg), struct curl_slist *)) \
|
| 178 |
+
_curl_easy_getinfo_err_curl_slist(); \
|
| 179 |
+
if(curlcheck_tlssessioninfo_info(info)) \
|
| 180 |
+
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
|
| 181 |
+
_curl_easy_getinfo_err_curl_tlssessioninfo(); \
|
| 182 |
+
if(curlcheck_certinfo_info(info)) \
|
| 183 |
+
if(!curlcheck_arr((arg), struct curl_certinfo *)) \
|
| 184 |
+
_curl_easy_getinfo_err_curl_certinfo(); \
|
| 185 |
+
if(curlcheck_socket_info(info)) \
|
| 186 |
+
if(!curlcheck_arr((arg), curl_socket_t)) \
|
| 187 |
+
_curl_easy_getinfo_err_curl_socket(); \
|
| 188 |
+
if(curlcheck_off_t_info(info)) \
|
| 189 |
+
if(!curlcheck_arr((arg), curl_off_t)) \
|
| 190 |
+
_curl_easy_getinfo_err_curl_off_t(); \
|
| 191 |
+
) \
|
| 192 |
+
} \
|
| 193 |
+
curl_easy_getinfo(handle, info, arg); \
|
| 194 |
+
})
|
| 195 |
+
|
| 196 |
+
#define curl_multi_setopt(handle, option, value) \
|
| 197 |
+
__extension__({ \
|
| 198 |
+
if(__builtin_constant_p(option)) { \
|
| 199 |
+
if(curlcheck_long_option(option)) \
|
| 200 |
+
if(!curlcheck_long(value)) \
|
| 201 |
+
_curl_multi_setopt_err_long(); \
|
| 202 |
+
if(curlcheck_off_t_option(option)) \
|
| 203 |
+
if(!curlcheck_off_t(value)) \
|
| 204 |
+
_curl_multi_setopt_err_curl_off_t(); \
|
| 205 |
+
if(curlcheck_multicb_data_option(option)) \
|
| 206 |
+
if(!curlcheck_cb_data(value)) \
|
| 207 |
+
_curl_multi_setopt_err_cb_data(); \
|
| 208 |
+
if(curlcheck_charpp_option(option)) \
|
| 209 |
+
if(!curlcheck_ptrptr(value, char)) \
|
| 210 |
+
_curl_multi_setopt_err_charpp(); \
|
| 211 |
+
if((option) == CURLMOPT_PUSHFUNCTION) \
|
| 212 |
+
if(!curlcheck_multipush_cb(value)) \
|
| 213 |
+
_curl_multi_setopt_err_pushcb(); \
|
| 214 |
+
if((option) == CURLMOPT_SOCKETFUNCTION) \
|
| 215 |
+
if(!curlcheck_multisocket_cb(value)) \
|
| 216 |
+
_curl_multi_setopt_err_socketcb(); \
|
| 217 |
+
if((option) == CURLMOPT_TIMERFUNCTION) \
|
| 218 |
+
if(!curlcheck_multitimer_cb(value)) \
|
| 219 |
+
_curl_multi_setopt_err_timercb(); \
|
| 220 |
+
} \
|
| 221 |
+
curl_multi_setopt(handle, option, value); \
|
| 222 |
+
})
|
| 223 |
+
|
| 224 |
+
/* evaluates to true if the option takes a data argument to pass to a
|
| 225 |
+
callback */
|
| 226 |
+
#define curlcheck_multicb_data_option(option) \
|
| 227 |
+
((option) == CURLMOPT_PUSHDATA || \
|
| 228 |
+
(option) == CURLMOPT_SOCKETDATA || \
|
| 229 |
+
(option) == CURLMOPT_TIMERDATA || \
|
| 230 |
+
0)
|
| 231 |
+
|
| 232 |
+
/* evaluates to true if the option takes a char ** argument */
|
| 233 |
+
#define curlcheck_charpp_option(option) \
|
| 234 |
+
((option) == CURLMOPT_PIPELINING_SERVER_BL || \
|
| 235 |
+
(option) == CURLMOPT_PIPELINING_SITE_BL || \
|
| 236 |
+
0)
|
| 237 |
+
|
| 238 |
+
/* evaluates to true if expr is of type curl_multi_timer_callback */
|
| 239 |
+
#define curlcheck_multitimer_cb(expr) \
|
| 240 |
+
(curlcheck_NULL(expr) || \
|
| 241 |
+
curlcheck_cb_compatible((expr), curl_multi_timer_callback))
|
| 242 |
+
|
| 243 |
+
/* evaluates to true if expr is of type curl_socket_callback */
|
| 244 |
+
#define curlcheck_multisocket_cb(expr) \
|
| 245 |
+
(curlcheck_NULL(expr) || \
|
| 246 |
+
curlcheck_cb_compatible((expr), curl_socket_callback))
|
| 247 |
+
|
| 248 |
+
/* evaluates to true if expr is of type curl_push_callback */
|
| 249 |
+
#define curlcheck_multipush_cb(expr) \
|
| 250 |
+
(curlcheck_NULL(expr) || \
|
| 251 |
+
curlcheck_cb_compatible((expr), curl_push_callback))
|
| 252 |
+
|
| 253 |
+
/*
|
| 254 |
+
* For now, just make sure that the functions are called with three arguments
|
| 255 |
+
*/
|
| 256 |
+
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
|
| 260 |
+
* functions */
|
| 261 |
+
|
| 262 |
+
/* To define a new warning, use _CURL_WARNING(identifier, "message") */
|
| 263 |
+
#define CURLWARNING(id, message) \
|
| 264 |
+
static void __attribute__((__warning__(message))) \
|
| 265 |
+
__attribute__((__unused__)) __attribute__((__noinline__)) \
|
| 266 |
+
id(void) { __asm__(""); }
|
| 267 |
+
|
| 268 |
+
CURLWARNING(_curl_multi_setopt_err_long,
|
| 269 |
+
"curl_multi_setopt expects a long argument")
|
| 270 |
+
CURLWARNING(_curl_multi_setopt_err_curl_off_t,
|
| 271 |
+
"curl_multi_setopt expects a curl_off_t argument")
|
| 272 |
+
CURLWARNING(_curl_multi_setopt_err_cb_data,
|
| 273 |
+
"curl_multi_setopt expects a 'void *' argument")
|
| 274 |
+
CURLWARNING(_curl_multi_setopt_err_charpp,
|
| 275 |
+
"curl_multi_setopt expects a 'char **' argument")
|
| 276 |
+
CURLWARNING(_curl_multi_setopt_err_pushcb,
|
| 277 |
+
"curl_multi_setopt expects a curl_push_callback argument")
|
| 278 |
+
CURLWARNING(_curl_multi_setopt_err_socketcb,
|
| 279 |
+
"curl_multi_setopt expects a curl_socket_callback argument")
|
| 280 |
+
CURLWARNING(_curl_multi_setopt_err_timercb,
|
| 281 |
+
"curl_multi_setopt expects a curl_multi_timer_callback argument")
|
| 282 |
+
|
| 283 |
+
CURLWARNING(_curl_easy_setopt_err_long,
|
| 284 |
+
"curl_easy_setopt expects a long argument")
|
| 285 |
+
CURLWARNING(_curl_easy_setopt_err_curl_off_t,
|
| 286 |
+
"curl_easy_setopt expects a curl_off_t argument")
|
| 287 |
+
CURLWARNING(_curl_easy_setopt_err_string,
|
| 288 |
+
"curl_easy_setopt expects a "
|
| 289 |
+
"string ('char *' or char[]) argument")
|
| 290 |
+
CURLWARNING(_curl_easy_setopt_err_write_callback,
|
| 291 |
+
"curl_easy_setopt expects a curl_write_callback argument")
|
| 292 |
+
CURLWARNING(_curl_easy_setopt_err_resolver_start_callback,
|
| 293 |
+
"curl_easy_setopt expects a "
|
| 294 |
+
"curl_resolver_start_callback argument")
|
| 295 |
+
CURLWARNING(_curl_easy_setopt_err_read_cb,
|
| 296 |
+
"curl_easy_setopt expects a curl_read_callback argument")
|
| 297 |
+
CURLWARNING(_curl_easy_setopt_err_ioctl_cb,
|
| 298 |
+
"curl_easy_setopt expects a curl_ioctl_callback argument")
|
| 299 |
+
CURLWARNING(_curl_easy_setopt_err_sockopt_cb,
|
| 300 |
+
"curl_easy_setopt expects a curl_sockopt_callback argument")
|
| 301 |
+
CURLWARNING(_curl_easy_setopt_err_opensocket_cb,
|
| 302 |
+
"curl_easy_setopt expects a "
|
| 303 |
+
"curl_opensocket_callback argument")
|
| 304 |
+
CURLWARNING(_curl_easy_setopt_err_progress_cb,
|
| 305 |
+
"curl_easy_setopt expects a curl_progress_callback argument")
|
| 306 |
+
CURLWARNING(_curl_easy_setopt_err_xferinfo_cb,
|
| 307 |
+
"curl_easy_setopt expects a curl_xferinfo_callback argument")
|
| 308 |
+
CURLWARNING(_curl_easy_setopt_err_debug_cb,
|
| 309 |
+
"curl_easy_setopt expects a curl_debug_callback argument")
|
| 310 |
+
CURLWARNING(_curl_easy_setopt_err_ssl_ctx_cb,
|
| 311 |
+
"curl_easy_setopt expects a curl_ssl_ctx_callback argument")
|
| 312 |
+
CURLWARNING(_curl_easy_setopt_err_conv_cb,
|
| 313 |
+
"curl_easy_setopt expects a curl_conv_callback argument")
|
| 314 |
+
CURLWARNING(_curl_easy_setopt_err_seek_cb,
|
| 315 |
+
"curl_easy_setopt expects a curl_seek_callback argument")
|
| 316 |
+
CURLWARNING(_curl_easy_setopt_err_cb_data,
|
| 317 |
+
"curl_easy_setopt expects a "
|
| 318 |
+
"private data pointer as argument")
|
| 319 |
+
CURLWARNING(_curl_easy_setopt_err_chunk_bgn_cb,
|
| 320 |
+
"curl_easy_setopt expects a curl_chunk_bgn_callback argument")
|
| 321 |
+
CURLWARNING(_curl_easy_setopt_err_chunk_end_cb,
|
| 322 |
+
"curl_easy_setopt expects a curl_chunk_end_callback argument")
|
| 323 |
+
CURLWARNING(_curl_easy_setopt_err_close_socket_cb,
|
| 324 |
+
"curl_easy_setopt expects a curl_closesocket_callback argument")
|
| 325 |
+
CURLWARNING(_curl_easy_setopt_err_fnmatch_cb,
|
| 326 |
+
"curl_easy_setopt expects a curl_fnmatch_callback argument")
|
| 327 |
+
CURLWARNING(_curl_easy_setopt_err_hstsread_cb,
|
| 328 |
+
"curl_easy_setopt expects a curl_hstsread_callback argument")
|
| 329 |
+
CURLWARNING(_curl_easy_setopt_err_hstswrite_cb,
|
| 330 |
+
"curl_easy_setopt expects a curl_hstswrite_callback argument")
|
| 331 |
+
CURLWARNING(_curl_easy_setopt_err_ssh_key_cb,
|
| 332 |
+
"curl_easy_setopt expects a curl_sshkeycallback argument")
|
| 333 |
+
CURLWARNING(_curl_easy_setopt_err_ssh_hostkey_cb,
|
| 334 |
+
"curl_easy_setopt expects a curl_sshhostkeycallback argument")
|
| 335 |
+
CURLWARNING(_curl_easy_setopt_err_interleave_cb,
|
| 336 |
+
"curl_easy_setopt expects a curl_interleave_callback argument")
|
| 337 |
+
CURLWARNING(_curl_easy_setopt_err_prereq_cb,
|
| 338 |
+
"curl_easy_setopt expects a curl_prereq_callback argument")
|
| 339 |
+
CURLWARNING(_curl_easy_setopt_err_trailer_cb,
|
| 340 |
+
"curl_easy_setopt expects a curl_trailerfunc_ok argument")
|
| 341 |
+
CURLWARNING(_curl_easy_setopt_err_error_buffer,
|
| 342 |
+
"curl_easy_setopt expects a "
|
| 343 |
+
"char buffer of CURL_ERROR_SIZE as argument")
|
| 344 |
+
CURLWARNING(_curl_easy_setopt_err_curlu,
|
| 345 |
+
"curl_easy_setopt expects a 'CURLU *' argument")
|
| 346 |
+
CURLWARNING(_curl_easy_setopt_err_curl,
|
| 347 |
+
"curl_easy_setopt expects a 'CURL *' argument")
|
| 348 |
+
CURLWARNING(_curl_easy_setopt_err_FILE,
|
| 349 |
+
"curl_easy_setopt expects a 'FILE *' argument")
|
| 350 |
+
CURLWARNING(_curl_easy_setopt_err_postfields,
|
| 351 |
+
"curl_easy_setopt expects a 'void *' or 'char *' argument")
|
| 352 |
+
CURLWARNING(_curl_easy_setopt_err_curl_httpost,
|
| 353 |
+
"curl_easy_setopt expects a 'struct curl_httppost *' "
|
| 354 |
+
"argument")
|
| 355 |
+
CURLWARNING(_curl_easy_setopt_err_curl_mimepost,
|
| 356 |
+
"curl_easy_setopt expects a 'curl_mime *' "
|
| 357 |
+
"argument")
|
| 358 |
+
CURLWARNING(_curl_easy_setopt_err_curl_slist,
|
| 359 |
+
"curl_easy_setopt expects a 'struct curl_slist *' argument")
|
| 360 |
+
CURLWARNING(_curl_easy_setopt_err_CURLSH,
|
| 361 |
+
"curl_easy_setopt expects a CURLSH* argument")
|
| 362 |
+
CURLWARNING(_curl_easy_getinfo_err_string,
|
| 363 |
+
"curl_easy_getinfo expects a pointer to 'char *'")
|
| 364 |
+
CURLWARNING(_curl_easy_getinfo_err_long,
|
| 365 |
+
"curl_easy_getinfo expects a pointer to long")
|
| 366 |
+
CURLWARNING(_curl_easy_getinfo_err_double,
|
| 367 |
+
"curl_easy_getinfo expects a pointer to double")
|
| 368 |
+
CURLWARNING(_curl_easy_getinfo_err_curl_slist,
|
| 369 |
+
"curl_easy_getinfo expects a pointer to 'struct curl_slist *'")
|
| 370 |
+
CURLWARNING(_curl_easy_getinfo_err_curl_tlssessioninfo,
|
| 371 |
+
"curl_easy_getinfo expects a pointer to "
|
| 372 |
+
"'struct curl_tlssessioninfo *'")
|
| 373 |
+
CURLWARNING(_curl_easy_getinfo_err_curl_certinfo,
|
| 374 |
+
"curl_easy_getinfo expects a pointer to "
|
| 375 |
+
"'struct curl_certinfo *'")
|
| 376 |
+
CURLWARNING(_curl_easy_getinfo_err_curl_socket,
|
| 377 |
+
"curl_easy_getinfo expects a pointer to curl_socket_t")
|
| 378 |
+
CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
| 379 |
+
"curl_easy_getinfo expects a pointer to curl_off_t")
|
| 380 |
+
|
| 381 |
+
/* groups of curl_easy_setops options that take the same type of argument */
|
| 382 |
+
|
| 383 |
+
/* evaluates to true if option takes a long argument */
|
| 384 |
+
#define curlcheck_long_option(option) \
|
| 385 |
+
(0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
|
| 386 |
+
|
| 387 |
+
#define curlcheck_off_t_option(option) \
|
| 388 |
+
(((option) > CURLOPTTYPE_OFF_T) && ((option) < CURLOPTTYPE_BLOB))
|
| 389 |
+
|
| 390 |
+
/* option takes a CURL * argument */
|
| 391 |
+
#define curlcheck_curl_option(option) \
|
| 392 |
+
((option) == CURLOPT_STREAM_DEPENDS || \
|
| 393 |
+
(option) == CURLOPT_STREAM_DEPENDS_E || \
|
| 394 |
+
0)
|
| 395 |
+
|
| 396 |
+
/* evaluates to true if option takes a char* argument */
|
| 397 |
+
#define curlcheck_string_option(option) \
|
| 398 |
+
((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \
|
| 399 |
+
(option) == CURLOPT_ACCEPT_ENCODING || \
|
| 400 |
+
(option) == CURLOPT_ALTSVC || \
|
| 401 |
+
(option) == CURLOPT_CAINFO || \
|
| 402 |
+
(option) == CURLOPT_CAPATH || \
|
| 403 |
+
(option) == CURLOPT_COOKIE || \
|
| 404 |
+
(option) == CURLOPT_COOKIEFILE || \
|
| 405 |
+
(option) == CURLOPT_COOKIEJAR || \
|
| 406 |
+
(option) == CURLOPT_COOKIELIST || \
|
| 407 |
+
(option) == CURLOPT_CRLFILE || \
|
| 408 |
+
(option) == CURLOPT_CUSTOMREQUEST || \
|
| 409 |
+
(option) == CURLOPT_DEFAULT_PROTOCOL || \
|
| 410 |
+
(option) == CURLOPT_DNS_INTERFACE || \
|
| 411 |
+
(option) == CURLOPT_DNS_LOCAL_IP4 || \
|
| 412 |
+
(option) == CURLOPT_DNS_LOCAL_IP6 || \
|
| 413 |
+
(option) == CURLOPT_DNS_SERVERS || \
|
| 414 |
+
(option) == CURLOPT_DOH_URL || \
|
| 415 |
+
(option) == CURLOPT_ECH || \
|
| 416 |
+
(option) == CURLOPT_EGDSOCKET || \
|
| 417 |
+
(option) == CURLOPT_FTP_ACCOUNT || \
|
| 418 |
+
(option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
|
| 419 |
+
(option) == CURLOPT_FTPPORT || \
|
| 420 |
+
(option) == CURLOPT_HAPROXY_CLIENT_IP || \
|
| 421 |
+
(option) == CURLOPT_HSTS || \
|
| 422 |
+
(option) == CURLOPT_INTERFACE || \
|
| 423 |
+
(option) == CURLOPT_ISSUERCERT || \
|
| 424 |
+
(option) == CURLOPT_KEYPASSWD || \
|
| 425 |
+
(option) == CURLOPT_KRBLEVEL || \
|
| 426 |
+
(option) == CURLOPT_LOGIN_OPTIONS || \
|
| 427 |
+
(option) == CURLOPT_MAIL_AUTH || \
|
| 428 |
+
(option) == CURLOPT_MAIL_FROM || \
|
| 429 |
+
(option) == CURLOPT_NETRC_FILE || \
|
| 430 |
+
(option) == CURLOPT_NOPROXY || \
|
| 431 |
+
(option) == CURLOPT_PASSWORD || \
|
| 432 |
+
(option) == CURLOPT_PINNEDPUBLICKEY || \
|
| 433 |
+
(option) == CURLOPT_PRE_PROXY || \
|
| 434 |
+
(option) == CURLOPT_PROTOCOLS_STR || \
|
| 435 |
+
(option) == CURLOPT_PROXY || \
|
| 436 |
+
(option) == CURLOPT_PROXY_CAINFO || \
|
| 437 |
+
(option) == CURLOPT_PROXY_CAPATH || \
|
| 438 |
+
(option) == CURLOPT_PROXY_CRLFILE || \
|
| 439 |
+
(option) == CURLOPT_PROXY_ISSUERCERT || \
|
| 440 |
+
(option) == CURLOPT_PROXY_KEYPASSWD || \
|
| 441 |
+
(option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
|
| 442 |
+
(option) == CURLOPT_PROXY_SERVICE_NAME || \
|
| 443 |
+
(option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
|
| 444 |
+
(option) == CURLOPT_PROXY_SSLCERT || \
|
| 445 |
+
(option) == CURLOPT_PROXY_SSLCERTTYPE || \
|
| 446 |
+
(option) == CURLOPT_PROXY_SSLKEY || \
|
| 447 |
+
(option) == CURLOPT_PROXY_SSLKEYTYPE || \
|
| 448 |
+
(option) == CURLOPT_PROXY_TLS13_CIPHERS || \
|
| 449 |
+
(option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
|
| 450 |
+
(option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
|
| 451 |
+
(option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
|
| 452 |
+
(option) == CURLOPT_PROXYPASSWORD || \
|
| 453 |
+
(option) == CURLOPT_PROXYUSERNAME || \
|
| 454 |
+
(option) == CURLOPT_PROXYUSERPWD || \
|
| 455 |
+
(option) == CURLOPT_RANDOM_FILE || \
|
| 456 |
+
(option) == CURLOPT_RANGE || \
|
| 457 |
+
(option) == CURLOPT_REDIR_PROTOCOLS_STR || \
|
| 458 |
+
(option) == CURLOPT_REFERER || \
|
| 459 |
+
(option) == CURLOPT_REQUEST_TARGET || \
|
| 460 |
+
(option) == CURLOPT_RTSP_SESSION_ID || \
|
| 461 |
+
(option) == CURLOPT_RTSP_STREAM_URI || \
|
| 462 |
+
(option) == CURLOPT_RTSP_TRANSPORT || \
|
| 463 |
+
(option) == CURLOPT_SASL_AUTHZID || \
|
| 464 |
+
(option) == CURLOPT_SERVICE_NAME || \
|
| 465 |
+
(option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
|
| 466 |
+
(option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
|
| 467 |
+
(option) == CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 || \
|
| 468 |
+
(option) == CURLOPT_SSH_KNOWNHOSTS || \
|
| 469 |
+
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
| 470 |
+
(option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
|
| 471 |
+
(option) == CURLOPT_SSLCERT || \
|
| 472 |
+
(option) == CURLOPT_SSLCERTTYPE || \
|
| 473 |
+
(option) == CURLOPT_SSLENGINE || \
|
| 474 |
+
(option) == CURLOPT_SSLKEY || \
|
| 475 |
+
(option) == CURLOPT_SSLKEYTYPE || \
|
| 476 |
+
(option) == CURLOPT_SSL_CIPHER_LIST || \
|
| 477 |
+
(option) == CURLOPT_SSL_EC_CURVES || \
|
| 478 |
+
(option) == CURLOPT_SSL_SIGNATURE_ALGORITHMS || \
|
| 479 |
+
(option) == CURLOPT_TLS13_CIPHERS || \
|
| 480 |
+
(option) == CURLOPT_TLSAUTH_PASSWORD || \
|
| 481 |
+
(option) == CURLOPT_TLSAUTH_TYPE || \
|
| 482 |
+
(option) == CURLOPT_TLSAUTH_USERNAME || \
|
| 483 |
+
(option) == CURLOPT_UNIX_SOCKET_PATH || \
|
| 484 |
+
(option) == CURLOPT_URL || \
|
| 485 |
+
(option) == CURLOPT_USERAGENT || \
|
| 486 |
+
(option) == CURLOPT_USERNAME || \
|
| 487 |
+
(option) == CURLOPT_AWS_SIGV4 || \
|
| 488 |
+
(option) == CURLOPT_USERPWD || \
|
| 489 |
+
(option) == CURLOPT_XOAUTH2_BEARER || \
|
| 490 |
+
0)
|
| 491 |
+
|
| 492 |
+
/* evaluates to true if option takes a curl_write_callback argument */
|
| 493 |
+
#define curlcheck_write_cb_option(option) \
|
| 494 |
+
((option) == CURLOPT_HEADERFUNCTION || \
|
| 495 |
+
(option) == CURLOPT_WRITEFUNCTION)
|
| 496 |
+
|
| 497 |
+
/* evaluates to true if option takes a curl_conv_callback argument */
|
| 498 |
+
#define curlcheck_conv_cb_option(option) \
|
| 499 |
+
((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \
|
| 500 |
+
(option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \
|
| 501 |
+
(option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
|
| 502 |
+
|
| 503 |
+
/* evaluates to true if option takes a data argument to pass to a callback */
|
| 504 |
+
#define curlcheck_cb_data_option(option) \
|
| 505 |
+
((option) == CURLOPT_CHUNK_DATA || \
|
| 506 |
+
(option) == CURLOPT_CLOSESOCKETDATA || \
|
| 507 |
+
(option) == CURLOPT_DEBUGDATA || \
|
| 508 |
+
(option) == CURLOPT_FNMATCH_DATA || \
|
| 509 |
+
(option) == CURLOPT_HEADERDATA || \
|
| 510 |
+
(option) == CURLOPT_HSTSREADDATA || \
|
| 511 |
+
(option) == CURLOPT_HSTSWRITEDATA || \
|
| 512 |
+
(option) == CURLOPT_INTERLEAVEDATA || \
|
| 513 |
+
(option) == CURLOPT_IOCTLDATA || \
|
| 514 |
+
(option) == CURLOPT_OPENSOCKETDATA || \
|
| 515 |
+
(option) == CURLOPT_PREREQDATA || \
|
| 516 |
+
(option) == CURLOPT_XFERINFODATA || \
|
| 517 |
+
(option) == CURLOPT_READDATA || \
|
| 518 |
+
(option) == CURLOPT_SEEKDATA || \
|
| 519 |
+
(option) == CURLOPT_SOCKOPTDATA || \
|
| 520 |
+
(option) == CURLOPT_SSH_KEYDATA || \
|
| 521 |
+
(option) == CURLOPT_SSL_CTX_DATA || \
|
| 522 |
+
(option) == CURLOPT_WRITEDATA || \
|
| 523 |
+
(option) == CURLOPT_RESOLVER_START_DATA || \
|
| 524 |
+
(option) == CURLOPT_TRAILERDATA || \
|
| 525 |
+
(option) == CURLOPT_SSH_HOSTKEYDATA || \
|
| 526 |
+
0)
|
| 527 |
+
|
| 528 |
+
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
| 529 |
+
#define curlcheck_postfields_option(option) \
|
| 530 |
+
((option) == CURLOPT_POSTFIELDS || \
|
| 531 |
+
(option) == CURLOPT_COPYPOSTFIELDS || \
|
| 532 |
+
0)
|
| 533 |
+
|
| 534 |
+
/* evaluates to true if option takes a struct curl_slist * argument */
|
| 535 |
+
#define curlcheck_slist_option(option) \
|
| 536 |
+
((option) == CURLOPT_HTTP200ALIASES || \
|
| 537 |
+
(option) == CURLOPT_HTTPHEADER || \
|
| 538 |
+
(option) == CURLOPT_MAIL_RCPT || \
|
| 539 |
+
(option) == CURLOPT_POSTQUOTE || \
|
| 540 |
+
(option) == CURLOPT_PREQUOTE || \
|
| 541 |
+
(option) == CURLOPT_PROXYHEADER || \
|
| 542 |
+
(option) == CURLOPT_QUOTE || \
|
| 543 |
+
(option) == CURLOPT_RESOLVE || \
|
| 544 |
+
(option) == CURLOPT_TELNETOPTIONS || \
|
| 545 |
+
(option) == CURLOPT_CONNECT_TO || \
|
| 546 |
+
0)
|
| 547 |
+
|
| 548 |
+
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
| 549 |
+
|
| 550 |
+
/* evaluates to true if info expects a pointer to char * argument */
|
| 551 |
+
#define curlcheck_string_info(info) \
|
| 552 |
+
(CURLINFO_STRING < (info) && (info) < CURLINFO_LONG && \
|
| 553 |
+
(info) != CURLINFO_PRIVATE)
|
| 554 |
+
|
| 555 |
+
/* evaluates to true if info expects a pointer to long argument */
|
| 556 |
+
#define curlcheck_long_info(info) \
|
| 557 |
+
(CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
|
| 558 |
+
|
| 559 |
+
/* evaluates to true if info expects a pointer to double argument */
|
| 560 |
+
#define curlcheck_double_info(info) \
|
| 561 |
+
(CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
|
| 562 |
+
|
| 563 |
+
/* true if info expects a pointer to struct curl_slist * argument */
|
| 564 |
+
#define curlcheck_slist_info(info) \
|
| 565 |
+
(((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
|
| 566 |
+
|
| 567 |
+
/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
|
| 568 |
+
#define curlcheck_tlssessioninfo_info(info) \
|
| 569 |
+
(((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
|
| 570 |
+
|
| 571 |
+
/* true if info expects a pointer to struct curl_certinfo * argument */
|
| 572 |
+
#define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
|
| 573 |
+
|
| 574 |
+
/* true if info expects a pointer to struct curl_socket_t argument */
|
| 575 |
+
#define curlcheck_socket_info(info) \
|
| 576 |
+
(CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T)
|
| 577 |
+
|
| 578 |
+
/* true if info expects a pointer to curl_off_t argument */
|
| 579 |
+
#define curlcheck_off_t_info(info) \
|
| 580 |
+
(CURLINFO_OFF_T < (info))
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
/* typecheck helpers -- check whether given expression has requested type */
|
| 584 |
+
|
| 585 |
+
/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
|
| 586 |
+
* otherwise define a new macro. Search for __builtin_types_compatible_p
|
| 587 |
+
* in the GCC manual.
|
| 588 |
+
* NOTE: these macros MUST NOT EVALUATE their arguments! The argument is
|
| 589 |
+
* the actual expression passed to the curl_easy_setopt macro. This
|
| 590 |
+
* means that you can only apply the sizeof and __typeof__ operators, no
|
| 591 |
+
* == or whatsoever.
|
| 592 |
+
*/
|
| 593 |
+
|
| 594 |
+
/* XXX: should evaluate to true if expr is a pointer */
|
| 595 |
+
#define curlcheck_any_ptr(expr) \
|
| 596 |
+
(sizeof(expr) == sizeof(void *))
|
| 597 |
+
|
| 598 |
+
/* evaluates to true if expr is NULL */
|
| 599 |
+
/* XXX: must not evaluate expr, so this check is not accurate */
|
| 600 |
+
#define curlcheck_NULL(expr) \
|
| 601 |
+
(__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL)))
|
| 602 |
+
|
| 603 |
+
/* evaluates to true if expr is type*, const type* or NULL */
|
| 604 |
+
#define curlcheck_ptr(expr, type) \
|
| 605 |
+
(curlcheck_NULL(expr) || \
|
| 606 |
+
__builtin_types_compatible_p(__typeof__(expr), type *) || \
|
| 607 |
+
__builtin_types_compatible_p(__typeof__(expr), const type *))
|
| 608 |
+
|
| 609 |
+
/* evaluates to true if expr is type**, const type** or NULL */
|
| 610 |
+
#define curlcheck_ptrptr(expr, type) \
|
| 611 |
+
(curlcheck_NULL(expr) || \
|
| 612 |
+
__builtin_types_compatible_p(__typeof__(expr), type **) || \
|
| 613 |
+
__builtin_types_compatible_p(__typeof__(expr), type *[]) || \
|
| 614 |
+
__builtin_types_compatible_p(__typeof__(expr), const type *[]) || \
|
| 615 |
+
__builtin_types_compatible_p(__typeof__(expr), const type **))
|
| 616 |
+
|
| 617 |
+
/* evaluates to true if expr is one of type[], type*, NULL or const type* */
|
| 618 |
+
#define curlcheck_arr(expr, type) \
|
| 619 |
+
(curlcheck_ptr((expr), type) || \
|
| 620 |
+
__builtin_types_compatible_p(__typeof__(expr), type []))
|
| 621 |
+
|
| 622 |
+
/* evaluates to true if expr is a string */
|
| 623 |
+
#define curlcheck_string(expr) \
|
| 624 |
+
(curlcheck_arr((expr), char) || \
|
| 625 |
+
curlcheck_arr((expr), signed char) || \
|
| 626 |
+
curlcheck_arr((expr), unsigned char))
|
| 627 |
+
|
| 628 |
+
/* evaluates to true if expr is a CURL * */
|
| 629 |
+
#define curlcheck_curl(expr) \
|
| 630 |
+
(curlcheck_NULL(expr) || \
|
| 631 |
+
__builtin_types_compatible_p(__typeof__(expr), CURL *))
|
| 632 |
+
|
| 633 |
+
|
| 634 |
+
/* evaluates to true if expr is a long (no matter the signedness)
|
| 635 |
+
* XXX: for now, int is also accepted (and therefore short and char, which
|
| 636 |
+
* are promoted to int when passed to a variadic function) */
|
| 637 |
+
#define curlcheck_long(expr) \
|
| 638 |
+
( \
|
| 639 |
+
((sizeof(long) != sizeof(int)) && \
|
| 640 |
+
(__builtin_types_compatible_p(__typeof__(expr), long) || \
|
| 641 |
+
__builtin_types_compatible_p(__typeof__(expr), signed long) || \
|
| 642 |
+
__builtin_types_compatible_p(__typeof__(expr), unsigned long))) \
|
| 643 |
+
|| \
|
| 644 |
+
((sizeof(long) == sizeof(int)) && \
|
| 645 |
+
(__builtin_types_compatible_p(__typeof__(expr), long) || \
|
| 646 |
+
__builtin_types_compatible_p(__typeof__(expr), signed long) || \
|
| 647 |
+
__builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
|
| 648 |
+
__builtin_types_compatible_p(__typeof__(expr), int) || \
|
| 649 |
+
__builtin_types_compatible_p(__typeof__(expr), signed int) || \
|
| 650 |
+
__builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
|
| 651 |
+
__builtin_types_compatible_p(__typeof__(expr), short) || \
|
| 652 |
+
__builtin_types_compatible_p(__typeof__(expr), signed short) || \
|
| 653 |
+
__builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
|
| 654 |
+
__builtin_types_compatible_p(__typeof__(expr), char) || \
|
| 655 |
+
__builtin_types_compatible_p(__typeof__(expr), signed char) || \
|
| 656 |
+
__builtin_types_compatible_p(__typeof__(expr), unsigned char))) \
|
| 657 |
+
)
|
| 658 |
+
|
| 659 |
+
/* evaluates to true if expr is of type curl_off_t */
|
| 660 |
+
#define curlcheck_off_t(expr) \
|
| 661 |
+
(__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
|
| 662 |
+
|
| 663 |
+
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
|
| 664 |
+
/* XXX: also check size of an char[] array? */
|
| 665 |
+
#define curlcheck_error_buffer(expr) \
|
| 666 |
+
(curlcheck_NULL(expr) || \
|
| 667 |
+
__builtin_types_compatible_p(__typeof__(expr), char *) || \
|
| 668 |
+
__builtin_types_compatible_p(__typeof__(expr), char[]))
|
| 669 |
+
|
| 670 |
+
/* evaluates to true if expr is of type (const) void* or (const) FILE* */
|
| 671 |
+
#if 0
|
| 672 |
+
#define curlcheck_cb_data(expr) \
|
| 673 |
+
(curlcheck_ptr((expr), void) || \
|
| 674 |
+
curlcheck_ptr((expr), FILE))
|
| 675 |
+
#else /* be less strict */
|
| 676 |
+
#define curlcheck_cb_data(expr) \
|
| 677 |
+
curlcheck_any_ptr(expr)
|
| 678 |
+
#endif
|
| 679 |
+
|
| 680 |
+
/* evaluates to true if expr is of type FILE* */
|
| 681 |
+
#define curlcheck_FILE(expr) \
|
| 682 |
+
(curlcheck_NULL(expr) || \
|
| 683 |
+
(__builtin_types_compatible_p(__typeof__(expr), FILE *)))
|
| 684 |
+
|
| 685 |
+
/* evaluates to true if expr can be passed as POST data (void* or char*) */
|
| 686 |
+
#define curlcheck_postfields(expr) \
|
| 687 |
+
(curlcheck_ptr((expr), void) || \
|
| 688 |
+
curlcheck_arr((expr), char) || \
|
| 689 |
+
curlcheck_arr((expr), unsigned char))
|
| 690 |
+
|
| 691 |
+
/* helper: __builtin_types_compatible_p distinguishes between functions and
|
| 692 |
+
* function pointers, hide it */
|
| 693 |
+
#define curlcheck_cb_compatible(func, type) \
|
| 694 |
+
(__builtin_types_compatible_p(__typeof__(func), type) || \
|
| 695 |
+
__builtin_types_compatible_p(__typeof__(func) *, type))
|
| 696 |
+
|
| 697 |
+
/* evaluates to true if expr is of type curl_resolver_start_callback */
|
| 698 |
+
#define curlcheck_resolver_start_callback(expr) \
|
| 699 |
+
(curlcheck_NULL(expr) || \
|
| 700 |
+
curlcheck_cb_compatible((expr), curl_resolver_start_callback))
|
| 701 |
+
|
| 702 |
+
/* evaluates to true if expr is of type curl_read_callback or "similar" */
|
| 703 |
+
#define curlcheck_read_cb(expr) \
|
| 704 |
+
(curlcheck_NULL(expr) || \
|
| 705 |
+
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
|
| 706 |
+
curlcheck_cb_compatible((expr), curl_read_callback) || \
|
| 707 |
+
curlcheck_cb_compatible((expr), _curl_read_callback1) || \
|
| 708 |
+
curlcheck_cb_compatible((expr), _curl_read_callback2) || \
|
| 709 |
+
curlcheck_cb_compatible((expr), _curl_read_callback3) || \
|
| 710 |
+
curlcheck_cb_compatible((expr), _curl_read_callback4) || \
|
| 711 |
+
curlcheck_cb_compatible((expr), _curl_read_callback5) || \
|
| 712 |
+
curlcheck_cb_compatible((expr), _curl_read_callback6))
|
| 713 |
+
typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *);
|
| 714 |
+
typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *);
|
| 715 |
+
typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *);
|
| 716 |
+
typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *);
|
| 717 |
+
typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *);
|
| 718 |
+
typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *);
|
| 719 |
+
|
| 720 |
+
/* evaluates to true if expr is of type curl_write_callback or "similar" */
|
| 721 |
+
#define curlcheck_write_cb(expr) \
|
| 722 |
+
(curlcheck_read_cb(expr) || \
|
| 723 |
+
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
|
| 724 |
+
curlcheck_cb_compatible((expr), curl_write_callback) || \
|
| 725 |
+
curlcheck_cb_compatible((expr), _curl_write_callback1) || \
|
| 726 |
+
curlcheck_cb_compatible((expr), _curl_write_callback2) || \
|
| 727 |
+
curlcheck_cb_compatible((expr), _curl_write_callback3) || \
|
| 728 |
+
curlcheck_cb_compatible((expr), _curl_write_callback4) || \
|
| 729 |
+
curlcheck_cb_compatible((expr), _curl_write_callback5) || \
|
| 730 |
+
curlcheck_cb_compatible((expr), _curl_write_callback6))
|
| 731 |
+
typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *);
|
| 732 |
+
typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t,
|
| 733 |
+
const void *);
|
| 734 |
+
typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *);
|
| 735 |
+
typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *);
|
| 736 |
+
typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t,
|
| 737 |
+
const void *);
|
| 738 |
+
typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *);
|
| 739 |
+
|
| 740 |
+
/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
|
| 741 |
+
#define curlcheck_ioctl_cb(expr) \
|
| 742 |
+
(curlcheck_NULL(expr) || \
|
| 743 |
+
curlcheck_cb_compatible((expr), curl_ioctl_callback) || \
|
| 744 |
+
curlcheck_cb_compatible((expr), _curl_ioctl_callback1) || \
|
| 745 |
+
curlcheck_cb_compatible((expr), _curl_ioctl_callback2) || \
|
| 746 |
+
curlcheck_cb_compatible((expr), _curl_ioctl_callback3) || \
|
| 747 |
+
curlcheck_cb_compatible((expr), _curl_ioctl_callback4))
|
| 748 |
+
typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *);
|
| 749 |
+
typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *);
|
| 750 |
+
typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *);
|
| 751 |
+
typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *);
|
| 752 |
+
|
| 753 |
+
/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */
|
| 754 |
+
#define curlcheck_sockopt_cb(expr) \
|
| 755 |
+
(curlcheck_NULL(expr) || \
|
| 756 |
+
curlcheck_cb_compatible((expr), curl_sockopt_callback) || \
|
| 757 |
+
curlcheck_cb_compatible((expr), _curl_sockopt_callback1) || \
|
| 758 |
+
curlcheck_cb_compatible((expr), _curl_sockopt_callback2))
|
| 759 |
+
typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
|
| 760 |
+
typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t,
|
| 761 |
+
curlsocktype);
|
| 762 |
+
|
| 763 |
+
/* evaluates to true if expr is of type curl_opensocket_callback or
|
| 764 |
+
"similar" */
|
| 765 |
+
#define curlcheck_opensocket_cb(expr) \
|
| 766 |
+
(curlcheck_NULL(expr) || \
|
| 767 |
+
curlcheck_cb_compatible((expr), curl_opensocket_callback) || \
|
| 768 |
+
curlcheck_cb_compatible((expr), _curl_opensocket_callback1) || \
|
| 769 |
+
curlcheck_cb_compatible((expr), _curl_opensocket_callback2) || \
|
| 770 |
+
curlcheck_cb_compatible((expr), _curl_opensocket_callback3) || \
|
| 771 |
+
curlcheck_cb_compatible((expr), _curl_opensocket_callback4))
|
| 772 |
+
typedef curl_socket_t (*_curl_opensocket_callback1)
|
| 773 |
+
(void *, curlsocktype, struct curl_sockaddr *);
|
| 774 |
+
typedef curl_socket_t (*_curl_opensocket_callback2)
|
| 775 |
+
(void *, curlsocktype, const struct curl_sockaddr *);
|
| 776 |
+
typedef curl_socket_t (*_curl_opensocket_callback3)
|
| 777 |
+
(const void *, curlsocktype, struct curl_sockaddr *);
|
| 778 |
+
typedef curl_socket_t (*_curl_opensocket_callback4)
|
| 779 |
+
(const void *, curlsocktype, const struct curl_sockaddr *);
|
| 780 |
+
|
| 781 |
+
/* evaluates to true if expr is of type curl_progress_callback or "similar" */
|
| 782 |
+
#define curlcheck_progress_cb(expr) \
|
| 783 |
+
(curlcheck_NULL(expr) || \
|
| 784 |
+
curlcheck_cb_compatible((expr), curl_progress_callback) || \
|
| 785 |
+
curlcheck_cb_compatible((expr), _curl_progress_callback1) || \
|
| 786 |
+
curlcheck_cb_compatible((expr), _curl_progress_callback2))
|
| 787 |
+
typedef int (*_curl_progress_callback1)(void *,
|
| 788 |
+
double, double, double, double);
|
| 789 |
+
typedef int (*_curl_progress_callback2)(const void *,
|
| 790 |
+
double, double, double, double);
|
| 791 |
+
|
| 792 |
+
/* evaluates to true if expr is of type curl_xferinfo_callback */
|
| 793 |
+
#define curlcheck_xferinfo_cb(expr) \
|
| 794 |
+
(curlcheck_NULL(expr) || \
|
| 795 |
+
curlcheck_cb_compatible((expr), curl_xferinfo_callback))
|
| 796 |
+
|
| 797 |
+
/* evaluates to true if expr is of type curl_debug_callback or "similar" */
|
| 798 |
+
#define curlcheck_debug_cb(expr) \
|
| 799 |
+
(curlcheck_NULL(expr) || \
|
| 800 |
+
curlcheck_cb_compatible((expr), curl_debug_callback) || \
|
| 801 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback1) || \
|
| 802 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback2) || \
|
| 803 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback3) || \
|
| 804 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback4) || \
|
| 805 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback5) || \
|
| 806 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback6) || \
|
| 807 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback7) || \
|
| 808 |
+
curlcheck_cb_compatible((expr), _curl_debug_callback8))
|
| 809 |
+
typedef int (*_curl_debug_callback1) (CURL *,
|
| 810 |
+
curl_infotype, char *, size_t, void *);
|
| 811 |
+
typedef int (*_curl_debug_callback2) (CURL *,
|
| 812 |
+
curl_infotype, char *, size_t, const void *);
|
| 813 |
+
typedef int (*_curl_debug_callback3) (CURL *,
|
| 814 |
+
curl_infotype, const char *, size_t, void *);
|
| 815 |
+
typedef int (*_curl_debug_callback4) (CURL *,
|
| 816 |
+
curl_infotype, const char *, size_t, const void *);
|
| 817 |
+
typedef int (*_curl_debug_callback5) (CURL *,
|
| 818 |
+
curl_infotype, unsigned char *, size_t, void *);
|
| 819 |
+
typedef int (*_curl_debug_callback6) (CURL *,
|
| 820 |
+
curl_infotype, unsigned char *, size_t, const void *);
|
| 821 |
+
typedef int (*_curl_debug_callback7) (CURL *,
|
| 822 |
+
curl_infotype, const unsigned char *, size_t, void *);
|
| 823 |
+
typedef int (*_curl_debug_callback8) (CURL *,
|
| 824 |
+
curl_infotype, const unsigned char *, size_t, const void *);
|
| 825 |
+
|
| 826 |
+
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
|
| 827 |
+
/* this is getting even messier... */
|
| 828 |
+
#define curlcheck_ssl_ctx_cb(expr) \
|
| 829 |
+
(curlcheck_NULL(expr) || \
|
| 830 |
+
curlcheck_cb_compatible((expr), curl_ssl_ctx_callback) || \
|
| 831 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback1) || \
|
| 832 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback2) || \
|
| 833 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback3) || \
|
| 834 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback4) || \
|
| 835 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback5) || \
|
| 836 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback6) || \
|
| 837 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback7) || \
|
| 838 |
+
curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback8))
|
| 839 |
+
typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *);
|
| 840 |
+
typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *);
|
| 841 |
+
typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *);
|
| 842 |
+
typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *,
|
| 843 |
+
const void *);
|
| 844 |
+
#ifdef HEADER_SSL_H
|
| 845 |
+
/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
|
| 846 |
+
* this will of course break if we are included before OpenSSL headers...
|
| 847 |
+
*/
|
| 848 |
+
typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX *, void *);
|
| 849 |
+
typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX *, const void *);
|
| 850 |
+
typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX *, void *);
|
| 851 |
+
typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX *,
|
| 852 |
+
const void *);
|
| 853 |
+
#else
|
| 854 |
+
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
|
| 855 |
+
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
|
| 856 |
+
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;
|
| 857 |
+
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;
|
| 858 |
+
#endif
|
| 859 |
+
|
| 860 |
+
/* evaluates to true if expr is of type curl_conv_callback or "similar" */
|
| 861 |
+
#define curlcheck_conv_cb(expr) \
|
| 862 |
+
(curlcheck_NULL(expr) || \
|
| 863 |
+
curlcheck_cb_compatible((expr), curl_conv_callback) || \
|
| 864 |
+
curlcheck_cb_compatible((expr), _curl_conv_callback1) || \
|
| 865 |
+
curlcheck_cb_compatible((expr), _curl_conv_callback2) || \
|
| 866 |
+
curlcheck_cb_compatible((expr), _curl_conv_callback3) || \
|
| 867 |
+
curlcheck_cb_compatible((expr), _curl_conv_callback4))
|
| 868 |
+
typedef CURLcode (*_curl_conv_callback1)(char *, size_t length);
|
| 869 |
+
typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);
|
| 870 |
+
typedef CURLcode (*_curl_conv_callback3)(void *, size_t length);
|
| 871 |
+
typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);
|
| 872 |
+
|
| 873 |
+
/* evaluates to true if expr is of type curl_seek_callback or "similar" */
|
| 874 |
+
#define curlcheck_seek_cb(expr) \
|
| 875 |
+
(curlcheck_NULL(expr) || \
|
| 876 |
+
curlcheck_cb_compatible((expr), curl_seek_callback) || \
|
| 877 |
+
curlcheck_cb_compatible((expr), _curl_seek_callback1) || \
|
| 878 |
+
curlcheck_cb_compatible((expr), _curl_seek_callback2))
|
| 879 |
+
typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
|
| 880 |
+
typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
|
| 881 |
+
|
| 882 |
+
/* evaluates to true if expr is of type curl_chunk_bgn_callback */
|
| 883 |
+
#define curlcheck_chunk_bgn_cb(expr) \
|
| 884 |
+
(curlcheck_NULL(expr) || \
|
| 885 |
+
curlcheck_cb_compatible((expr), curl_chunk_bgn_callback) || \
|
| 886 |
+
curlcheck_cb_compatible((expr), _curl_chunk_bgn_callback1) || \
|
| 887 |
+
curlcheck_cb_compatible((expr), _curl_chunk_bgn_callback2))
|
| 888 |
+
typedef long (*_curl_chunk_bgn_callback1)(struct curl_fileinfo *,
|
| 889 |
+
void *, int);
|
| 890 |
+
typedef long (*_curl_chunk_bgn_callback2)(void *, void *, int);
|
| 891 |
+
|
| 892 |
+
/* evaluates to true if expr is of type curl_chunk_end_callback */
|
| 893 |
+
#define curlcheck_chunk_end_cb(expr) \
|
| 894 |
+
(curlcheck_NULL(expr) || \
|
| 895 |
+
curlcheck_cb_compatible((expr), curl_chunk_end_callback))
|
| 896 |
+
|
| 897 |
+
/* evaluates to true if expr is of type curl_closesocket_callback */
|
| 898 |
+
#define curlcheck_close_socket_cb(expr) \
|
| 899 |
+
(curlcheck_NULL(expr) || \
|
| 900 |
+
curlcheck_cb_compatible((expr), curl_closesocket_callback))
|
| 901 |
+
|
| 902 |
+
/* evaluates to true if expr is of type curl_fnmatch_callback */
|
| 903 |
+
#define curlcheck_fnmatch_cb(expr) \
|
| 904 |
+
(curlcheck_NULL(expr) || \
|
| 905 |
+
curlcheck_cb_compatible((expr), curl_fnmatch_callback))
|
| 906 |
+
|
| 907 |
+
/* evaluates to true if expr is of type curl_hstsread_callback */
|
| 908 |
+
#define curlcheck_hstsread_cb(expr) \
|
| 909 |
+
(curlcheck_NULL(expr) || \
|
| 910 |
+
curlcheck_cb_compatible((expr), curl_hstsread_callback))
|
| 911 |
+
|
| 912 |
+
/* evaluates to true if expr is of type curl_hstswrite_callback */
|
| 913 |
+
#define curlcheck_hstswrite_cb(expr) \
|
| 914 |
+
(curlcheck_NULL(expr) || \
|
| 915 |
+
curlcheck_cb_compatible((expr), curl_hstswrite_callback))
|
| 916 |
+
|
| 917 |
+
/* evaluates to true if expr is of type curl_sshhostkeycallback */
|
| 918 |
+
#define curlcheck_ssh_hostkey_cb(expr) \
|
| 919 |
+
(curlcheck_NULL(expr) || \
|
| 920 |
+
curlcheck_cb_compatible((expr), curl_sshhostkeycallback))
|
| 921 |
+
|
| 922 |
+
/* evaluates to true if expr is of type curl_sshkeycallback */
|
| 923 |
+
#define curlcheck_ssh_key_cb(expr) \
|
| 924 |
+
(curlcheck_NULL(expr) || \
|
| 925 |
+
curlcheck_cb_compatible((expr), curl_sshkeycallback))
|
| 926 |
+
|
| 927 |
+
/* evaluates to true if expr is of type curl_interleave_callback */
|
| 928 |
+
#define curlcheck_interleave_cb(expr) \
|
| 929 |
+
(curlcheck_NULL(expr) || \
|
| 930 |
+
curlcheck_cb_compatible((expr), _curl_interleave_callback1) || \
|
| 931 |
+
curlcheck_cb_compatible((expr), _curl_interleave_callback2))
|
| 932 |
+
typedef size_t (*_curl_interleave_callback1)(void *p, size_t s,
|
| 933 |
+
size_t n, void *u);
|
| 934 |
+
typedef size_t (*_curl_interleave_callback2)(char *p, size_t s,
|
| 935 |
+
size_t n, void *u);
|
| 936 |
+
|
| 937 |
+
/* evaluates to true if expr is of type curl_prereq_callback */
|
| 938 |
+
#define curlcheck_prereq_cb(expr) \
|
| 939 |
+
(curlcheck_NULL(expr) || \
|
| 940 |
+
curlcheck_cb_compatible((expr), curl_prereq_callback))
|
| 941 |
+
|
| 942 |
+
/* evaluates to true if expr is of type curl_trailer_callback */
|
| 943 |
+
#define curlcheck_trailer_cb(expr) \
|
| 944 |
+
(curlcheck_NULL(expr) || \
|
| 945 |
+
curlcheck_cb_compatible((expr), curl_trailer_callback))
|
| 946 |
+
|
| 947 |
+
#endif /* CURLINC_TYPECHECK_GCC_H */
|
data/miniconda3/include/curl/urlapi.h
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_URLAPI_H
|
| 2 |
+
#define CURLINC_URLAPI_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#include "curl.h"
|
| 28 |
+
|
| 29 |
+
#ifdef __cplusplus
|
| 30 |
+
extern "C" {
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
/* the error codes for the URL API */
|
| 34 |
+
typedef enum {
|
| 35 |
+
CURLUE_OK,
|
| 36 |
+
CURLUE_BAD_HANDLE, /* 1 */
|
| 37 |
+
CURLUE_BAD_PARTPOINTER, /* 2 */
|
| 38 |
+
CURLUE_MALFORMED_INPUT, /* 3 */
|
| 39 |
+
CURLUE_BAD_PORT_NUMBER, /* 4 */
|
| 40 |
+
CURLUE_UNSUPPORTED_SCHEME, /* 5 */
|
| 41 |
+
CURLUE_URLDECODE, /* 6 */
|
| 42 |
+
CURLUE_OUT_OF_MEMORY, /* 7 */
|
| 43 |
+
CURLUE_USER_NOT_ALLOWED, /* 8 */
|
| 44 |
+
CURLUE_UNKNOWN_PART, /* 9 */
|
| 45 |
+
CURLUE_NO_SCHEME, /* 10 */
|
| 46 |
+
CURLUE_NO_USER, /* 11 */
|
| 47 |
+
CURLUE_NO_PASSWORD, /* 12 */
|
| 48 |
+
CURLUE_NO_OPTIONS, /* 13 */
|
| 49 |
+
CURLUE_NO_HOST, /* 14 */
|
| 50 |
+
CURLUE_NO_PORT, /* 15 */
|
| 51 |
+
CURLUE_NO_QUERY, /* 16 */
|
| 52 |
+
CURLUE_NO_FRAGMENT, /* 17 */
|
| 53 |
+
CURLUE_NO_ZONEID, /* 18 */
|
| 54 |
+
CURLUE_BAD_FILE_URL, /* 19 */
|
| 55 |
+
CURLUE_BAD_FRAGMENT, /* 20 */
|
| 56 |
+
CURLUE_BAD_HOSTNAME, /* 21 */
|
| 57 |
+
CURLUE_BAD_IPV6, /* 22 */
|
| 58 |
+
CURLUE_BAD_LOGIN, /* 23 */
|
| 59 |
+
CURLUE_BAD_PASSWORD, /* 24 */
|
| 60 |
+
CURLUE_BAD_PATH, /* 25 */
|
| 61 |
+
CURLUE_BAD_QUERY, /* 26 */
|
| 62 |
+
CURLUE_BAD_SCHEME, /* 27 */
|
| 63 |
+
CURLUE_BAD_SLASHES, /* 28 */
|
| 64 |
+
CURLUE_BAD_USER, /* 29 */
|
| 65 |
+
CURLUE_LACKS_IDN, /* 30 */
|
| 66 |
+
CURLUE_TOO_LARGE, /* 31 */
|
| 67 |
+
CURLUE_LAST
|
| 68 |
+
} CURLUcode;
|
| 69 |
+
|
| 70 |
+
typedef enum {
|
| 71 |
+
CURLUPART_URL,
|
| 72 |
+
CURLUPART_SCHEME,
|
| 73 |
+
CURLUPART_USER,
|
| 74 |
+
CURLUPART_PASSWORD,
|
| 75 |
+
CURLUPART_OPTIONS,
|
| 76 |
+
CURLUPART_HOST,
|
| 77 |
+
CURLUPART_PORT,
|
| 78 |
+
CURLUPART_PATH,
|
| 79 |
+
CURLUPART_QUERY,
|
| 80 |
+
CURLUPART_FRAGMENT,
|
| 81 |
+
CURLUPART_ZONEID /* added in 7.65.0 */
|
| 82 |
+
} CURLUPart;
|
| 83 |
+
|
| 84 |
+
#define CURLU_DEFAULT_PORT (1<<0) /* return default port number */
|
| 85 |
+
#define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set,
|
| 86 |
+
if the port number matches the
|
| 87 |
+
default for the scheme */
|
| 88 |
+
#define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if
|
| 89 |
+
missing */
|
| 90 |
+
#define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */
|
| 91 |
+
#define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */
|
| 92 |
+
#define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */
|
| 93 |
+
#define CURLU_URLDECODE (1<<6) /* URL decode on get */
|
| 94 |
+
#define CURLU_URLENCODE (1<<7) /* URL encode on set */
|
| 95 |
+
#define CURLU_APPENDQUERY (1<<8) /* append a form style part */
|
| 96 |
+
#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */
|
| 97 |
+
#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
|
| 98 |
+
scheme is unknown. */
|
| 99 |
+
#define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */
|
| 100 |
+
#define CURLU_PUNYCODE (1<<12) /* get the hostname in punycode */
|
| 101 |
+
#define CURLU_PUNY2IDN (1<<13) /* punycode => IDN conversion */
|
| 102 |
+
#define CURLU_GET_EMPTY (1<<14) /* allow empty queries and fragments
|
| 103 |
+
when extracting the URL or the
|
| 104 |
+
components */
|
| 105 |
+
#define CURLU_NO_GUESS_SCHEME (1<<15) /* for get, do not accept a guess */
|
| 106 |
+
|
| 107 |
+
typedef struct Curl_URL CURLU;
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* curl_url() creates a new CURLU handle and returns a pointer to it.
|
| 111 |
+
* Must be freed with curl_url_cleanup().
|
| 112 |
+
*/
|
| 113 |
+
CURL_EXTERN CURLU *curl_url(void);
|
| 114 |
+
|
| 115 |
+
/*
|
| 116 |
+
* curl_url_cleanup() frees the CURLU handle and related resources used for
|
| 117 |
+
* the URL parsing. It will not free strings previously returned with the URL
|
| 118 |
+
* API.
|
| 119 |
+
*/
|
| 120 |
+
CURL_EXTERN void curl_url_cleanup(CURLU *handle);
|
| 121 |
+
|
| 122 |
+
/*
|
| 123 |
+
* curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
|
| 124 |
+
* handle must also be freed with curl_url_cleanup().
|
| 125 |
+
*/
|
| 126 |
+
CURL_EXTERN CURLU *curl_url_dup(const CURLU *in);
|
| 127 |
+
|
| 128 |
+
/*
|
| 129 |
+
* curl_url_get() extracts a specific part of the URL from a CURLU
|
| 130 |
+
* handle. Returns error code. The returned pointer MUST be freed with
|
| 131 |
+
* curl_free() afterwards.
|
| 132 |
+
*/
|
| 133 |
+
CURL_EXTERN CURLUcode curl_url_get(const CURLU *handle, CURLUPart what,
|
| 134 |
+
char **part, unsigned int flags);
|
| 135 |
+
|
| 136 |
+
/*
|
| 137 |
+
* curl_url_set() sets a specific part of the URL in a CURLU handle. Returns
|
| 138 |
+
* error code. The passed in string will be copied. Passing a NULL instead of
|
| 139 |
+
* a part string, clears that part.
|
| 140 |
+
*/
|
| 141 |
+
CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what,
|
| 142 |
+
const char *part, unsigned int flags);
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* curl_url_strerror() turns a CURLUcode value into the equivalent human
|
| 146 |
+
* readable error string. This is useful for printing meaningful error
|
| 147 |
+
* messages.
|
| 148 |
+
*/
|
| 149 |
+
CURL_EXTERN const char *curl_url_strerror(CURLUcode);
|
| 150 |
+
|
| 151 |
+
#ifdef __cplusplus
|
| 152 |
+
} /* end of extern "C" */
|
| 153 |
+
#endif
|
| 154 |
+
|
| 155 |
+
#endif /* CURLINC_URLAPI_H */
|
data/miniconda3/include/curl/websockets.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CURLINC_WEBSOCKETS_H
|
| 2 |
+
#define CURLINC_WEBSOCKETS_H
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
* _ _ ____ _
|
| 5 |
+
* Project ___| | | | _ \| |
|
| 6 |
+
* / __| | | | |_) | |
|
| 7 |
+
* | (__| |_| | _ <| |___
|
| 8 |
+
* \___|\___/|_| \_\_____|
|
| 9 |
+
*
|
| 10 |
+
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
| 11 |
+
*
|
| 12 |
+
* This software is licensed as described in the file COPYING, which
|
| 13 |
+
* you should have received as part of this distribution. The terms
|
| 14 |
+
* are also available at https://curl.se/docs/copyright.html.
|
| 15 |
+
*
|
| 16 |
+
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
| 17 |
+
* copies of the Software, and permit persons to whom the Software is
|
| 18 |
+
* furnished to do so, under the terms of the COPYING file.
|
| 19 |
+
*
|
| 20 |
+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
| 21 |
+
* KIND, either express or implied.
|
| 22 |
+
*
|
| 23 |
+
* SPDX-License-Identifier: curl
|
| 24 |
+
*
|
| 25 |
+
***************************************************************************/
|
| 26 |
+
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
struct curl_ws_frame {
|
| 32 |
+
int age; /* zero */
|
| 33 |
+
int flags; /* See the CURLWS_* defines */
|
| 34 |
+
curl_off_t offset; /* the offset of this data into the frame */
|
| 35 |
+
curl_off_t bytesleft; /* number of pending bytes left of the payload */
|
| 36 |
+
size_t len; /* size of the current data chunk */
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
/* flag bits */
|
| 40 |
+
#define CURLWS_TEXT (1<<0)
|
| 41 |
+
#define CURLWS_BINARY (1<<1)
|
| 42 |
+
#define CURLWS_CONT (1<<2)
|
| 43 |
+
#define CURLWS_CLOSE (1<<3)
|
| 44 |
+
#define CURLWS_PING (1<<4)
|
| 45 |
+
#define CURLWS_OFFSET (1<<5)
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* NAME curl_ws_recv()
|
| 49 |
+
*
|
| 50 |
+
* DESCRIPTION
|
| 51 |
+
*
|
| 52 |
+
* Receives data from the websocket connection. Use after successful
|
| 53 |
+
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
| 54 |
+
*/
|
| 55 |
+
CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
|
| 56 |
+
size_t *recv,
|
| 57 |
+
const struct curl_ws_frame **metap);
|
| 58 |
+
|
| 59 |
+
/* flags for curl_ws_send() */
|
| 60 |
+
#define CURLWS_PONG (1<<6)
|
| 61 |
+
|
| 62 |
+
/*
|
| 63 |
+
* NAME curl_ws_send()
|
| 64 |
+
*
|
| 65 |
+
* DESCRIPTION
|
| 66 |
+
*
|
| 67 |
+
* Sends data over the websocket connection. Use after successful
|
| 68 |
+
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
| 69 |
+
*/
|
| 70 |
+
CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer,
|
| 71 |
+
size_t buflen, size_t *sent,
|
| 72 |
+
curl_off_t fragsize,
|
| 73 |
+
unsigned int flags);
|
| 74 |
+
|
| 75 |
+
/*
|
| 76 |
+
* NAME curl_ws_start_frame()
|
| 77 |
+
*
|
| 78 |
+
* DESCRIPTION
|
| 79 |
+
*
|
| 80 |
+
* Buffers a websocket frame header with the given flags and length.
|
| 81 |
+
* Errors when a previous frame is not complete, e.g. not all its
|
| 82 |
+
* payload has been added.
|
| 83 |
+
*/
|
| 84 |
+
CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
|
| 85 |
+
unsigned int flags,
|
| 86 |
+
curl_off_t frame_len);
|
| 87 |
+
|
| 88 |
+
/* bits for the CURLOPT_WS_OPTIONS bitmask: */
|
| 89 |
+
#define CURLWS_RAW_MODE (1L<<0)
|
| 90 |
+
#define CURLWS_NOAUTOPONG (1L<<1)
|
| 91 |
+
|
| 92 |
+
CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl);
|
| 93 |
+
|
| 94 |
+
#ifdef __cplusplus
|
| 95 |
+
}
|
| 96 |
+
#endif
|
| 97 |
+
|
| 98 |
+
#endif /* CURLINC_WEBSOCKETS_H */
|
data/miniconda3/include/ncursesw/curses.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/miniconda3/include/ncursesw/cursesapp.h
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2019-2020,2021 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2005,2011 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: cursesapp.h,v 1.18 2021/06/17 21:26:02 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_CURSESAPP_H_incl
|
| 38 |
+
#define NCURSES_CURSESAPP_H_incl
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/cursslk.h>
|
| 41 |
+
|
| 42 |
+
#if (defined(_WIN32) || defined(_WIN64))
|
| 43 |
+
# define NCURSES_CXX_MAIN_NAME cursespp_main
|
| 44 |
+
# define NCURSES_CXX_MAIN \
|
| 45 |
+
int main(int argc, char *argv[]) { \
|
| 46 |
+
return NCURSES_CXX_MAIN_NAME(argc, argv); \
|
| 47 |
+
}
|
| 48 |
+
#else
|
| 49 |
+
# define NCURSES_CXX_MAIN_NAME main
|
| 50 |
+
#endif
|
| 51 |
+
NCURSES_CXX_IMPEXP int NCURSES_CXX_MAIN_NAME(int argc, char *argv[]);
|
| 52 |
+
|
| 53 |
+
class NCURSES_CXX_IMPEXP NCursesApplication {
|
| 54 |
+
public:
|
| 55 |
+
typedef struct _slk_link { // This structure is used to maintain
|
| 56 |
+
struct _slk_link* prev; // a stack of SLKs
|
| 57 |
+
Soft_Label_Key_Set* SLKs;
|
| 58 |
+
} SLK_Link;
|
| 59 |
+
private:
|
| 60 |
+
static int rinit(NCursesWindow& w); // Internal Init function for title
|
| 61 |
+
static NCursesApplication* theApp; // Global ref. to the application
|
| 62 |
+
|
| 63 |
+
static SLK_Link* slk_stack;
|
| 64 |
+
|
| 65 |
+
protected:
|
| 66 |
+
static NCursesWindow* titleWindow; // The Title Window (if any)
|
| 67 |
+
|
| 68 |
+
bool b_Colors; // Is this a color application?
|
| 69 |
+
NCursesWindow* Root_Window; // This is the stdscr equiv.
|
| 70 |
+
|
| 71 |
+
// Initialization of attributes;
|
| 72 |
+
// Rewrite this in your derived class if you prefer other settings
|
| 73 |
+
virtual void init(bool bColors);
|
| 74 |
+
|
| 75 |
+
// The number of lines for the title window. Default is no title window
|
| 76 |
+
// You may rewrite this in your derived class
|
| 77 |
+
virtual int titlesize() const {
|
| 78 |
+
return 0;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// This method is called to put something into the title window initially
|
| 82 |
+
// You may rewrite this in your derived class
|
| 83 |
+
virtual void title() {
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
// The layout used for the Soft Label Keys. Default is to have no SLKs.
|
| 87 |
+
// You may rewrite this in your derived class
|
| 88 |
+
virtual Soft_Label_Key_Set::Label_Layout useSLKs() const {
|
| 89 |
+
return Soft_Label_Key_Set::None;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// This method is called to initialize the SLKs. Default is nothing.
|
| 93 |
+
// You may rewrite this in your derived class
|
| 94 |
+
virtual void init_labels(Soft_Label_Key_Set& S) const {
|
| 95 |
+
(void) S;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// Your derived class must implement this method. The return value must
|
| 99 |
+
// be the exit value of your application.
|
| 100 |
+
virtual int run() = 0;
|
| 101 |
+
|
| 102 |
+
// The constructor is protected, so you may use it in your derived
|
| 103 |
+
// class constructor. The argument tells whether or not you want colors.
|
| 104 |
+
NCursesApplication(bool wantColors = FALSE);
|
| 105 |
+
|
| 106 |
+
NCursesApplication& operator=(const NCursesApplication& rhs)
|
| 107 |
+
{
|
| 108 |
+
if (this != &rhs) {
|
| 109 |
+
*this = rhs;
|
| 110 |
+
}
|
| 111 |
+
return *this;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
NCursesApplication(const NCursesApplication& rhs)
|
| 115 |
+
: b_Colors(rhs.b_Colors),
|
| 116 |
+
Root_Window(rhs.Root_Window)
|
| 117 |
+
{
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
static NCursesWindow *&getTitleWindow();
|
| 121 |
+
|
| 122 |
+
public:
|
| 123 |
+
virtual ~NCursesApplication() THROWS(NCursesException);
|
| 124 |
+
|
| 125 |
+
// Get a pointer to the current application object
|
| 126 |
+
static NCursesApplication* getApplication();
|
| 127 |
+
|
| 128 |
+
// This method runs the application and returns its exit value
|
| 129 |
+
int operator()(void);
|
| 130 |
+
|
| 131 |
+
// Process the commandline arguments. The default implementation simply
|
| 132 |
+
// ignores them. Your derived class may rewrite this.
|
| 133 |
+
virtual void handleArgs(int argc, char* argv[]) {
|
| 134 |
+
(void) argc;
|
| 135 |
+
(void) argv;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
// Does this application use colors?
|
| 139 |
+
inline bool useColors() const {
|
| 140 |
+
return b_Colors;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Push the Key Set S onto the SLK Stack. S then becomes the current set
|
| 144 |
+
// of Soft Labelled Keys.
|
| 145 |
+
void push(Soft_Label_Key_Set& S);
|
| 146 |
+
|
| 147 |
+
// Throw away the current set of SLKs and make the previous one the
|
| 148 |
+
// new current set.
|
| 149 |
+
bool pop();
|
| 150 |
+
|
| 151 |
+
// Retrieve the current set of Soft Labelled Keys.
|
| 152 |
+
Soft_Label_Key_Set* top() const;
|
| 153 |
+
|
| 154 |
+
// Attributes to use for menu and forms foregrounds
|
| 155 |
+
virtual chtype foregrounds() const {
|
| 156 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(1)) : A_BOLD;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
// Attributes to use for menu and forms backgrounds
|
| 160 |
+
virtual chtype backgrounds() const {
|
| 161 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(2)) : A_NORMAL;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
// Attributes to use for inactive (menu) elements
|
| 165 |
+
virtual chtype inactives() const {
|
| 166 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(3)|A_DIM) : A_DIM;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// Attributes to use for (form) labels and SLKs
|
| 170 |
+
virtual chtype labels() const {
|
| 171 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
// Attributes to use for form backgrounds
|
| 175 |
+
virtual chtype dialog_backgrounds() const {
|
| 176 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
// Attributes to use as default for (form) window backgrounds
|
| 180 |
+
virtual chtype window_backgrounds() const {
|
| 181 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(5)) : A_NORMAL;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// Attributes to use for the title window
|
| 185 |
+
virtual chtype screen_titles() const {
|
| 186 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(6)) : A_BOLD;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
};
|
| 190 |
+
|
| 191 |
+
#endif /* NCURSES_CURSESAPP_H_incl */
|
data/miniconda3/include/ncursesw/cursesf.h
ADDED
|
@@ -0,0 +1,968 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
// $Id: cursesf.h,v 1.39 2022/08/20 20:52:15 tom Exp $
|
| 37 |
+
|
| 38 |
+
#ifndef NCURSES_CURSESF_H_incl
|
| 39 |
+
#define NCURSES_CURSESF_H_incl 1
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesp.h>
|
| 42 |
+
|
| 43 |
+
#ifndef __EXT_QNX
|
| 44 |
+
#include <string.h>
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
extern "C" {
|
| 48 |
+
# include <ncursesw/form.h>
|
| 49 |
+
}
|
| 50 |
+
//
|
| 51 |
+
// -------------------------------------------------------------------------
|
| 52 |
+
// The abstract base class for builtin and user defined Fieldtypes.
|
| 53 |
+
// -------------------------------------------------------------------------
|
| 54 |
+
//
|
| 55 |
+
class NCURSES_CXX_IMPEXP NCursesFormField; // forward declaration
|
| 56 |
+
|
| 57 |
+
// Class to represent builtin field types as well as C++ written new
|
| 58 |
+
// fieldtypes (see classes UserDefineFieldType...
|
| 59 |
+
class NCURSES_CXX_IMPEXP NCursesFieldType
|
| 60 |
+
{
|
| 61 |
+
friend class NCursesFormField;
|
| 62 |
+
|
| 63 |
+
protected:
|
| 64 |
+
FIELDTYPE* fieldtype;
|
| 65 |
+
|
| 66 |
+
inline void OnError(int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 67 |
+
if (err!=E_OK)
|
| 68 |
+
THROW(new NCursesFormException (err));
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
NCursesFieldType(FIELDTYPE *f) : fieldtype(f) {
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
virtual ~NCursesFieldType() {}
|
| 75 |
+
|
| 76 |
+
// Set the fields f fieldtype to this one.
|
| 77 |
+
virtual void set(NCursesFormField& f) = 0;
|
| 78 |
+
|
| 79 |
+
public:
|
| 80 |
+
NCursesFieldType()
|
| 81 |
+
: fieldtype(STATIC_CAST(FIELDTYPE*)(0))
|
| 82 |
+
{
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
NCursesFieldType& operator=(const NCursesFieldType& rhs)
|
| 86 |
+
{
|
| 87 |
+
if (this != &rhs) {
|
| 88 |
+
*this = rhs;
|
| 89 |
+
}
|
| 90 |
+
return *this;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
NCursesFieldType(const NCursesFieldType& rhs)
|
| 94 |
+
: fieldtype(rhs.fieldtype)
|
| 95 |
+
{
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
};
|
| 99 |
+
|
| 100 |
+
//
|
| 101 |
+
// -------------------------------------------------------------------------
|
| 102 |
+
// The class representing a forms field, wrapping the lowlevel FIELD struct
|
| 103 |
+
// -------------------------------------------------------------------------
|
| 104 |
+
//
|
| 105 |
+
class NCURSES_CXX_IMPEXP NCursesFormField
|
| 106 |
+
{
|
| 107 |
+
friend class NCursesForm;
|
| 108 |
+
|
| 109 |
+
protected:
|
| 110 |
+
FIELD *field; // lowlevel structure
|
| 111 |
+
NCursesFieldType* ftype; // Associated field type
|
| 112 |
+
|
| 113 |
+
// Error handler
|
| 114 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 115 |
+
if (err != E_OK)
|
| 116 |
+
THROW(new NCursesFormException (err));
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
public:
|
| 120 |
+
// Create a 'Null' field. Can be used to delimit a field list
|
| 121 |
+
NCursesFormField()
|
| 122 |
+
: field(STATIC_CAST(FIELD*)(0)),
|
| 123 |
+
ftype(STATIC_CAST(NCursesFieldType*)(0))
|
| 124 |
+
{
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// Create a new field
|
| 128 |
+
NCursesFormField (int rows,
|
| 129 |
+
int ncols,
|
| 130 |
+
int first_row = 0,
|
| 131 |
+
int first_col = 0,
|
| 132 |
+
int offscreen_rows = 0,
|
| 133 |
+
int additional_buffers = 0)
|
| 134 |
+
: field(0),
|
| 135 |
+
ftype(STATIC_CAST(NCursesFieldType*)(0))
|
| 136 |
+
{
|
| 137 |
+
field = ::new_field(rows, ncols, first_row, first_col,
|
| 138 |
+
offscreen_rows, additional_buffers);
|
| 139 |
+
if (!field)
|
| 140 |
+
OnError(errno);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
NCursesFormField& operator=(const NCursesFormField& rhs)
|
| 144 |
+
{
|
| 145 |
+
if (this != &rhs) {
|
| 146 |
+
*this = rhs;
|
| 147 |
+
}
|
| 148 |
+
return *this;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
NCursesFormField(const NCursesFormField& rhs)
|
| 152 |
+
: field(rhs.field), ftype(rhs.ftype)
|
| 153 |
+
{
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
virtual ~NCursesFormField () THROWS(NCursesException);
|
| 157 |
+
|
| 158 |
+
// Duplicate the field at a new position
|
| 159 |
+
inline NCursesFormField* dup(int first_row, int first_col)
|
| 160 |
+
{
|
| 161 |
+
NCursesFormField* f = new NCursesFormField();
|
| 162 |
+
if (!f)
|
| 163 |
+
OnError(E_SYSTEM_ERROR);
|
| 164 |
+
else {
|
| 165 |
+
f->ftype = ftype;
|
| 166 |
+
f->field = ::dup_field(field,first_row,first_col);
|
| 167 |
+
if (!f->field)
|
| 168 |
+
OnError(errno);
|
| 169 |
+
}
|
| 170 |
+
return f;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
// Link the field to a new location
|
| 174 |
+
inline NCursesFormField* link(int first_row, int first_col) {
|
| 175 |
+
NCursesFormField* f = new NCursesFormField();
|
| 176 |
+
if (!f)
|
| 177 |
+
OnError(E_SYSTEM_ERROR);
|
| 178 |
+
else {
|
| 179 |
+
f->ftype = ftype;
|
| 180 |
+
f->field = ::link_field(field,first_row,first_col);
|
| 181 |
+
if (!f->field)
|
| 182 |
+
OnError(errno);
|
| 183 |
+
}
|
| 184 |
+
return f;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
// Get the lowlevel field representation
|
| 188 |
+
inline FIELD* get_field() const {
|
| 189 |
+
return field;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
// Retrieve info about the field
|
| 193 |
+
inline void info(int& rows, int& ncols,
|
| 194 |
+
int& first_row, int& first_col,
|
| 195 |
+
int& offscreen_rows, int& additional_buffers) const {
|
| 196 |
+
OnError(::field_info(field, &rows, &ncols,
|
| 197 |
+
&first_row, &first_col,
|
| 198 |
+
&offscreen_rows, &additional_buffers));
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
// Retrieve info about the fields dynamic properties.
|
| 202 |
+
inline void dynamic_info(int& dynamic_rows, int& dynamic_cols,
|
| 203 |
+
int& max_growth) const {
|
| 204 |
+
OnError(::dynamic_field_info(field, &dynamic_rows, &dynamic_cols,
|
| 205 |
+
&max_growth));
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
// For a dynamic field you may set the maximum growth limit.
|
| 209 |
+
// A zero means unlimited growth.
|
| 210 |
+
inline void set_maximum_growth(int growth = 0) {
|
| 211 |
+
OnError(::set_max_field(field,growth));
|
| 212 |
+
}
|
| 213 |
+
|
| 214 |
+
// Move the field to a new position
|
| 215 |
+
inline void move(int row, int col) {
|
| 216 |
+
OnError(::move_field(field,row,col));
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
// Mark the field to start a new page
|
| 220 |
+
inline void new_page(bool pageFlag = FALSE) {
|
| 221 |
+
OnError(::set_new_page(field,pageFlag));
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
// Retrieve whether or not the field starts a new page.
|
| 225 |
+
inline bool is_new_page() const {
|
| 226 |
+
return ::new_page(field);
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
// Set the justification for the field
|
| 230 |
+
inline void set_justification(int just) {
|
| 231 |
+
OnError(::set_field_just(field,just));
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
// Retrieve the fields justification
|
| 235 |
+
inline int justification() const {
|
| 236 |
+
return ::field_just(field);
|
| 237 |
+
}
|
| 238 |
+
// Set the foreground attribute for the field
|
| 239 |
+
inline void set_foreground(chtype foreground) {
|
| 240 |
+
OnError(::set_field_fore(field,foreground));
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
// Retrieve the fields foreground attribute
|
| 244 |
+
inline chtype fore() const {
|
| 245 |
+
return ::field_fore(field);
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// Set the background attribute for the field
|
| 249 |
+
inline void set_background(chtype background) {
|
| 250 |
+
OnError(::set_field_back(field,background));
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
// Retrieve the fields background attribute
|
| 254 |
+
inline chtype back() const {
|
| 255 |
+
return ::field_back(field);
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
// Set the padding character for the field
|
| 259 |
+
inline void set_pad_character(int padding) {
|
| 260 |
+
OnError(::set_field_pad(field, padding));
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
// Retrieve the fields padding character
|
| 264 |
+
inline int pad() const {
|
| 265 |
+
return ::field_pad(field);
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
// Switch on the fields options
|
| 269 |
+
inline void options_on (Field_Options opts) {
|
| 270 |
+
OnError (::field_opts_on (field, opts));
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
// Switch off the fields options
|
| 274 |
+
inline void options_off (Field_Options opts) {
|
| 275 |
+
OnError (::field_opts_off (field, opts));
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
// Retrieve the fields options
|
| 279 |
+
inline Field_Options options () const {
|
| 280 |
+
return ::field_opts (field);
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
// Set the fields options
|
| 284 |
+
inline void set_options (Field_Options opts) {
|
| 285 |
+
OnError (::set_field_opts (field, opts));
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
// Mark the field as changed
|
| 289 |
+
inline void set_changed(bool changeFlag = TRUE) {
|
| 290 |
+
OnError(::set_field_status(field,changeFlag));
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Test whether or not the field is marked as changed
|
| 294 |
+
inline bool changed() const {
|
| 295 |
+
return ::field_status(field);
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
// Return the index of the field in the field array of a form
|
| 299 |
+
// or -1 if the field is not associated to a form
|
| 300 |
+
inline int (index)() const {
|
| 301 |
+
return ::field_index(field);
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
// Store a value in a fields buffer. The default buffer is nr. 0
|
| 305 |
+
inline void set_value(const char *val, int buffer = 0) {
|
| 306 |
+
OnError(::set_field_buffer(field,buffer,val));
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
// Retrieve the value of a fields buffer. The default buffer is nr. 0
|
| 310 |
+
inline char* value(int buffer = 0) const {
|
| 311 |
+
return ::field_buffer(field,buffer);
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
// Set the validation type of the field.
|
| 315 |
+
inline void set_fieldtype(NCursesFieldType& f) {
|
| 316 |
+
ftype = &f;
|
| 317 |
+
f.set(*this); // A good friend may do that...
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Retrieve the validation type of the field.
|
| 321 |
+
inline NCursesFieldType* fieldtype() const {
|
| 322 |
+
return ftype;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
};
|
| 326 |
+
|
| 327 |
+
// This are the built-in hook functions in this C++ binding. In C++ we use
|
| 328 |
+
// virtual member functions (see below On_..._Init and On_..._Termination)
|
| 329 |
+
// to provide this functionality in an object oriented manner.
|
| 330 |
+
extern "C" {
|
| 331 |
+
void _nc_xx_frm_init(FORM *);
|
| 332 |
+
void _nc_xx_frm_term(FORM *);
|
| 333 |
+
void _nc_xx_fld_init(FORM *);
|
| 334 |
+
void _nc_xx_fld_term(FORM *);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
//
|
| 338 |
+
// -------------------------------------------------------------------------
|
| 339 |
+
// The class representing a form, wrapping the lowlevel FORM struct
|
| 340 |
+
// -------------------------------------------------------------------------
|
| 341 |
+
//
|
| 342 |
+
class NCURSES_CXX_IMPEXP NCursesForm : public NCursesPanel
|
| 343 |
+
{
|
| 344 |
+
protected:
|
| 345 |
+
FORM* form; // the lowlevel structure
|
| 346 |
+
|
| 347 |
+
private:
|
| 348 |
+
NCursesWindow* sub; // the subwindow object
|
| 349 |
+
bool b_sub_owner; // is this our own subwindow?
|
| 350 |
+
bool b_framed; // has the form a border?
|
| 351 |
+
bool b_autoDelete; // Delete fields when deleting form?
|
| 352 |
+
|
| 353 |
+
NCursesFormField** my_fields; // The array of fields for this form
|
| 354 |
+
|
| 355 |
+
// This structure is used for the form's user data field to link the
|
| 356 |
+
// FORM* to the C++ object and to provide extra space for a user pointer.
|
| 357 |
+
typedef struct {
|
| 358 |
+
void* m_user; // the pointer for the user's data
|
| 359 |
+
const NCursesForm* m_back; // backward pointer to C++ object
|
| 360 |
+
const FORM* m_owner;
|
| 361 |
+
} UserHook;
|
| 362 |
+
|
| 363 |
+
// Get the backward pointer to the C++ object from a FORM
|
| 364 |
+
static inline NCursesForm* getHook(const FORM *f) {
|
| 365 |
+
UserHook* hook = reinterpret_cast<UserHook*>(::form_userptr(f));
|
| 366 |
+
assert(hook != 0 && hook->m_owner==f);
|
| 367 |
+
return const_cast<NCursesForm*>(hook->m_back);
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
friend void _nc_xx_frm_init(FORM *);
|
| 371 |
+
friend void _nc_xx_frm_term(FORM *);
|
| 372 |
+
friend void _nc_xx_fld_init(FORM *);
|
| 373 |
+
friend void _nc_xx_fld_term(FORM *);
|
| 374 |
+
|
| 375 |
+
// Calculate FIELD* array for the menu
|
| 376 |
+
FIELD** mapFields(NCursesFormField* nfields[]);
|
| 377 |
+
|
| 378 |
+
protected:
|
| 379 |
+
// internal routines
|
| 380 |
+
inline void set_user(void *user) {
|
| 381 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
|
| 382 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
|
| 383 |
+
uptr->m_user = user;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
inline void *get_user() {
|
| 387 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(::form_userptr (form));
|
| 388 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
|
| 389 |
+
return uptr->m_user;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
void InitForm (NCursesFormField* Fields[],
|
| 393 |
+
bool with_frame,
|
| 394 |
+
bool autoDeleteFields);
|
| 395 |
+
|
| 396 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesFormException) {
|
| 397 |
+
if (err != E_OK)
|
| 398 |
+
THROW(new NCursesFormException (err));
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
// this wraps the form_driver call.
|
| 402 |
+
virtual int driver (int c) ;
|
| 403 |
+
|
| 404 |
+
// 'Internal' constructor, builds an object without association to a
|
| 405 |
+
// field array.
|
| 406 |
+
NCursesForm( int nlines,
|
| 407 |
+
int ncols,
|
| 408 |
+
int begin_y = 0,
|
| 409 |
+
int begin_x = 0)
|
| 410 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 411 |
+
form (STATIC_CAST(FORM*)(0)),
|
| 412 |
+
sub(0),
|
| 413 |
+
b_sub_owner(0),
|
| 414 |
+
b_framed(0),
|
| 415 |
+
b_autoDelete(0),
|
| 416 |
+
my_fields(0)
|
| 417 |
+
{
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
public:
|
| 421 |
+
// Create form for the default panel.
|
| 422 |
+
NCursesForm (NCursesFormField* Fields[],
|
| 423 |
+
bool with_frame=FALSE, // reserve space for a frame?
|
| 424 |
+
bool autoDelete_Fields=FALSE) // do automatic cleanup?
|
| 425 |
+
: NCursesPanel(),
|
| 426 |
+
form(0),
|
| 427 |
+
sub(0),
|
| 428 |
+
b_sub_owner(0),
|
| 429 |
+
b_framed(0),
|
| 430 |
+
b_autoDelete(0),
|
| 431 |
+
my_fields(0)
|
| 432 |
+
{
|
| 433 |
+
InitForm(Fields, with_frame, autoDelete_Fields);
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
// Create a form in a panel with the given position and size.
|
| 437 |
+
NCursesForm (NCursesFormField* Fields[],
|
| 438 |
+
int nlines,
|
| 439 |
+
int ncols,
|
| 440 |
+
int begin_y,
|
| 441 |
+
int begin_x,
|
| 442 |
+
bool with_frame=FALSE, // reserve space for a frame?
|
| 443 |
+
bool autoDelete_Fields=FALSE) // do automatic cleanup?
|
| 444 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 445 |
+
form(0),
|
| 446 |
+
sub(0),
|
| 447 |
+
b_sub_owner(0),
|
| 448 |
+
b_framed(0),
|
| 449 |
+
b_autoDelete(0),
|
| 450 |
+
my_fields(0)
|
| 451 |
+
{
|
| 452 |
+
InitForm(Fields, with_frame, autoDelete_Fields);
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
NCursesForm& operator=(const NCursesForm& rhs)
|
| 456 |
+
{
|
| 457 |
+
if (this != &rhs) {
|
| 458 |
+
*this = rhs;
|
| 459 |
+
NCursesPanel::operator=(rhs);
|
| 460 |
+
}
|
| 461 |
+
return *this;
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
NCursesForm(const NCursesForm& rhs)
|
| 465 |
+
: NCursesPanel(rhs),
|
| 466 |
+
form(rhs.form),
|
| 467 |
+
sub(rhs.sub),
|
| 468 |
+
b_sub_owner(rhs.b_sub_owner),
|
| 469 |
+
b_framed(rhs.b_framed),
|
| 470 |
+
b_autoDelete(rhs.b_autoDelete),
|
| 471 |
+
my_fields(rhs.my_fields)
|
| 472 |
+
{
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
virtual ~NCursesForm() THROWS(NCursesException);
|
| 476 |
+
|
| 477 |
+
// Set the default attributes for the form
|
| 478 |
+
virtual void setDefaultAttributes();
|
| 479 |
+
|
| 480 |
+
// Retrieve current field of the form.
|
| 481 |
+
inline NCursesFormField* current_field() const {
|
| 482 |
+
return my_fields[::field_index(::current_field(form))];
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
// Set the forms subwindow
|
| 486 |
+
void setSubWindow(NCursesWindow& sub);
|
| 487 |
+
|
| 488 |
+
// Set these fields for the form
|
| 489 |
+
inline void setFields(NCursesFormField* Fields[]) {
|
| 490 |
+
OnError(::set_form_fields(form,mapFields(Fields)));
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
// Remove the form from the screen
|
| 494 |
+
inline void unpost (void) {
|
| 495 |
+
OnError (::unpost_form (form));
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
// Post the form to the screen if flag is true, unpost it otherwise
|
| 499 |
+
inline void post(bool flag = TRUE) {
|
| 500 |
+
OnError (flag ? ::post_form(form) : ::unpost_form (form));
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
// Decorations
|
| 504 |
+
inline void frame(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 505 |
+
if (b_framed)
|
| 506 |
+
NCursesPanel::frame(title,btitle);
|
| 507 |
+
else
|
| 508 |
+
OnError(E_SYSTEM_ERROR);
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
inline void boldframe(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 512 |
+
if (b_framed)
|
| 513 |
+
NCursesPanel::boldframe(title,btitle);
|
| 514 |
+
else
|
| 515 |
+
OnError(E_SYSTEM_ERROR);
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
inline void label(const char *topLabel, const char *bottomLabel) NCURSES_OVERRIDE {
|
| 519 |
+
if (b_framed)
|
| 520 |
+
NCursesPanel::label(topLabel,bottomLabel);
|
| 521 |
+
else
|
| 522 |
+
OnError(E_SYSTEM_ERROR);
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
// -----
|
| 526 |
+
// Hooks
|
| 527 |
+
// -----
|
| 528 |
+
|
| 529 |
+
// Called after the form gets repositioned in its window.
|
| 530 |
+
// This is especially true if the form is posted.
|
| 531 |
+
virtual void On_Form_Init();
|
| 532 |
+
|
| 533 |
+
// Called before the form gets repositioned in its window.
|
| 534 |
+
// This is especially true if the form is unposted.
|
| 535 |
+
virtual void On_Form_Termination();
|
| 536 |
+
|
| 537 |
+
// Called after the field became the current field
|
| 538 |
+
virtual void On_Field_Init(NCursesFormField& field);
|
| 539 |
+
|
| 540 |
+
// Called before this field is left as current field.
|
| 541 |
+
virtual void On_Field_Termination(NCursesFormField& field);
|
| 542 |
+
|
| 543 |
+
// Calculate required window size for the form.
|
| 544 |
+
void scale(int& rows, int& ncols) const {
|
| 545 |
+
OnError(::scale_form(form,&rows,&ncols));
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
// Retrieve number of fields in the form.
|
| 549 |
+
int count() const {
|
| 550 |
+
return ::field_count(form);
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
// Make the page the current page of the form.
|
| 554 |
+
void set_page(int pageNum) {
|
| 555 |
+
OnError(::set_form_page(form, pageNum));
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
// Retrieve current page number
|
| 559 |
+
int page() const {
|
| 560 |
+
return ::form_page(form);
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
// Switch on the forms options
|
| 564 |
+
inline void options_on (Form_Options opts) {
|
| 565 |
+
OnError (::form_opts_on (form, opts));
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
// Switch off the forms options
|
| 569 |
+
inline void options_off (Form_Options opts) {
|
| 570 |
+
OnError (::form_opts_off (form, opts));
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
// Retrieve the forms options
|
| 574 |
+
inline Form_Options options () const {
|
| 575 |
+
return ::form_opts (form);
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
// Set the forms options
|
| 579 |
+
inline void set_options (Form_Options opts) {
|
| 580 |
+
OnError (::set_form_opts (form, opts));
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
// Are there more data in the current field after the data shown
|
| 584 |
+
inline bool data_ahead() const {
|
| 585 |
+
return ::data_ahead(form);
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
// Are there more data in the current field before the data shown
|
| 589 |
+
inline bool data_behind() const {
|
| 590 |
+
return ::data_behind(form);
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
// Position the cursor to the current field
|
| 594 |
+
inline void position_cursor () {
|
| 595 |
+
OnError (::pos_form_cursor (form));
|
| 596 |
+
}
|
| 597 |
+
// Set the current field
|
| 598 |
+
inline void set_current(NCursesFormField& F) {
|
| 599 |
+
OnError (::set_current_field(form, F.field));
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
// Provide a default key virtualization. Translate the keyboard
|
| 603 |
+
// code c into a form request code.
|
| 604 |
+
// The default implementation provides a hopefully straightforward
|
| 605 |
+
// mapping for the most common keystrokes and form requests.
|
| 606 |
+
virtual int virtualize(int c);
|
| 607 |
+
|
| 608 |
+
// Operators
|
| 609 |
+
inline NCursesFormField* operator[](int i) const {
|
| 610 |
+
if ( (i < 0) || (i >= ::field_count (form)) )
|
| 611 |
+
OnError (E_BAD_ARGUMENT);
|
| 612 |
+
return my_fields[i];
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
// Perform the menu's operation
|
| 616 |
+
// Return the field where you left the form.
|
| 617 |
+
virtual NCursesFormField* operator()(void);
|
| 618 |
+
|
| 619 |
+
// Exception handlers. The default is a Beep.
|
| 620 |
+
virtual void On_Request_Denied(int c) const;
|
| 621 |
+
virtual void On_Invalid_Field(int c) const;
|
| 622 |
+
virtual void On_Unknown_Command(int c) const;
|
| 623 |
+
|
| 624 |
+
};
|
| 625 |
+
|
| 626 |
+
//
|
| 627 |
+
// -------------------------------------------------------------------------
|
| 628 |
+
// This is the typical C++ typesafe way to allow to attach
|
| 629 |
+
// user data to a field of a form. Its assumed that the user
|
| 630 |
+
// data belongs to some class T. Use T as template argument
|
| 631 |
+
// to create a UserField.
|
| 632 |
+
// -------------------------------------------------------------------------
|
| 633 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserField : public NCursesFormField
|
| 634 |
+
{
|
| 635 |
+
public:
|
| 636 |
+
NCursesUserField (int rows,
|
| 637 |
+
int ncols,
|
| 638 |
+
int first_row = 0,
|
| 639 |
+
int first_col = 0,
|
| 640 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 641 |
+
int offscreen_rows = 0,
|
| 642 |
+
int additional_buffers = 0)
|
| 643 |
+
: NCursesFormField (rows, ncols,
|
| 644 |
+
first_row, first_col,
|
| 645 |
+
offscreen_rows, additional_buffers) {
|
| 646 |
+
if (field)
|
| 647 |
+
OnError(::set_field_userptr(field, STATIC_CAST(void *)(p_UserData)));
|
| 648 |
+
}
|
| 649 |
+
|
| 650 |
+
virtual ~NCursesUserField() THROWS(NCursesException) {};
|
| 651 |
+
|
| 652 |
+
inline const T* UserData (void) const {
|
| 653 |
+
return reinterpret_cast<const T*>(::field_userptr (field));
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
inline virtual void setUserData(const T* p_UserData) {
|
| 657 |
+
if (field)
|
| 658 |
+
OnError (::set_field_userptr (field, STATIC_CAST(void *)(p_UserData)));
|
| 659 |
+
}
|
| 660 |
+
};
|
| 661 |
+
//
|
| 662 |
+
// -------------------------------------------------------------------------
|
| 663 |
+
// The same mechanism is used to attach user data to a form
|
| 664 |
+
// -------------------------------------------------------------------------
|
| 665 |
+
//
|
| 666 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserForm : public NCursesForm
|
| 667 |
+
{
|
| 668 |
+
protected:
|
| 669 |
+
// 'Internal' constructor, builds an object without association to a
|
| 670 |
+
// field array.
|
| 671 |
+
NCursesUserForm( int nlines,
|
| 672 |
+
int ncols,
|
| 673 |
+
int begin_y = 0,
|
| 674 |
+
int begin_x = 0,
|
| 675 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 676 |
+
: NCursesForm(nlines,ncols,begin_y,begin_x) {
|
| 677 |
+
if (form)
|
| 678 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 679 |
+
(p_UserData)));
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
public:
|
| 683 |
+
NCursesUserForm (NCursesFormField* Fields[],
|
| 684 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 685 |
+
bool with_frame=FALSE,
|
| 686 |
+
bool autoDelete_Fields=FALSE)
|
| 687 |
+
: NCursesForm (&Fields, with_frame, autoDelete_Fields) {
|
| 688 |
+
if (form)
|
| 689 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 690 |
+
};
|
| 691 |
+
|
| 692 |
+
NCursesUserForm (NCursesFormField* Fields[],
|
| 693 |
+
int nlines,
|
| 694 |
+
int ncols,
|
| 695 |
+
int begin_y = 0,
|
| 696 |
+
int begin_x = 0,
|
| 697 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 698 |
+
bool with_frame=FALSE,
|
| 699 |
+
bool autoDelete_Fields=FALSE)
|
| 700 |
+
: NCursesForm (&Fields, nlines, ncols, begin_y, begin_x,
|
| 701 |
+
with_frame, autoDelete_Fields) {
|
| 702 |
+
if (form)
|
| 703 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 704 |
+
(p_UserData)));
|
| 705 |
+
};
|
| 706 |
+
|
| 707 |
+
virtual ~NCursesUserForm() THROWS(NCursesException) {
|
| 708 |
+
};
|
| 709 |
+
|
| 710 |
+
inline T* UserData (void) {
|
| 711 |
+
return reinterpret_cast<T*>(get_user ());
|
| 712 |
+
};
|
| 713 |
+
|
| 714 |
+
inline virtual void setUserData (const T* p_UserData) {
|
| 715 |
+
if (form)
|
| 716 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
};
|
| 720 |
+
//
|
| 721 |
+
// -------------------------------------------------------------------------
|
| 722 |
+
// Builtin Fieldtypes
|
| 723 |
+
// -------------------------------------------------------------------------
|
| 724 |
+
//
|
| 725 |
+
class NCURSES_CXX_IMPEXP Alpha_Field : public NCursesFieldType
|
| 726 |
+
{
|
| 727 |
+
private:
|
| 728 |
+
int min_field_width;
|
| 729 |
+
|
| 730 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 731 |
+
OnError(::set_field_type(f.get_field(),fieldtype,min_field_width));
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
public:
|
| 735 |
+
explicit Alpha_Field(int width)
|
| 736 |
+
: NCursesFieldType(TYPE_ALPHA),
|
| 737 |
+
min_field_width(width) {
|
| 738 |
+
}
|
| 739 |
+
};
|
| 740 |
+
|
| 741 |
+
class NCURSES_CXX_IMPEXP Alphanumeric_Field : public NCursesFieldType
|
| 742 |
+
{
|
| 743 |
+
private:
|
| 744 |
+
int min_field_width;
|
| 745 |
+
|
| 746 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 747 |
+
OnError(::set_field_type(f.get_field(),fieldtype,min_field_width));
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
public:
|
| 751 |
+
explicit Alphanumeric_Field(int width)
|
| 752 |
+
: NCursesFieldType(TYPE_ALNUM),
|
| 753 |
+
min_field_width(width) {
|
| 754 |
+
}
|
| 755 |
+
};
|
| 756 |
+
|
| 757 |
+
class NCURSES_CXX_IMPEXP Integer_Field : public NCursesFieldType
|
| 758 |
+
{
|
| 759 |
+
private:
|
| 760 |
+
int precision;
|
| 761 |
+
long lower_limit, upper_limit;
|
| 762 |
+
|
| 763 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 764 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 765 |
+
precision,lower_limit,upper_limit));
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
public:
|
| 769 |
+
Integer_Field(int prec, long low=0L, long high=0L)
|
| 770 |
+
: NCursesFieldType(TYPE_INTEGER),
|
| 771 |
+
precision(prec), lower_limit(low), upper_limit(high) {
|
| 772 |
+
}
|
| 773 |
+
};
|
| 774 |
+
|
| 775 |
+
class NCURSES_CXX_IMPEXP Numeric_Field : public NCursesFieldType
|
| 776 |
+
{
|
| 777 |
+
private:
|
| 778 |
+
int precision;
|
| 779 |
+
double lower_limit, upper_limit;
|
| 780 |
+
|
| 781 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 782 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 783 |
+
precision,lower_limit,upper_limit));
|
| 784 |
+
}
|
| 785 |
+
|
| 786 |
+
public:
|
| 787 |
+
Numeric_Field(int prec, double low=0.0, double high=0.0)
|
| 788 |
+
: NCursesFieldType(TYPE_NUMERIC),
|
| 789 |
+
precision(prec), lower_limit(low), upper_limit(high) {
|
| 790 |
+
}
|
| 791 |
+
};
|
| 792 |
+
|
| 793 |
+
class NCURSES_CXX_IMPEXP Regular_Expression_Field : public NCursesFieldType
|
| 794 |
+
{
|
| 795 |
+
private:
|
| 796 |
+
char* regex;
|
| 797 |
+
|
| 798 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 799 |
+
OnError(::set_field_type(f.get_field(),fieldtype,regex));
|
| 800 |
+
}
|
| 801 |
+
|
| 802 |
+
void copy_regex(const char *source)
|
| 803 |
+
{
|
| 804 |
+
regex = new char[1 + ::strlen(source)];
|
| 805 |
+
(::strcpy)(regex, source);
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
public:
|
| 809 |
+
explicit Regular_Expression_Field(const char *expr)
|
| 810 |
+
: NCursesFieldType(TYPE_REGEXP),
|
| 811 |
+
regex(NULL)
|
| 812 |
+
{
|
| 813 |
+
copy_regex(expr);
|
| 814 |
+
}
|
| 815 |
+
|
| 816 |
+
Regular_Expression_Field& operator=(const Regular_Expression_Field& rhs)
|
| 817 |
+
{
|
| 818 |
+
if (this != &rhs) {
|
| 819 |
+
*this = rhs;
|
| 820 |
+
copy_regex(rhs.regex);
|
| 821 |
+
NCursesFieldType::operator=(rhs);
|
| 822 |
+
}
|
| 823 |
+
return *this;
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
Regular_Expression_Field(const Regular_Expression_Field& rhs)
|
| 827 |
+
: NCursesFieldType(rhs),
|
| 828 |
+
regex(NULL)
|
| 829 |
+
{
|
| 830 |
+
copy_regex(rhs.regex);
|
| 831 |
+
}
|
| 832 |
+
|
| 833 |
+
~Regular_Expression_Field() {
|
| 834 |
+
delete[] regex;
|
| 835 |
+
}
|
| 836 |
+
};
|
| 837 |
+
|
| 838 |
+
class NCURSES_CXX_IMPEXP Enumeration_Field : public NCursesFieldType
|
| 839 |
+
{
|
| 840 |
+
private:
|
| 841 |
+
const char** list;
|
| 842 |
+
int case_sensitive;
|
| 843 |
+
int non_unique_matches;
|
| 844 |
+
|
| 845 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 846 |
+
OnError(::set_field_type(f.get_field(),fieldtype,
|
| 847 |
+
list,case_sensitive,non_unique_matches));
|
| 848 |
+
}
|
| 849 |
+
public:
|
| 850 |
+
Enumeration_Field(const char* enums[],
|
| 851 |
+
bool case_sens=FALSE,
|
| 852 |
+
bool non_unique=FALSE)
|
| 853 |
+
: NCursesFieldType(TYPE_ENUM),
|
| 854 |
+
list(enums),
|
| 855 |
+
case_sensitive(case_sens ? -1 : 0),
|
| 856 |
+
non_unique_matches(non_unique ? -1 : 0) {
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
Enumeration_Field& operator=(const Enumeration_Field& rhs)
|
| 860 |
+
{
|
| 861 |
+
if (this != &rhs) {
|
| 862 |
+
*this = rhs;
|
| 863 |
+
NCursesFieldType::operator=(rhs);
|
| 864 |
+
}
|
| 865 |
+
return *this;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
Enumeration_Field(const Enumeration_Field& rhs)
|
| 869 |
+
: NCursesFieldType(rhs),
|
| 870 |
+
list(rhs.list),
|
| 871 |
+
case_sensitive(rhs.case_sensitive),
|
| 872 |
+
non_unique_matches(rhs.non_unique_matches)
|
| 873 |
+
{
|
| 874 |
+
}
|
| 875 |
+
};
|
| 876 |
+
|
| 877 |
+
class NCURSES_CXX_IMPEXP IPV4_Address_Field : public NCursesFieldType
|
| 878 |
+
{
|
| 879 |
+
private:
|
| 880 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 881 |
+
OnError(::set_field_type(f.get_field(),fieldtype));
|
| 882 |
+
}
|
| 883 |
+
|
| 884 |
+
public:
|
| 885 |
+
IPV4_Address_Field() : NCursesFieldType(TYPE_IPV4) {
|
| 886 |
+
}
|
| 887 |
+
};
|
| 888 |
+
|
| 889 |
+
extern "C" {
|
| 890 |
+
bool _nc_xx_fld_fcheck(FIELD *, const void*);
|
| 891 |
+
bool _nc_xx_fld_ccheck(int c, const void *);
|
| 892 |
+
void* _nc_xx_fld_makearg(va_list*);
|
| 893 |
+
}
|
| 894 |
+
|
| 895 |
+
//
|
| 896 |
+
// -------------------------------------------------------------------------
|
| 897 |
+
// Abstract base class for User-Defined Fieldtypes
|
| 898 |
+
// -------------------------------------------------------------------------
|
| 899 |
+
//
|
| 900 |
+
class NCURSES_CXX_IMPEXP UserDefinedFieldType : public NCursesFieldType
|
| 901 |
+
{
|
| 902 |
+
friend class UDF_Init; // Internal helper to set up statics
|
| 903 |
+
private:
|
| 904 |
+
// For all C++ defined fieldtypes we need only one generic lowlevel
|
| 905 |
+
// FIELDTYPE* element.
|
| 906 |
+
static FIELDTYPE* generic_fieldtype;
|
| 907 |
+
|
| 908 |
+
protected:
|
| 909 |
+
// This are the functions required by the low level libforms functions
|
| 910 |
+
// to construct a fieldtype.
|
| 911 |
+
friend bool _nc_xx_fld_fcheck(FIELD *, const void*);
|
| 912 |
+
friend bool _nc_xx_fld_ccheck(int c, const void *);
|
| 913 |
+
friend void* _nc_xx_fld_makearg(va_list*);
|
| 914 |
+
|
| 915 |
+
void set(NCursesFormField& f) NCURSES_OVERRIDE {
|
| 916 |
+
OnError(::set_field_type(f.get_field(),fieldtype,&f));
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
+
protected:
|
| 920 |
+
// Redefine this function to do a field validation. The argument
|
| 921 |
+
// is a reference to the field you should validate.
|
| 922 |
+
virtual bool field_check(NCursesFormField& f) = 0;
|
| 923 |
+
|
| 924 |
+
// Redefine this function to do a character validation. The argument
|
| 925 |
+
// is the character to be validated.
|
| 926 |
+
virtual bool char_check (int c) = 0;
|
| 927 |
+
|
| 928 |
+
public:
|
| 929 |
+
UserDefinedFieldType();
|
| 930 |
+
};
|
| 931 |
+
|
| 932 |
+
extern "C" {
|
| 933 |
+
bool _nc_xx_next_choice(FIELD*, const void *);
|
| 934 |
+
bool _nc_xx_prev_choice(FIELD*, const void *);
|
| 935 |
+
}
|
| 936 |
+
|
| 937 |
+
//
|
| 938 |
+
// -------------------------------------------------------------------------
|
| 939 |
+
// Abstract base class for User-Defined Fieldtypes with Choice functions
|
| 940 |
+
// -------------------------------------------------------------------------
|
| 941 |
+
//
|
| 942 |
+
class NCURSES_CXX_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType
|
| 943 |
+
{
|
| 944 |
+
friend class UDF_Init; // Internal helper to set up statics
|
| 945 |
+
private:
|
| 946 |
+
// For all C++ defined fieldtypes with choice functions we need only one
|
| 947 |
+
// generic lowlevel FIELDTYPE* element.
|
| 948 |
+
static FIELDTYPE* generic_fieldtype_with_choice;
|
| 949 |
+
|
| 950 |
+
// This are the functions required by the low level libforms functions
|
| 951 |
+
// to construct a fieldtype with choice functions.
|
| 952 |
+
friend bool _nc_xx_next_choice(FIELD*, const void *);
|
| 953 |
+
friend bool _nc_xx_prev_choice(FIELD*, const void *);
|
| 954 |
+
|
| 955 |
+
protected:
|
| 956 |
+
// Redefine this function to do the retrieval of the next choice value.
|
| 957 |
+
// The argument is a reference to the field tobe examined.
|
| 958 |
+
virtual bool next (NCursesFormField& f) = 0;
|
| 959 |
+
|
| 960 |
+
// Redefine this function to do the retrieval of the previous choice value.
|
| 961 |
+
// The argument is a reference to the field tobe examined.
|
| 962 |
+
virtual bool previous(NCursesFormField& f) = 0;
|
| 963 |
+
|
| 964 |
+
public:
|
| 965 |
+
UserDefinedFieldType_With_Choice();
|
| 966 |
+
};
|
| 967 |
+
|
| 968 |
+
#endif /* NCURSES_CURSESF_H_incl */
|
data/miniconda3/include/ncursesw/cursesm.h
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2019-2020,2022 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: cursesm.h,v 1.35 2022/08/20 20:52:15 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_CURSESM_H_incl
|
| 38 |
+
#define NCURSES_CURSESM_H_incl 1
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/cursesp.h>
|
| 41 |
+
|
| 42 |
+
extern "C" {
|
| 43 |
+
# include <ncursesw/menu.h>
|
| 44 |
+
}
|
| 45 |
+
//
|
| 46 |
+
// -------------------------------------------------------------------------
|
| 47 |
+
// This wraps the ITEM type of <ncursesw/menu.h>
|
| 48 |
+
// -------------------------------------------------------------------------
|
| 49 |
+
//
|
| 50 |
+
class NCURSES_CXX_IMPEXP NCursesMenuItem
|
| 51 |
+
{
|
| 52 |
+
friend class NCursesMenu;
|
| 53 |
+
|
| 54 |
+
protected:
|
| 55 |
+
ITEM *item;
|
| 56 |
+
|
| 57 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
|
| 58 |
+
if (err != E_OK)
|
| 59 |
+
THROW(new NCursesMenuException (err));
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
public:
|
| 63 |
+
NCursesMenuItem (const char* p_name = NULL,
|
| 64 |
+
const char* p_descript = NULL)
|
| 65 |
+
: item(0)
|
| 66 |
+
{
|
| 67 |
+
item = p_name ? ::new_item (p_name, p_descript) : STATIC_CAST(ITEM*)(0);
|
| 68 |
+
if (p_name && !item)
|
| 69 |
+
OnError (E_SYSTEM_ERROR);
|
| 70 |
+
}
|
| 71 |
+
// Create an item. If you pass both parameters as NULL, a delimiting
|
| 72 |
+
// item is constructed which can be used to terminate a list of
|
| 73 |
+
// NCursesMenu objects.
|
| 74 |
+
|
| 75 |
+
NCursesMenuItem& operator=(const NCursesMenuItem& rhs)
|
| 76 |
+
{
|
| 77 |
+
if (this != &rhs) {
|
| 78 |
+
*this = rhs;
|
| 79 |
+
}
|
| 80 |
+
return *this;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
NCursesMenuItem(const NCursesMenuItem& rhs)
|
| 84 |
+
: item(0)
|
| 85 |
+
{
|
| 86 |
+
(void) rhs;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
virtual ~NCursesMenuItem () THROWS(NCursesException);
|
| 90 |
+
// Release the items memory
|
| 91 |
+
|
| 92 |
+
inline const char* name () const {
|
| 93 |
+
return ::item_name (item);
|
| 94 |
+
}
|
| 95 |
+
// Name of the item
|
| 96 |
+
|
| 97 |
+
inline const char* description () const {
|
| 98 |
+
return ::item_description (item);
|
| 99 |
+
}
|
| 100 |
+
// Description of the item
|
| 101 |
+
|
| 102 |
+
inline int (index) (void) const {
|
| 103 |
+
return ::item_index (item);
|
| 104 |
+
}
|
| 105 |
+
// Index of the item in an item array (or -1)
|
| 106 |
+
|
| 107 |
+
inline void options_on (Item_Options opts) {
|
| 108 |
+
OnError (::item_opts_on (item, opts));
|
| 109 |
+
}
|
| 110 |
+
// Switch on the items options
|
| 111 |
+
|
| 112 |
+
inline void options_off (Item_Options opts) {
|
| 113 |
+
OnError (::item_opts_off (item, opts));
|
| 114 |
+
}
|
| 115 |
+
// Switch off the item's option
|
| 116 |
+
|
| 117 |
+
inline Item_Options options () const {
|
| 118 |
+
return ::item_opts (item);
|
| 119 |
+
}
|
| 120 |
+
// Retrieve the items options
|
| 121 |
+
|
| 122 |
+
inline void set_options (Item_Options opts) {
|
| 123 |
+
OnError (::set_item_opts (item, opts));
|
| 124 |
+
}
|
| 125 |
+
// Set the items options
|
| 126 |
+
|
| 127 |
+
inline void set_value (bool f) {
|
| 128 |
+
OnError (::set_item_value (item,f));
|
| 129 |
+
}
|
| 130 |
+
// Set/Reset the items selection state
|
| 131 |
+
|
| 132 |
+
inline bool value () const {
|
| 133 |
+
return ::item_value (item);
|
| 134 |
+
}
|
| 135 |
+
// Retrieve the items selection state
|
| 136 |
+
|
| 137 |
+
inline bool visible () const {
|
| 138 |
+
return ::item_visible (item);
|
| 139 |
+
}
|
| 140 |
+
// Retrieve visibility of the item
|
| 141 |
+
|
| 142 |
+
virtual bool action();
|
| 143 |
+
// Perform an action associated with this item; you may use this in an
|
| 144 |
+
// user supplied driver for a menu; you may derive from this class and
|
| 145 |
+
// overload action() to supply items with different actions.
|
| 146 |
+
// If an action returns true, the menu will be exited. The default action
|
| 147 |
+
// is to do nothing.
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
// Prototype for an items callback function.
|
| 151 |
+
typedef bool ITEMCALLBACK(NCursesMenuItem&);
|
| 152 |
+
|
| 153 |
+
// If you don't like to create a child class for individual items to
|
| 154 |
+
// overload action(), you may use this class and provide a callback
|
| 155 |
+
// function pointer for items.
|
| 156 |
+
class NCURSES_CXX_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem
|
| 157 |
+
{
|
| 158 |
+
private:
|
| 159 |
+
ITEMCALLBACK* p_fct;
|
| 160 |
+
|
| 161 |
+
public:
|
| 162 |
+
NCursesMenuCallbackItem(ITEMCALLBACK* fct = NULL,
|
| 163 |
+
const char* p_name = NULL,
|
| 164 |
+
const char* p_descript = NULL )
|
| 165 |
+
: NCursesMenuItem (p_name, p_descript),
|
| 166 |
+
p_fct (fct) {
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
NCursesMenuCallbackItem& operator=(const NCursesMenuCallbackItem& rhs)
|
| 170 |
+
{
|
| 171 |
+
if (this != &rhs) {
|
| 172 |
+
*this = rhs;
|
| 173 |
+
}
|
| 174 |
+
return *this;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
NCursesMenuCallbackItem(const NCursesMenuCallbackItem& rhs)
|
| 178 |
+
: NCursesMenuItem(rhs),
|
| 179 |
+
p_fct(0)
|
| 180 |
+
{
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
virtual ~NCursesMenuCallbackItem() THROWS(NCursesException);
|
| 184 |
+
|
| 185 |
+
bool action() NCURSES_OVERRIDE;
|
| 186 |
+
};
|
| 187 |
+
|
| 188 |
+
// This are the built-in hook functions in this C++ binding. In C++ we use
|
| 189 |
+
// virtual member functions (see below On_..._Init and On_..._Termination)
|
| 190 |
+
// to provide this functionality in an object oriented manner.
|
| 191 |
+
extern "C" {
|
| 192 |
+
void _nc_xx_mnu_init(MENU *);
|
| 193 |
+
void _nc_xx_mnu_term(MENU *);
|
| 194 |
+
void _nc_xx_itm_init(MENU *);
|
| 195 |
+
void _nc_xx_itm_term(MENU *);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
//
|
| 199 |
+
// -------------------------------------------------------------------------
|
| 200 |
+
// This wraps the MENU type of <ncursesw/menu.h>
|
| 201 |
+
// -------------------------------------------------------------------------
|
| 202 |
+
//
|
| 203 |
+
class NCURSES_CXX_IMPEXP NCursesMenu : public NCursesPanel
|
| 204 |
+
{
|
| 205 |
+
protected:
|
| 206 |
+
MENU *menu;
|
| 207 |
+
|
| 208 |
+
private:
|
| 209 |
+
NCursesWindow* sub; // the subwindow object
|
| 210 |
+
bool b_sub_owner; // is this our own subwindow?
|
| 211 |
+
bool b_framed; // has the menu a border?
|
| 212 |
+
bool b_autoDelete; // Delete items when deleting menu?
|
| 213 |
+
|
| 214 |
+
NCursesMenuItem** my_items; // The array of items for this menu
|
| 215 |
+
|
| 216 |
+
// This structure is used for the menu's user data field to link the
|
| 217 |
+
// MENU* to the C++ object and to provide extra space for a user pointer.
|
| 218 |
+
typedef struct {
|
| 219 |
+
void* m_user; // the pointer for the user's data
|
| 220 |
+
const NCursesMenu* m_back; // backward pointer to C++ object
|
| 221 |
+
const MENU* m_owner;
|
| 222 |
+
} UserHook;
|
| 223 |
+
|
| 224 |
+
// Get the backward pointer to the C++ object from a MENU
|
| 225 |
+
static inline NCursesMenu* getHook(const MENU *m) {
|
| 226 |
+
UserHook* hook = STATIC_CAST(UserHook*)(::menu_userptr(m));
|
| 227 |
+
assert(hook != 0 && hook->m_owner==m);
|
| 228 |
+
return const_cast<NCursesMenu*>(hook->m_back);
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
friend void _nc_xx_mnu_init(MENU *);
|
| 232 |
+
friend void _nc_xx_mnu_term(MENU *);
|
| 233 |
+
friend void _nc_xx_itm_init(MENU *);
|
| 234 |
+
friend void _nc_xx_itm_term(MENU *);
|
| 235 |
+
|
| 236 |
+
// Calculate ITEM* array for the menu
|
| 237 |
+
ITEM** mapItems(NCursesMenuItem* nitems[]);
|
| 238 |
+
|
| 239 |
+
protected:
|
| 240 |
+
// internal routines
|
| 241 |
+
inline void set_user(void *user) {
|
| 242 |
+
UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
|
| 243 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
|
| 244 |
+
uptr->m_user = user;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
inline void *get_user() {
|
| 248 |
+
UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
|
| 249 |
+
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
|
| 250 |
+
return uptr->m_user;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
void InitMenu (NCursesMenuItem* menu[],
|
| 254 |
+
bool with_frame,
|
| 255 |
+
bool autoDeleteItems);
|
| 256 |
+
|
| 257 |
+
inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) {
|
| 258 |
+
if (err != E_OK)
|
| 259 |
+
THROW(new NCursesMenuException (this, err));
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
// this wraps the menu_driver call.
|
| 263 |
+
virtual int driver (int c) ;
|
| 264 |
+
|
| 265 |
+
// 'Internal' constructor to create a menu without association to
|
| 266 |
+
// an array of items.
|
| 267 |
+
NCursesMenu( int nlines,
|
| 268 |
+
int ncols,
|
| 269 |
+
int begin_y = 0,
|
| 270 |
+
int begin_x = 0)
|
| 271 |
+
: NCursesPanel(nlines,ncols,begin_y,begin_x),
|
| 272 |
+
menu (STATIC_CAST(MENU*)(0)),
|
| 273 |
+
sub(0),
|
| 274 |
+
b_sub_owner(0),
|
| 275 |
+
b_framed(0),
|
| 276 |
+
b_autoDelete(0),
|
| 277 |
+
my_items(0)
|
| 278 |
+
{
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
public:
|
| 282 |
+
// Make a full window size menu
|
| 283 |
+
NCursesMenu (NCursesMenuItem* Items[],
|
| 284 |
+
bool with_frame=FALSE, // Reserve space for a frame?
|
| 285 |
+
bool autoDelete_Items=FALSE) // Autocleanup of Items?
|
| 286 |
+
: NCursesPanel(),
|
| 287 |
+
menu(0),
|
| 288 |
+
sub(0),
|
| 289 |
+
b_sub_owner(0),
|
| 290 |
+
b_framed(0),
|
| 291 |
+
b_autoDelete(0),
|
| 292 |
+
my_items(0)
|
| 293 |
+
{
|
| 294 |
+
InitMenu(Items, with_frame, autoDelete_Items);
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
// Make a menu with a window of this size.
|
| 298 |
+
NCursesMenu (NCursesMenuItem* Items[],
|
| 299 |
+
int nlines,
|
| 300 |
+
int ncols,
|
| 301 |
+
int begin_y = 0,
|
| 302 |
+
int begin_x = 0,
|
| 303 |
+
bool with_frame=FALSE, // Reserve space for a frame?
|
| 304 |
+
bool autoDelete_Items=FALSE) // Autocleanup of Items?
|
| 305 |
+
: NCursesPanel(nlines, ncols, begin_y, begin_x),
|
| 306 |
+
menu(0),
|
| 307 |
+
sub(0),
|
| 308 |
+
b_sub_owner(0),
|
| 309 |
+
b_framed(0),
|
| 310 |
+
b_autoDelete(0),
|
| 311 |
+
my_items(0)
|
| 312 |
+
{
|
| 313 |
+
InitMenu(Items, with_frame, autoDelete_Items);
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
NCursesMenu& operator=(const NCursesMenu& rhs)
|
| 317 |
+
{
|
| 318 |
+
if (this != &rhs) {
|
| 319 |
+
*this = rhs;
|
| 320 |
+
NCursesPanel::operator=(rhs);
|
| 321 |
+
}
|
| 322 |
+
return *this;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
NCursesMenu(const NCursesMenu& rhs)
|
| 326 |
+
: NCursesPanel(rhs),
|
| 327 |
+
menu(rhs.menu),
|
| 328 |
+
sub(rhs.sub),
|
| 329 |
+
b_sub_owner(rhs.b_sub_owner),
|
| 330 |
+
b_framed(rhs.b_framed),
|
| 331 |
+
b_autoDelete(rhs.b_autoDelete),
|
| 332 |
+
my_items(rhs.my_items)
|
| 333 |
+
{
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
virtual ~NCursesMenu () THROWS(NCursesException);
|
| 337 |
+
|
| 338 |
+
// Retrieve the menus subwindow
|
| 339 |
+
inline NCursesWindow& subWindow() const {
|
| 340 |
+
assert(sub!=NULL);
|
| 341 |
+
return *sub;
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
// Set the menus subwindow
|
| 345 |
+
void setSubWindow(NCursesWindow& sub);
|
| 346 |
+
|
| 347 |
+
// Set these items for the menu
|
| 348 |
+
inline void setItems(NCursesMenuItem* Items[]) {
|
| 349 |
+
OnError(::set_menu_items(menu,mapItems(Items)));
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
// Remove the menu from the screen
|
| 353 |
+
inline void unpost (void) {
|
| 354 |
+
OnError (::unpost_menu (menu));
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
// Post the menu to the screen if flag is true, unpost it otherwise
|
| 358 |
+
inline void post(bool flag = TRUE) {
|
| 359 |
+
flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu));
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
// Get the number of rows and columns for this menu
|
| 363 |
+
inline void scale (int& mrows, int& mcols) const {
|
| 364 |
+
OnError (::scale_menu (menu, &mrows, &mcols));
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// Set the format of this menu
|
| 368 |
+
inline void set_format(int mrows, int mcols) {
|
| 369 |
+
OnError (::set_menu_format(menu, mrows, mcols));
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
// Get the format of this menu
|
| 373 |
+
inline void menu_format(int& rows,int& ncols) {
|
| 374 |
+
::menu_format(menu,&rows,&ncols);
|
| 375 |
+
}
|
| 376 |
+
|
| 377 |
+
// Items of the menu
|
| 378 |
+
inline NCursesMenuItem* items() const {
|
| 379 |
+
return *my_items;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
// Get the number of items in this menu
|
| 383 |
+
inline int count() const {
|
| 384 |
+
return ::item_count(menu);
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
// Get the current item (i.e. the one the cursor is located)
|
| 388 |
+
inline NCursesMenuItem* current_item() const {
|
| 389 |
+
return my_items[::item_index(::current_item(menu))];
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
// Get the marker string
|
| 393 |
+
inline const char* mark() const {
|
| 394 |
+
return ::menu_mark(menu);
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
// Set the marker string
|
| 398 |
+
inline void set_mark(const char *marker) {
|
| 399 |
+
OnError (::set_menu_mark (menu, marker));
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// Get the name of the request code c
|
| 403 |
+
inline static const char* request_name(int c) {
|
| 404 |
+
return ::menu_request_name(c);
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
// Get the current pattern
|
| 408 |
+
inline char* pattern() const {
|
| 409 |
+
return ::menu_pattern(menu);
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
// true if there is a pattern match, false otherwise.
|
| 413 |
+
bool set_pattern (const char *pat);
|
| 414 |
+
|
| 415 |
+
// set the default attributes for the menu
|
| 416 |
+
// i.e. set fore, back and grey attribute
|
| 417 |
+
virtual void setDefaultAttributes();
|
| 418 |
+
|
| 419 |
+
// Get the menus background attributes
|
| 420 |
+
inline chtype back() const {
|
| 421 |
+
return ::menu_back(menu);
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
// Get the menus foreground attributes
|
| 425 |
+
inline chtype fore() const {
|
| 426 |
+
return ::menu_fore(menu);
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
// Get the menus grey attributes (used for unselectable items)
|
| 430 |
+
inline chtype grey() const {
|
| 431 |
+
return ::menu_grey(menu);
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
// Set the menus background attributes
|
| 435 |
+
inline chtype set_background(chtype a) {
|
| 436 |
+
return ::set_menu_back(menu,a);
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
// Set the menus foreground attributes
|
| 440 |
+
inline chtype set_foreground(chtype a) {
|
| 441 |
+
return ::set_menu_fore(menu,a);
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
// Set the menus grey attributes (used for unselectable items)
|
| 445 |
+
inline chtype set_grey(chtype a) {
|
| 446 |
+
return ::set_menu_grey(menu,a);
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
inline void options_on (Menu_Options opts) {
|
| 450 |
+
OnError (::menu_opts_on (menu,opts));
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
inline void options_off(Menu_Options opts) {
|
| 454 |
+
OnError (::menu_opts_off(menu,opts));
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
inline Menu_Options options() const {
|
| 458 |
+
return ::menu_opts(menu);
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
inline void set_options (Menu_Options opts) {
|
| 462 |
+
OnError (::set_menu_opts (menu,opts));
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
inline int pad() const {
|
| 466 |
+
return ::menu_pad(menu);
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
inline void set_pad (int padch) {
|
| 470 |
+
OnError (::set_menu_pad (menu, padch));
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
// Position the cursor to the current item
|
| 474 |
+
inline void position_cursor () const {
|
| 475 |
+
OnError (::pos_menu_cursor (menu));
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
// Set the current item
|
| 479 |
+
inline void set_current(NCursesMenuItem& I) {
|
| 480 |
+
OnError (::set_current_item(menu, I.item));
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Get the current top row of the menu
|
| 484 |
+
inline int top_row (void) const {
|
| 485 |
+
return ::top_row (menu);
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
// Set the current top row of the menu
|
| 489 |
+
inline void set_top_row (int row) {
|
| 490 |
+
OnError (::set_top_row (menu, row));
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
// spacing control
|
| 494 |
+
// Set the spacing for the menu
|
| 495 |
+
inline void setSpacing(int spc_description,
|
| 496 |
+
int spc_rows,
|
| 497 |
+
int spc_columns) {
|
| 498 |
+
OnError(::set_menu_spacing(menu,
|
| 499 |
+
spc_description,
|
| 500 |
+
spc_rows,
|
| 501 |
+
spc_columns));
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
// Get the spacing info for the menu
|
| 505 |
+
inline void Spacing(int& spc_description,
|
| 506 |
+
int& spc_rows,
|
| 507 |
+
int& spc_columns) const {
|
| 508 |
+
OnError(::menu_spacing(menu,
|
| 509 |
+
&spc_description,
|
| 510 |
+
&spc_rows,
|
| 511 |
+
&spc_columns));
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
// Decorations
|
| 515 |
+
inline void frame(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 516 |
+
if (b_framed)
|
| 517 |
+
NCursesPanel::frame(title,btitle);
|
| 518 |
+
else
|
| 519 |
+
OnError(E_SYSTEM_ERROR);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
inline void boldframe(const char *title=NULL, const char* btitle=NULL) NCURSES_OVERRIDE {
|
| 523 |
+
if (b_framed)
|
| 524 |
+
NCursesPanel::boldframe(title,btitle);
|
| 525 |
+
else
|
| 526 |
+
OnError(E_SYSTEM_ERROR);
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
inline void label(const char *topLabel, const char *bottomLabel) NCURSES_OVERRIDE {
|
| 530 |
+
if (b_framed)
|
| 531 |
+
NCursesPanel::label(topLabel,bottomLabel);
|
| 532 |
+
else
|
| 533 |
+
OnError(E_SYSTEM_ERROR);
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
// -----
|
| 537 |
+
// Hooks
|
| 538 |
+
// -----
|
| 539 |
+
|
| 540 |
+
// Called after the menu gets repositioned in its window.
|
| 541 |
+
// This is especially true if the menu is posted.
|
| 542 |
+
virtual void On_Menu_Init();
|
| 543 |
+
|
| 544 |
+
// Called before the menu gets repositioned in its window.
|
| 545 |
+
// This is especially true if the menu is unposted.
|
| 546 |
+
virtual void On_Menu_Termination();
|
| 547 |
+
|
| 548 |
+
// Called after the item became the current item
|
| 549 |
+
virtual void On_Item_Init(NCursesMenuItem& item);
|
| 550 |
+
|
| 551 |
+
// Called before this item is left as current item.
|
| 552 |
+
virtual void On_Item_Termination(NCursesMenuItem& item);
|
| 553 |
+
|
| 554 |
+
// Provide a default key virtualization. Translate the keyboard
|
| 555 |
+
// code c into a menu request code.
|
| 556 |
+
// The default implementation provides a hopefully straightforward
|
| 557 |
+
// mapping for the most common keystrokes and menu requests.
|
| 558 |
+
virtual int virtualize(int c);
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
// Operators
|
| 562 |
+
inline NCursesMenuItem* operator[](int i) const {
|
| 563 |
+
if ( (i < 0) || (i >= ::item_count (menu)) )
|
| 564 |
+
OnError (E_BAD_ARGUMENT);
|
| 565 |
+
return (my_items[i]);
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
// Perform the menu's operation
|
| 569 |
+
// Return the item where you left the selection mark for a single
|
| 570 |
+
// selection menu, or NULL for a multivalued menu.
|
| 571 |
+
virtual NCursesMenuItem* operator()(void);
|
| 572 |
+
|
| 573 |
+
// --------------------
|
| 574 |
+
// Exception handlers
|
| 575 |
+
// Called by operator()
|
| 576 |
+
// --------------------
|
| 577 |
+
|
| 578 |
+
// Called if the request is denied
|
| 579 |
+
virtual void On_Request_Denied(int c) const;
|
| 580 |
+
|
| 581 |
+
// Called if the item is not selectable
|
| 582 |
+
virtual void On_Not_Selectable(int c) const;
|
| 583 |
+
|
| 584 |
+
// Called if pattern doesn't match
|
| 585 |
+
virtual void On_No_Match(int c) const;
|
| 586 |
+
|
| 587 |
+
// Called if the command is unknown
|
| 588 |
+
virtual void On_Unknown_Command(int c) const;
|
| 589 |
+
|
| 590 |
+
};
|
| 591 |
+
//
|
| 592 |
+
// -------------------------------------------------------------------------
|
| 593 |
+
// This is the typical C++ typesafe way to allow to attach
|
| 594 |
+
// user data to an item of a menu. Its assumed that the user
|
| 595 |
+
// data belongs to some class T. Use T as template argument
|
| 596 |
+
// to create a UserItem.
|
| 597 |
+
// -------------------------------------------------------------------------
|
| 598 |
+
//
|
| 599 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserItem : public NCursesMenuItem
|
| 600 |
+
{
|
| 601 |
+
public:
|
| 602 |
+
NCursesUserItem (const char* p_name,
|
| 603 |
+
const char* p_descript = NULL,
|
| 604 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 605 |
+
: NCursesMenuItem (p_name, p_descript) {
|
| 606 |
+
if (item)
|
| 607 |
+
OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void*>(p_UserData))));
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
virtual ~NCursesUserItem() THROWS(NCursesException) {}
|
| 611 |
+
|
| 612 |
+
inline const T* UserData (void) const {
|
| 613 |
+
return reinterpret_cast<const T*>(::item_userptr (item));
|
| 614 |
+
};
|
| 615 |
+
|
| 616 |
+
inline virtual void setUserData(const T* p_UserData) {
|
| 617 |
+
if (item)
|
| 618 |
+
OnError (::set_item_userptr (item, const_cast<void *>(reinterpret_cast<const void *>(p_UserData))));
|
| 619 |
+
}
|
| 620 |
+
};
|
| 621 |
+
//
|
| 622 |
+
// -------------------------------------------------------------------------
|
| 623 |
+
// The same mechanism is used to attach user data to a menu
|
| 624 |
+
// -------------------------------------------------------------------------
|
| 625 |
+
//
|
| 626 |
+
template<class T> class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu
|
| 627 |
+
{
|
| 628 |
+
protected:
|
| 629 |
+
NCursesUserMenu( int nlines,
|
| 630 |
+
int ncols,
|
| 631 |
+
int begin_y = 0,
|
| 632 |
+
int begin_x = 0,
|
| 633 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 634 |
+
: NCursesMenu(nlines,ncols,begin_y,begin_x) {
|
| 635 |
+
if (menu)
|
| 636 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
public:
|
| 640 |
+
NCursesUserMenu (NCursesMenuItem* Items[],
|
| 641 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 642 |
+
bool with_frame=FALSE,
|
| 643 |
+
bool autoDelete_Items=FALSE)
|
| 644 |
+
: NCursesMenu (&Items, with_frame, autoDelete_Items) {
|
| 645 |
+
if (menu)
|
| 646 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 647 |
+
};
|
| 648 |
+
|
| 649 |
+
NCursesUserMenu (NCursesMenuItem* Items[],
|
| 650 |
+
int nlines,
|
| 651 |
+
int ncols,
|
| 652 |
+
int begin_y = 0,
|
| 653 |
+
int begin_x = 0,
|
| 654 |
+
const T* p_UserData = STATIC_CAST(T*)(0),
|
| 655 |
+
bool with_frame=FALSE)
|
| 656 |
+
: NCursesMenu (&Items, nlines, ncols, begin_y, begin_x, with_frame) {
|
| 657 |
+
if (menu)
|
| 658 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 659 |
+
};
|
| 660 |
+
|
| 661 |
+
virtual ~NCursesUserMenu() THROWS(NCursesException) {
|
| 662 |
+
};
|
| 663 |
+
|
| 664 |
+
inline T* UserData (void) {
|
| 665 |
+
return reinterpret_cast<T*>(get_user ());
|
| 666 |
+
};
|
| 667 |
+
|
| 668 |
+
inline virtual void setUserData (const T* p_UserData) {
|
| 669 |
+
if (menu)
|
| 670 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 671 |
+
}
|
| 672 |
+
};
|
| 673 |
+
|
| 674 |
+
#endif /* NCURSES_CURSESM_H_incl */
|
data/miniconda3/include/ncursesw/cursesp.h
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2012,2014 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
#ifndef NCURSES_CURSESP_H_incl
|
| 37 |
+
#define NCURSES_CURSESP_H_incl 1
|
| 38 |
+
|
| 39 |
+
// $Id: cursesp.h,v 1.36 2022/08/20 20:52:15 tom Exp $
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesw.h>
|
| 42 |
+
|
| 43 |
+
extern "C" {
|
| 44 |
+
# include <ncursesw/panel.h>
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
class NCURSES_CXX_IMPEXP NCursesPanel
|
| 48 |
+
: public NCursesWindow
|
| 49 |
+
{
|
| 50 |
+
protected:
|
| 51 |
+
PANEL *p;
|
| 52 |
+
static NCursesPanel *dummy;
|
| 53 |
+
|
| 54 |
+
private:
|
| 55 |
+
// This structure is used for the panel's user data field to link the
|
| 56 |
+
// PANEL* to the C++ object and to provide extra space for a user pointer.
|
| 57 |
+
typedef struct {
|
| 58 |
+
void* m_user; // the pointer for the user's data
|
| 59 |
+
const NCursesPanel* m_back; // backward pointer to C++ object
|
| 60 |
+
const PANEL* m_owner; // the panel itself
|
| 61 |
+
} UserHook;
|
| 62 |
+
|
| 63 |
+
inline UserHook *UserPointer()
|
| 64 |
+
{
|
| 65 |
+
UserHook* uptr = reinterpret_cast<UserHook*>(
|
| 66 |
+
const_cast<void *>(::panel_userptr (p)));
|
| 67 |
+
return uptr;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
void init(); // Initialize the panel object
|
| 71 |
+
|
| 72 |
+
protected:
|
| 73 |
+
void set_user(void *user)
|
| 74 |
+
{
|
| 75 |
+
UserHook* uptr = UserPointer();
|
| 76 |
+
if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p) {
|
| 77 |
+
uptr->m_user = user;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
// Set the user pointer of the panel.
|
| 81 |
+
|
| 82 |
+
void *get_user()
|
| 83 |
+
{
|
| 84 |
+
UserHook* uptr = UserPointer();
|
| 85 |
+
void *result = 0;
|
| 86 |
+
if (uptr != 0 && uptr->m_back==this && uptr->m_owner==p)
|
| 87 |
+
result = uptr->m_user;
|
| 88 |
+
return result;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
void OnError (int err) const THROW2(NCursesException const, NCursesPanelException)
|
| 92 |
+
{
|
| 93 |
+
if (err==ERR)
|
| 94 |
+
THROW(new NCursesPanelException (this, err));
|
| 95 |
+
}
|
| 96 |
+
// If err is equal to the curses error indicator ERR, an error handler
|
| 97 |
+
// is called.
|
| 98 |
+
|
| 99 |
+
// Get a keystroke. Default implementation calls getch()
|
| 100 |
+
virtual int getKey(void);
|
| 101 |
+
|
| 102 |
+
public:
|
| 103 |
+
NCursesPanel(int nlines,
|
| 104 |
+
int ncols,
|
| 105 |
+
int begin_y = 0,
|
| 106 |
+
int begin_x = 0)
|
| 107 |
+
: NCursesWindow(nlines,ncols,begin_y,begin_x), p(0)
|
| 108 |
+
{
|
| 109 |
+
init();
|
| 110 |
+
}
|
| 111 |
+
// Create a panel with this size starting at the requested position.
|
| 112 |
+
|
| 113 |
+
NCursesPanel()
|
| 114 |
+
: NCursesWindow(::stdscr), p(0)
|
| 115 |
+
{
|
| 116 |
+
init();
|
| 117 |
+
}
|
| 118 |
+
// This constructor creates the default Panel associated with the
|
| 119 |
+
// ::stdscr window
|
| 120 |
+
|
| 121 |
+
NCursesPanel& operator=(const NCursesPanel& rhs)
|
| 122 |
+
{
|
| 123 |
+
if (this != &rhs) {
|
| 124 |
+
*this = rhs;
|
| 125 |
+
NCursesWindow::operator=(rhs);
|
| 126 |
+
}
|
| 127 |
+
return *this;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
NCursesPanel(const NCursesPanel& rhs)
|
| 131 |
+
: NCursesWindow(rhs),
|
| 132 |
+
p(rhs.p)
|
| 133 |
+
{
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
virtual ~NCursesPanel() THROWS(NCursesException);
|
| 137 |
+
|
| 138 |
+
// basic manipulation
|
| 139 |
+
inline void hide()
|
| 140 |
+
{
|
| 141 |
+
OnError (::hide_panel(p));
|
| 142 |
+
}
|
| 143 |
+
// Hide the panel. It stays in the stack but becomes invisible.
|
| 144 |
+
|
| 145 |
+
inline void show()
|
| 146 |
+
{
|
| 147 |
+
OnError (::show_panel(p));
|
| 148 |
+
}
|
| 149 |
+
// Show the panel, i.e. make it visible.
|
| 150 |
+
|
| 151 |
+
inline void top()
|
| 152 |
+
{
|
| 153 |
+
OnError (::top_panel(p));
|
| 154 |
+
}
|
| 155 |
+
// Make this panel the top panel in the stack.
|
| 156 |
+
|
| 157 |
+
inline void bottom()
|
| 158 |
+
{
|
| 159 |
+
OnError (::bottom_panel(p));
|
| 160 |
+
}
|
| 161 |
+
// Make this panel the bottom panel in the stack.
|
| 162 |
+
// N.B.: The panel associated with ::stdscr is always on the bottom. So
|
| 163 |
+
// actually bottom() makes the panel the first above ::stdscr.
|
| 164 |
+
|
| 165 |
+
virtual int mvwin(int y, int x) NCURSES_OVERRIDE
|
| 166 |
+
{
|
| 167 |
+
OnError(::move_panel(p, y, x));
|
| 168 |
+
return OK;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
inline bool hidden() const
|
| 172 |
+
{
|
| 173 |
+
return (::panel_hidden (p) ? TRUE : FALSE);
|
| 174 |
+
}
|
| 175 |
+
// Return TRUE if the panel is hidden, FALSE otherwise.
|
| 176 |
+
|
| 177 |
+
/* The functions panel_above() and panel_below() are not reflected in
|
| 178 |
+
the NCursesPanel class. The reason for this is, that we cannot
|
| 179 |
+
assume that a panel retrieved by those operations is one wrapped
|
| 180 |
+
by a C++ class. Although this situation might be handled, we also
|
| 181 |
+
need a reverse mapping from PANEL to NCursesPanel which needs some
|
| 182 |
+
redesign of the low level stuff. At the moment, we define them in the
|
| 183 |
+
interface but they will always produce an error. */
|
| 184 |
+
inline NCursesPanel& above() const
|
| 185 |
+
{
|
| 186 |
+
OnError(ERR);
|
| 187 |
+
return *dummy;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
inline NCursesPanel& below() const
|
| 191 |
+
{
|
| 192 |
+
OnError(ERR);
|
| 193 |
+
return *dummy;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
// Those two are rewrites of the corresponding virtual members of
|
| 197 |
+
// NCursesWindow
|
| 198 |
+
virtual int refresh() NCURSES_OVERRIDE;
|
| 199 |
+
// Propagate all panel changes to the virtual screen and update the
|
| 200 |
+
// physical screen.
|
| 201 |
+
|
| 202 |
+
virtual int noutrefresh() NCURSES_OVERRIDE;
|
| 203 |
+
// Propagate all panel changes to the virtual screen.
|
| 204 |
+
|
| 205 |
+
static void redraw();
|
| 206 |
+
// Redraw all panels.
|
| 207 |
+
|
| 208 |
+
// decorations
|
| 209 |
+
virtual void frame(const char* title=NULL,
|
| 210 |
+
const char* btitle=NULL);
|
| 211 |
+
// Put a frame around the panel and put the title centered in the top line
|
| 212 |
+
// and btitle in the bottom line.
|
| 213 |
+
|
| 214 |
+
virtual void boldframe(const char* title=NULL,
|
| 215 |
+
const char* btitle=NULL);
|
| 216 |
+
// Same as frame(), but use highlighted attributes.
|
| 217 |
+
|
| 218 |
+
virtual void label(const char* topLabel,
|
| 219 |
+
const char* bottomLabel);
|
| 220 |
+
// Put the title centered in the top line and btitle in the bottom line.
|
| 221 |
+
|
| 222 |
+
virtual void centertext(int row,const char* label);
|
| 223 |
+
// Put the label text centered in the specified row.
|
| 224 |
+
};
|
| 225 |
+
|
| 226 |
+
/* We use templates to provide a typesafe mechanism to associate
|
| 227 |
+
* user data with a panel. A NCursesUserPanel<T> is a panel
|
| 228 |
+
* associated with some user data of type T.
|
| 229 |
+
*/
|
| 230 |
+
template<class T> class NCursesUserPanel : public NCursesPanel
|
| 231 |
+
{
|
| 232 |
+
public:
|
| 233 |
+
NCursesUserPanel (int nlines,
|
| 234 |
+
int ncols,
|
| 235 |
+
int begin_y = 0,
|
| 236 |
+
int begin_x = 0,
|
| 237 |
+
const T* p_UserData = STATIC_CAST(T*)(0))
|
| 238 |
+
: NCursesPanel (nlines, ncols, begin_y, begin_x)
|
| 239 |
+
{
|
| 240 |
+
if (p)
|
| 241 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>
|
| 242 |
+
(p_UserData)));
|
| 243 |
+
};
|
| 244 |
+
// This creates an user panel of the requested size with associated
|
| 245 |
+
// user data pointed to by p_UserData.
|
| 246 |
+
|
| 247 |
+
explicit NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
|
| 248 |
+
{
|
| 249 |
+
if (p)
|
| 250 |
+
set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 251 |
+
};
|
| 252 |
+
// This creates an user panel associated with the ::stdscr and user data
|
| 253 |
+
// pointed to by p_UserData.
|
| 254 |
+
|
| 255 |
+
virtual ~NCursesUserPanel() THROWS(NCursesException) {};
|
| 256 |
+
|
| 257 |
+
T* UserData (void)
|
| 258 |
+
{
|
| 259 |
+
return reinterpret_cast<T*>(get_user ());
|
| 260 |
+
};
|
| 261 |
+
// Retrieve the user data associated with the panel.
|
| 262 |
+
|
| 263 |
+
virtual void setUserData (const T* p_UserData)
|
| 264 |
+
{
|
| 265 |
+
if (p)
|
| 266 |
+
set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
|
| 267 |
+
}
|
| 268 |
+
// Associate the user panel with the user data pointed to by p_UserData.
|
| 269 |
+
};
|
| 270 |
+
|
| 271 |
+
#endif /* NCURSES_CURSESP_H_incl */
|
data/miniconda3/include/ncursesw/cursesw.h
ADDED
|
@@ -0,0 +1,1581 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
#ifndef NCURSES_CURSESW_H_incl
|
| 33 |
+
#define NCURSES_CURSESW_H_incl 1
|
| 34 |
+
|
| 35 |
+
// $Id: cursesw.h,v 1.59 2022/08/20 20:52:15 tom Exp $
|
| 36 |
+
|
| 37 |
+
extern "C" {
|
| 38 |
+
# include <ncursesw/curses.h>
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
#if defined(BUILDING_NCURSES_CXX)
|
| 42 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 43 |
+
#else
|
| 44 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 48 |
+
|
| 49 |
+
#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API
|
| 50 |
+
#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type
|
| 51 |
+
|
| 52 |
+
#include <ncursesw/etip.h>
|
| 53 |
+
|
| 54 |
+
/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
|
| 55 |
+
Undefine it here, because NCursesWindow uses lines as a method. */
|
| 56 |
+
#undef lines
|
| 57 |
+
|
| 58 |
+
/* "Convert" macros to inlines. We'll define it as another symbol to avoid
|
| 59 |
+
* conflict with library symbols.
|
| 60 |
+
*/
|
| 61 |
+
#undef UNDEF
|
| 62 |
+
#define UNDEF(name) CUR_ ##name
|
| 63 |
+
|
| 64 |
+
#ifdef addch
|
| 65 |
+
inline int UNDEF(addch)(chtype ch) { return addch(ch); }
|
| 66 |
+
#undef addch
|
| 67 |
+
#define addch UNDEF(addch)
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
#ifdef addchstr
|
| 71 |
+
inline int UNDEF(addchstr)(chtype *at) { return addchstr(at); }
|
| 72 |
+
#undef addchstr
|
| 73 |
+
#define addchstr UNDEF(addchstr)
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#ifdef addnstr
|
| 77 |
+
inline int UNDEF(addnstr)(const char *str, int n)
|
| 78 |
+
{ return addnstr(str, n); }
|
| 79 |
+
#undef addnstr
|
| 80 |
+
#define addnstr UNDEF(addnstr)
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
#ifdef addstr
|
| 84 |
+
inline int UNDEF(addstr)(const char * str) { return addstr(str); }
|
| 85 |
+
#undef addstr
|
| 86 |
+
#define addstr UNDEF(addstr)
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
#ifdef attroff
|
| 90 |
+
inline int UNDEF(attroff)(chtype at) { return attroff(at); }
|
| 91 |
+
#undef attroff
|
| 92 |
+
#define attroff UNDEF(attroff)
|
| 93 |
+
#endif
|
| 94 |
+
|
| 95 |
+
#ifdef attron
|
| 96 |
+
inline int UNDEF(attron)(chtype at) { return attron(at); }
|
| 97 |
+
#undef attron
|
| 98 |
+
#define attron UNDEF(attron)
|
| 99 |
+
#endif
|
| 100 |
+
|
| 101 |
+
#ifdef attrset
|
| 102 |
+
inline chtype UNDEF(attrset)(chtype at) { return attrset(at); }
|
| 103 |
+
#undef attrset
|
| 104 |
+
#define attrset UNDEF(attrset)
|
| 105 |
+
#endif
|
| 106 |
+
|
| 107 |
+
#ifdef bkgd
|
| 108 |
+
inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); }
|
| 109 |
+
#undef bkgd
|
| 110 |
+
#define bkgd UNDEF(bkgd)
|
| 111 |
+
#endif
|
| 112 |
+
|
| 113 |
+
#ifdef bkgdset
|
| 114 |
+
inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); }
|
| 115 |
+
#undef bkgdset
|
| 116 |
+
#define bkgdset UNDEF(bkgdset)
|
| 117 |
+
#endif
|
| 118 |
+
|
| 119 |
+
#ifdef border
|
| 120 |
+
inline int UNDEF(border)(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
|
| 121 |
+
{ return border(ls, rs, ts, bs, tl, tr, bl, br); }
|
| 122 |
+
#undef border
|
| 123 |
+
#define border UNDEF(border)
|
| 124 |
+
#endif
|
| 125 |
+
|
| 126 |
+
#ifdef box
|
| 127 |
+
inline int UNDEF(box)(WINDOW *win, int v, int h) { return box(win, v, h); }
|
| 128 |
+
#undef box
|
| 129 |
+
#define box UNDEF(box)
|
| 130 |
+
#endif
|
| 131 |
+
|
| 132 |
+
#ifdef chgat
|
| 133 |
+
inline int UNDEF(chgat)(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 134 |
+
return chgat(n, attr, color, opts); }
|
| 135 |
+
#undef chgat
|
| 136 |
+
#define chgat UNDEF(chgat)
|
| 137 |
+
#endif
|
| 138 |
+
|
| 139 |
+
#ifdef clear
|
| 140 |
+
inline int UNDEF(clear)() { return clear(); }
|
| 141 |
+
#undef clear
|
| 142 |
+
#define clear UNDEF(clear)
|
| 143 |
+
#endif
|
| 144 |
+
|
| 145 |
+
#ifdef clearok
|
| 146 |
+
inline int UNDEF(clearok)(WINDOW* win, bool bf) { return clearok(win, bf); }
|
| 147 |
+
#undef clearok
|
| 148 |
+
#define clearok UNDEF(clearok)
|
| 149 |
+
#else
|
| 150 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API clearok(WINDOW*, bool);
|
| 151 |
+
#endif
|
| 152 |
+
|
| 153 |
+
#ifdef clrtobot
|
| 154 |
+
inline int UNDEF(clrtobot)() { return clrtobot(); }
|
| 155 |
+
#undef clrtobot
|
| 156 |
+
#define clrtobot UNDEF(clrtobot)
|
| 157 |
+
#endif
|
| 158 |
+
|
| 159 |
+
#ifdef clrtoeol
|
| 160 |
+
inline int UNDEF(clrtoeol)() { return clrtoeol(); }
|
| 161 |
+
#undef clrtoeol
|
| 162 |
+
#define clrtoeol UNDEF(clrtoeol)
|
| 163 |
+
#endif
|
| 164 |
+
|
| 165 |
+
#ifdef color_set
|
| 166 |
+
inline chtype UNDEF(color_set)(NCURSES_PAIRS_T p, void* opts) { return color_set(p, opts); }
|
| 167 |
+
#undef color_set
|
| 168 |
+
#define color_set UNDEF(color_set)
|
| 169 |
+
#endif
|
| 170 |
+
|
| 171 |
+
#ifdef crmode
|
| 172 |
+
inline int UNDEF(crmode)(void) { return crmode(); }
|
| 173 |
+
#undef crmode
|
| 174 |
+
#define crmode UNDEF(crmode)
|
| 175 |
+
#endif
|
| 176 |
+
|
| 177 |
+
#ifdef delch
|
| 178 |
+
inline int UNDEF(delch)() { return delch(); }
|
| 179 |
+
#undef delch
|
| 180 |
+
#define delch UNDEF(delch)
|
| 181 |
+
#endif
|
| 182 |
+
|
| 183 |
+
#ifdef deleteln
|
| 184 |
+
inline int UNDEF(deleteln)() { return deleteln(); }
|
| 185 |
+
#undef deleteln
|
| 186 |
+
#define deleteln UNDEF(deleteln)
|
| 187 |
+
#endif
|
| 188 |
+
|
| 189 |
+
#ifdef echochar
|
| 190 |
+
inline int UNDEF(echochar)(chtype ch) { return echochar(ch); }
|
| 191 |
+
#undef echochar
|
| 192 |
+
#define echochar UNDEF(echochar)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
#ifdef erase
|
| 196 |
+
inline int UNDEF(erase)() { return erase(); }
|
| 197 |
+
#undef erase
|
| 198 |
+
#define erase UNDEF(erase)
|
| 199 |
+
#endif
|
| 200 |
+
|
| 201 |
+
#ifdef fixterm
|
| 202 |
+
inline int UNDEF(fixterm)(void) { return fixterm(); }
|
| 203 |
+
#undef fixterm
|
| 204 |
+
#define fixterm UNDEF(fixterm)
|
| 205 |
+
#endif
|
| 206 |
+
|
| 207 |
+
#ifdef flushok
|
| 208 |
+
inline int UNDEF(flushok)(WINDOW* _win, bool _bf) {
|
| 209 |
+
return flushok(_win, _bf); }
|
| 210 |
+
#undef flushok
|
| 211 |
+
#define flushok UNDEF(flushok)
|
| 212 |
+
#else
|
| 213 |
+
#define _no_flushok
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
#ifdef getattrs
|
| 217 |
+
inline int UNDEF(getattrs)(WINDOW *win) { return getattrs(win); }
|
| 218 |
+
#undef getattrs
|
| 219 |
+
#define getattrs UNDEF(getattrs)
|
| 220 |
+
#endif
|
| 221 |
+
|
| 222 |
+
#ifdef getbegyx
|
| 223 |
+
inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); }
|
| 224 |
+
#undef getbegyx
|
| 225 |
+
#define getbegyx UNDEF(getbegyx)
|
| 226 |
+
#endif
|
| 227 |
+
|
| 228 |
+
#ifdef getbkgd
|
| 229 |
+
inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); }
|
| 230 |
+
#undef getbkgd
|
| 231 |
+
#define getbkgd UNDEF(getbkgd)
|
| 232 |
+
#endif
|
| 233 |
+
|
| 234 |
+
#ifdef getch
|
| 235 |
+
inline int UNDEF(getch)() { return getch(); }
|
| 236 |
+
#undef getch
|
| 237 |
+
#define getch UNDEF(getch)
|
| 238 |
+
#endif
|
| 239 |
+
|
| 240 |
+
#ifdef getmaxyx
|
| 241 |
+
inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); }
|
| 242 |
+
#undef getmaxyx
|
| 243 |
+
#define getmaxyx UNDEF(getmaxyx)
|
| 244 |
+
#endif
|
| 245 |
+
|
| 246 |
+
#ifdef getnstr
|
| 247 |
+
inline int UNDEF(getnstr)(char *_str, int n) { return getnstr(_str, n); }
|
| 248 |
+
#undef getnstr
|
| 249 |
+
#define getnstr UNDEF(getnstr)
|
| 250 |
+
#endif
|
| 251 |
+
|
| 252 |
+
#ifdef getparyx
|
| 253 |
+
inline void UNDEF(getparyx)(WINDOW* win, int& y, int& x) { getparyx(win, y, x); }
|
| 254 |
+
#undef getparyx
|
| 255 |
+
#define getparyx UNDEF(getparyx)
|
| 256 |
+
#endif
|
| 257 |
+
|
| 258 |
+
#ifdef getstr
|
| 259 |
+
inline int UNDEF(getstr)(char *_str) { return getstr(_str); }
|
| 260 |
+
#undef getstr
|
| 261 |
+
#define getstr UNDEF(getstr)
|
| 262 |
+
#endif
|
| 263 |
+
|
| 264 |
+
#ifdef getyx
|
| 265 |
+
inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
|
| 266 |
+
getyx(win, y, x); }
|
| 267 |
+
#undef getyx
|
| 268 |
+
#define getyx UNDEF(getyx)
|
| 269 |
+
#endif
|
| 270 |
+
|
| 271 |
+
#ifdef hline
|
| 272 |
+
inline int UNDEF(hline)(chtype ch, int n) { return hline(ch, n); }
|
| 273 |
+
#undef hline
|
| 274 |
+
#define hline UNDEF(hline)
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef inch
|
| 278 |
+
inline chtype UNDEF(inch)() { return inch(); }
|
| 279 |
+
#undef inch
|
| 280 |
+
#define inch UNDEF(inch)
|
| 281 |
+
#endif
|
| 282 |
+
|
| 283 |
+
#ifdef inchstr
|
| 284 |
+
inline int UNDEF(inchstr)(chtype *str) { return inchstr(str); }
|
| 285 |
+
#undef inchstr
|
| 286 |
+
#define inchstr UNDEF(inchstr)
|
| 287 |
+
#endif
|
| 288 |
+
|
| 289 |
+
#ifdef innstr
|
| 290 |
+
inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str, n); }
|
| 291 |
+
#undef innstr
|
| 292 |
+
#define innstr UNDEF(innstr)
|
| 293 |
+
#endif
|
| 294 |
+
|
| 295 |
+
#ifdef insch
|
| 296 |
+
inline int UNDEF(insch)(chtype c) { return insch(c); }
|
| 297 |
+
#undef insch
|
| 298 |
+
#define insch UNDEF(insch)
|
| 299 |
+
#endif
|
| 300 |
+
|
| 301 |
+
#ifdef insdelln
|
| 302 |
+
inline int UNDEF(insdelln)(int n) { return insdelln(n); }
|
| 303 |
+
#undef insdelln
|
| 304 |
+
#define insdelln UNDEF(insdelln)
|
| 305 |
+
#endif
|
| 306 |
+
|
| 307 |
+
#ifdef insertln
|
| 308 |
+
inline int UNDEF(insertln)() { return insertln(); }
|
| 309 |
+
#undef insertln
|
| 310 |
+
#define insertln UNDEF(insertln)
|
| 311 |
+
#endif
|
| 312 |
+
|
| 313 |
+
#ifdef insnstr
|
| 314 |
+
inline int UNDEF(insnstr)(const char *_str, int n) {
|
| 315 |
+
return insnstr(_str, n); }
|
| 316 |
+
#undef insnstr
|
| 317 |
+
#define insnstr UNDEF(insnstr)
|
| 318 |
+
#endif
|
| 319 |
+
|
| 320 |
+
#ifdef insstr
|
| 321 |
+
inline int UNDEF(insstr)(const char *_str) {
|
| 322 |
+
return insstr(_str); }
|
| 323 |
+
#undef insstr
|
| 324 |
+
#define insstr UNDEF(insstr)
|
| 325 |
+
#endif
|
| 326 |
+
|
| 327 |
+
#ifdef instr
|
| 328 |
+
inline int UNDEF(instr)(char *_str) { return instr(_str); }
|
| 329 |
+
#undef instr
|
| 330 |
+
#define instr UNDEF(instr)
|
| 331 |
+
#endif
|
| 332 |
+
|
| 333 |
+
#ifdef intrflush
|
| 334 |
+
inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); }
|
| 335 |
+
#undef intrflush
|
| 336 |
+
#define intrflush UNDEF(intrflush)
|
| 337 |
+
#endif
|
| 338 |
+
|
| 339 |
+
#ifdef is_linetouched
|
| 340 |
+
inline int UNDEF(is_linetouched)(WINDOW *w, int l) { return is_linetouched(w,l); }
|
| 341 |
+
#undef is_linetouched
|
| 342 |
+
#define is_linetouched UNDEF(is_linetouched)
|
| 343 |
+
#endif
|
| 344 |
+
|
| 345 |
+
#ifdef leaveok
|
| 346 |
+
inline int UNDEF(leaveok)(WINDOW* win, bool bf) { return leaveok(win, bf); }
|
| 347 |
+
#undef leaveok
|
| 348 |
+
#define leaveok UNDEF(leaveok)
|
| 349 |
+
#else
|
| 350 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API leaveok(WINDOW* win, bool bf);
|
| 351 |
+
#endif
|
| 352 |
+
|
| 353 |
+
#ifdef move
|
| 354 |
+
inline int UNDEF(move)(int x, int y) { return move(x, y); }
|
| 355 |
+
#undef move
|
| 356 |
+
#define move UNDEF(move)
|
| 357 |
+
#endif
|
| 358 |
+
|
| 359 |
+
#ifdef mvaddch
|
| 360 |
+
inline int UNDEF(mvaddch)(int y, int x, chtype ch)
|
| 361 |
+
{ return mvaddch(y, x, ch); }
|
| 362 |
+
#undef mvaddch
|
| 363 |
+
#define mvaddch UNDEF(mvaddch)
|
| 364 |
+
#endif
|
| 365 |
+
|
| 366 |
+
#ifdef mvaddnstr
|
| 367 |
+
inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n)
|
| 368 |
+
{ return mvaddnstr(y, x, str, n); }
|
| 369 |
+
#undef mvaddnstr
|
| 370 |
+
#define mvaddnstr UNDEF(mvaddnstr)
|
| 371 |
+
#endif
|
| 372 |
+
|
| 373 |
+
#ifdef mvaddstr
|
| 374 |
+
inline int UNDEF(mvaddstr)(int y, int x, const char * str)
|
| 375 |
+
{ return mvaddstr(y, x, str); }
|
| 376 |
+
#undef mvaddstr
|
| 377 |
+
#define mvaddstr UNDEF(mvaddstr)
|
| 378 |
+
#endif
|
| 379 |
+
|
| 380 |
+
#ifdef mvchgat
|
| 381 |
+
inline int UNDEF(mvchgat)(int y, int x, int n,
|
| 382 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 383 |
+
return mvchgat(y, x, n, attr, color, opts); }
|
| 384 |
+
#undef mvchgat
|
| 385 |
+
#define mvchgat UNDEF(mvchgat)
|
| 386 |
+
#endif
|
| 387 |
+
|
| 388 |
+
#ifdef mvdelch
|
| 389 |
+
inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);}
|
| 390 |
+
#undef mvdelch
|
| 391 |
+
#define mvdelch UNDEF(mvdelch)
|
| 392 |
+
#endif
|
| 393 |
+
|
| 394 |
+
#ifdef mvgetch
|
| 395 |
+
inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);}
|
| 396 |
+
#undef mvgetch
|
| 397 |
+
#define mvgetch UNDEF(mvgetch)
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
#ifdef mvgetnstr
|
| 401 |
+
inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) {
|
| 402 |
+
return mvgetnstr(y, x, str, n);}
|
| 403 |
+
#undef mvgetnstr
|
| 404 |
+
#define mvgetnstr UNDEF(mvgetnstr)
|
| 405 |
+
#endif
|
| 406 |
+
|
| 407 |
+
#ifdef mvgetstr
|
| 408 |
+
inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);}
|
| 409 |
+
#undef mvgetstr
|
| 410 |
+
#define mvgetstr UNDEF(mvgetstr)
|
| 411 |
+
#endif
|
| 412 |
+
|
| 413 |
+
#ifdef mvinch
|
| 414 |
+
inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);}
|
| 415 |
+
#undef mvinch
|
| 416 |
+
#define mvinch UNDEF(mvinch)
|
| 417 |
+
#endif
|
| 418 |
+
|
| 419 |
+
#ifdef mvinnstr
|
| 420 |
+
inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
|
| 421 |
+
return mvinnstr(y, x, _str, n); }
|
| 422 |
+
#undef mvinnstr
|
| 423 |
+
#define mvinnstr UNDEF(mvinnstr)
|
| 424 |
+
#endif
|
| 425 |
+
|
| 426 |
+
#ifdef mvinsch
|
| 427 |
+
inline int UNDEF(mvinsch)(int y, int x, chtype c)
|
| 428 |
+
{ return mvinsch(y, x, c); }
|
| 429 |
+
#undef mvinsch
|
| 430 |
+
#define mvinsch UNDEF(mvinsch)
|
| 431 |
+
#endif
|
| 432 |
+
|
| 433 |
+
#ifdef mvinsnstr
|
| 434 |
+
inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) {
|
| 435 |
+
return mvinsnstr(y, x, _str, n); }
|
| 436 |
+
#undef mvinsnstr
|
| 437 |
+
#define mvinsnstr UNDEF(mvinsnstr)
|
| 438 |
+
#endif
|
| 439 |
+
|
| 440 |
+
#ifdef mvinsstr
|
| 441 |
+
inline int UNDEF(mvinsstr)(int y, int x, const char *_str) {
|
| 442 |
+
return mvinsstr(y, x, _str); }
|
| 443 |
+
#undef mvinsstr
|
| 444 |
+
#define mvinsstr UNDEF(mvinsstr)
|
| 445 |
+
#endif
|
| 446 |
+
|
| 447 |
+
#ifdef mvwaddch
|
| 448 |
+
inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch)
|
| 449 |
+
{ return mvwaddch(win, y, x, ch); }
|
| 450 |
+
#undef mvwaddch
|
| 451 |
+
#define mvwaddch UNDEF(mvwaddch)
|
| 452 |
+
#endif
|
| 453 |
+
|
| 454 |
+
#ifdef mvwaddchnstr
|
| 455 |
+
inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, const chtype *str, int n)
|
| 456 |
+
{ return mvwaddchnstr(win, y, x, str, n); }
|
| 457 |
+
#undef mvwaddchnstr
|
| 458 |
+
#define mvwaddchnstr UNDEF(mvwaddchnstr)
|
| 459 |
+
#endif
|
| 460 |
+
|
| 461 |
+
#ifdef mvwaddchstr
|
| 462 |
+
inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, const chtype *str)
|
| 463 |
+
{ return mvwaddchstr(win, y, x, str); }
|
| 464 |
+
#undef mvwaddchstr
|
| 465 |
+
#define mvwaddchstr UNDEF(mvwaddchstr)
|
| 466 |
+
#endif
|
| 467 |
+
|
| 468 |
+
#ifdef mvwaddnstr
|
| 469 |
+
inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n)
|
| 470 |
+
{ return mvwaddnstr(win, y, x, str, n); }
|
| 471 |
+
#undef mvwaddnstr
|
| 472 |
+
#define mvwaddnstr UNDEF(mvwaddnstr)
|
| 473 |
+
#endif
|
| 474 |
+
|
| 475 |
+
#ifdef mvwaddstr
|
| 476 |
+
inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str)
|
| 477 |
+
{ return mvwaddstr(win, y, x, str); }
|
| 478 |
+
#undef mvwaddstr
|
| 479 |
+
#define mvwaddstr UNDEF(mvwaddstr)
|
| 480 |
+
#endif
|
| 481 |
+
|
| 482 |
+
#ifdef mvwchgat
|
| 483 |
+
inline int UNDEF(mvwchgat)(WINDOW *win, int y, int x, int n,
|
| 484 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 485 |
+
return mvwchgat(win, y, x, n, attr, color, opts); }
|
| 486 |
+
#undef mvwchgat
|
| 487 |
+
#define mvwchgat UNDEF(mvwchgat)
|
| 488 |
+
#endif
|
| 489 |
+
|
| 490 |
+
#ifdef mvwdelch
|
| 491 |
+
inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x)
|
| 492 |
+
{ return mvwdelch(win, y, x); }
|
| 493 |
+
#undef mvwdelch
|
| 494 |
+
#define mvwdelch UNDEF(mvwdelch)
|
| 495 |
+
#endif
|
| 496 |
+
|
| 497 |
+
#ifdef mvwgetch
|
| 498 |
+
inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);}
|
| 499 |
+
#undef mvwgetch
|
| 500 |
+
#define mvwgetch UNDEF(mvwgetch)
|
| 501 |
+
#endif
|
| 502 |
+
|
| 503 |
+
#ifdef mvwgetnstr
|
| 504 |
+
inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n)
|
| 505 |
+
{return mvwgetnstr(win, y, x, str, n);}
|
| 506 |
+
#undef mvwgetnstr
|
| 507 |
+
#define mvwgetnstr UNDEF(mvwgetnstr)
|
| 508 |
+
#endif
|
| 509 |
+
|
| 510 |
+
#ifdef mvwgetstr
|
| 511 |
+
inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str)
|
| 512 |
+
{return mvwgetstr(win, y, x, str);}
|
| 513 |
+
#undef mvwgetstr
|
| 514 |
+
#define mvwgetstr UNDEF(mvwgetstr)
|
| 515 |
+
#endif
|
| 516 |
+
|
| 517 |
+
#ifdef mvwhline
|
| 518 |
+
inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 519 |
+
return mvwhline(win, y, x, c, n); }
|
| 520 |
+
#undef mvwhline
|
| 521 |
+
#define mvwhline UNDEF(mvwhline)
|
| 522 |
+
#endif
|
| 523 |
+
|
| 524 |
+
#ifdef mvwinch
|
| 525 |
+
inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
|
| 526 |
+
return mvwinch(win, y, x);}
|
| 527 |
+
#undef mvwinch
|
| 528 |
+
#define mvwinch UNDEF(mvwinch)
|
| 529 |
+
#endif
|
| 530 |
+
|
| 531 |
+
#ifdef mvwinchnstr
|
| 532 |
+
inline int UNDEF(mvwinchnstr)(WINDOW *win, int y, int x, chtype *str, int n) { return mvwinchnstr(win, y, x, str, n); }
|
| 533 |
+
#undef mvwinchnstr
|
| 534 |
+
#define mvwinchnstr UNDEF(mvwinchnstr)
|
| 535 |
+
#endif
|
| 536 |
+
|
| 537 |
+
#ifdef mvwinchstr
|
| 538 |
+
inline int UNDEF(mvwinchstr)(WINDOW *win, int y, int x, chtype *str) { return mvwinchstr(win, y, x, str); }
|
| 539 |
+
#undef mvwinchstr
|
| 540 |
+
#define mvwinchstr UNDEF(mvwinchstr)
|
| 541 |
+
#endif
|
| 542 |
+
|
| 543 |
+
#ifdef mvwinnstr
|
| 544 |
+
inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
|
| 545 |
+
return mvwinnstr(win, y, x, _str, n); }
|
| 546 |
+
#undef mvwinnstr
|
| 547 |
+
#define mvwinnstr UNDEF(mvwinnstr)
|
| 548 |
+
#endif
|
| 549 |
+
|
| 550 |
+
#ifdef mvwinsch
|
| 551 |
+
inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c)
|
| 552 |
+
{ return mvwinsch(win, y, x, c); }
|
| 553 |
+
#undef mvwinsch
|
| 554 |
+
#define mvwinsch UNDEF(mvwinsch)
|
| 555 |
+
#endif
|
| 556 |
+
|
| 557 |
+
#ifdef mvwinsnstr
|
| 558 |
+
inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) {
|
| 559 |
+
return mvwinsnstr(w, y, x, _str, n); }
|
| 560 |
+
#undef mvwinsnstr
|
| 561 |
+
#define mvwinsnstr UNDEF(mvwinsnstr)
|
| 562 |
+
#endif
|
| 563 |
+
|
| 564 |
+
#ifdef mvwinsstr
|
| 565 |
+
inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) {
|
| 566 |
+
return mvwinsstr(w, y, x, _str); }
|
| 567 |
+
#undef mvwinsstr
|
| 568 |
+
#define mvwinsstr UNDEF(mvwinsstr)
|
| 569 |
+
#endif
|
| 570 |
+
|
| 571 |
+
#ifdef mvwvline
|
| 572 |
+
inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 573 |
+
return mvwvline(win, y, x, c, n); }
|
| 574 |
+
#undef mvwvline
|
| 575 |
+
#define mvwvline UNDEF(mvwvline)
|
| 576 |
+
#endif
|
| 577 |
+
|
| 578 |
+
#ifdef napms
|
| 579 |
+
inline void UNDEF(napms)(unsigned long x) { napms(x); }
|
| 580 |
+
#undef napms
|
| 581 |
+
#define napms UNDEF(napms)
|
| 582 |
+
#endif
|
| 583 |
+
|
| 584 |
+
#ifdef nocrmode
|
| 585 |
+
inline int UNDEF(nocrmode)(void) { return nocrmode(); }
|
| 586 |
+
#undef nocrmode
|
| 587 |
+
#define nocrmode UNDEF(nocrmode)
|
| 588 |
+
#endif
|
| 589 |
+
|
| 590 |
+
#ifdef nodelay
|
| 591 |
+
inline void UNDEF(nodelay)() { nodelay(); }
|
| 592 |
+
#undef nodelay
|
| 593 |
+
#define nodelay UNDEF(nodelay)
|
| 594 |
+
#endif
|
| 595 |
+
|
| 596 |
+
#ifdef redrawwin
|
| 597 |
+
inline int UNDEF(redrawwin)(WINDOW *win) { return redrawwin(win); }
|
| 598 |
+
#undef redrawwin
|
| 599 |
+
#define redrawwin UNDEF(redrawwin)
|
| 600 |
+
#endif
|
| 601 |
+
|
| 602 |
+
#ifdef refresh
|
| 603 |
+
inline int UNDEF(refresh)() { return refresh(); }
|
| 604 |
+
#undef refresh
|
| 605 |
+
#define refresh UNDEF(refresh)
|
| 606 |
+
#endif
|
| 607 |
+
|
| 608 |
+
#ifdef resetterm
|
| 609 |
+
inline int UNDEF(resetterm)(void) { return resetterm(); }
|
| 610 |
+
#undef resetterm
|
| 611 |
+
#define resetterm UNDEF(resetterm)
|
| 612 |
+
#endif
|
| 613 |
+
|
| 614 |
+
#ifdef saveterm
|
| 615 |
+
inline int UNDEF(saveterm)(void) { return saveterm(); }
|
| 616 |
+
#undef saveterm
|
| 617 |
+
#define saveterm UNDEF(saveterm)
|
| 618 |
+
#endif
|
| 619 |
+
|
| 620 |
+
#ifdef scrl
|
| 621 |
+
inline int UNDEF(scrl)(int l) { return scrl(l); }
|
| 622 |
+
#undef scrl
|
| 623 |
+
#define scrl UNDEF(scrl)
|
| 624 |
+
#endif
|
| 625 |
+
|
| 626 |
+
#ifdef scroll
|
| 627 |
+
inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); }
|
| 628 |
+
#undef scroll
|
| 629 |
+
#define scroll UNDEF(scroll)
|
| 630 |
+
#endif
|
| 631 |
+
|
| 632 |
+
#ifdef scrollok
|
| 633 |
+
inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); }
|
| 634 |
+
#undef scrollok
|
| 635 |
+
#define scrollok UNDEF(scrollok)
|
| 636 |
+
#else
|
| 637 |
+
#if defined(__NCURSES_H)
|
| 638 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool);
|
| 639 |
+
#else
|
| 640 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char);
|
| 641 |
+
#endif
|
| 642 |
+
#endif
|
| 643 |
+
|
| 644 |
+
#ifdef setscrreg
|
| 645 |
+
inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); }
|
| 646 |
+
#undef setscrreg
|
| 647 |
+
#define setscrreg UNDEF(setscrreg)
|
| 648 |
+
#endif
|
| 649 |
+
|
| 650 |
+
#ifdef standend
|
| 651 |
+
inline int UNDEF(standend)() { return standend(); }
|
| 652 |
+
#undef standend
|
| 653 |
+
#define standend UNDEF(standend)
|
| 654 |
+
#endif
|
| 655 |
+
|
| 656 |
+
#ifdef standout
|
| 657 |
+
inline int UNDEF(standout)() { return standout(); }
|
| 658 |
+
#undef standout
|
| 659 |
+
#define standout UNDEF(standout)
|
| 660 |
+
#endif
|
| 661 |
+
|
| 662 |
+
#ifdef subpad
|
| 663 |
+
inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
|
| 664 |
+
{ return derwin(p, l, c, y, x); }
|
| 665 |
+
#undef subpad
|
| 666 |
+
#define subpad UNDEF(subpad)
|
| 667 |
+
#endif
|
| 668 |
+
|
| 669 |
+
#ifdef timeout
|
| 670 |
+
inline void UNDEF(timeout)(int delay) { timeout(delay); }
|
| 671 |
+
#undef timeout
|
| 672 |
+
#define timeout UNDEF(timeout)
|
| 673 |
+
#endif
|
| 674 |
+
|
| 675 |
+
#ifdef touchline
|
| 676 |
+
inline int UNDEF(touchline)(WINDOW *win, int s, int c)
|
| 677 |
+
{ return touchline(win, s, c); }
|
| 678 |
+
#undef touchline
|
| 679 |
+
#define touchline UNDEF(touchline)
|
| 680 |
+
#endif
|
| 681 |
+
|
| 682 |
+
#ifdef touchwin
|
| 683 |
+
inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); }
|
| 684 |
+
#undef touchwin
|
| 685 |
+
#define touchwin UNDEF(touchwin)
|
| 686 |
+
#endif
|
| 687 |
+
|
| 688 |
+
#ifdef untouchwin
|
| 689 |
+
inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); }
|
| 690 |
+
#undef untouchwin
|
| 691 |
+
#define untouchwin UNDEF(untouchwin)
|
| 692 |
+
#endif
|
| 693 |
+
|
| 694 |
+
#ifdef vline
|
| 695 |
+
inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); }
|
| 696 |
+
#undef vline
|
| 697 |
+
#define vline UNDEF(vline)
|
| 698 |
+
#endif
|
| 699 |
+
|
| 700 |
+
#ifdef waddchstr
|
| 701 |
+
inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); }
|
| 702 |
+
#undef waddchstr
|
| 703 |
+
#define waddchstr UNDEF(waddchstr)
|
| 704 |
+
#endif
|
| 705 |
+
|
| 706 |
+
#ifdef waddstr
|
| 707 |
+
inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); }
|
| 708 |
+
#undef waddstr
|
| 709 |
+
#define waddstr UNDEF(waddstr)
|
| 710 |
+
#endif
|
| 711 |
+
|
| 712 |
+
#ifdef wattroff
|
| 713 |
+
inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); }
|
| 714 |
+
#undef wattroff
|
| 715 |
+
#define wattroff UNDEF(wattroff)
|
| 716 |
+
#endif
|
| 717 |
+
|
| 718 |
+
#ifdef wattrset
|
| 719 |
+
inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); }
|
| 720 |
+
#undef wattrset
|
| 721 |
+
#define wattrset UNDEF(wattrset)
|
| 722 |
+
#endif
|
| 723 |
+
|
| 724 |
+
#ifdef winch
|
| 725 |
+
inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); }
|
| 726 |
+
#undef winch
|
| 727 |
+
#define winch UNDEF(winch)
|
| 728 |
+
#endif
|
| 729 |
+
|
| 730 |
+
#ifdef winchnstr
|
| 731 |
+
inline int UNDEF(winchnstr)(WINDOW *win, chtype *str, int n) { return winchnstr(win, str, n); }
|
| 732 |
+
#undef winchnstr
|
| 733 |
+
#define winchnstr UNDEF(winchnstr)
|
| 734 |
+
#endif
|
| 735 |
+
|
| 736 |
+
#ifdef winchstr
|
| 737 |
+
inline int UNDEF(winchstr)(WINDOW *win, chtype *str) { return winchstr(win, str); }
|
| 738 |
+
#undef winchstr
|
| 739 |
+
#define winchstr UNDEF(winchstr)
|
| 740 |
+
#endif
|
| 741 |
+
|
| 742 |
+
#ifdef winsstr
|
| 743 |
+
inline int UNDEF(winsstr)(WINDOW *w, const char *_str) {
|
| 744 |
+
return winsstr(w, _str); }
|
| 745 |
+
#undef winsstr
|
| 746 |
+
#define winsstr UNDEF(winsstr)
|
| 747 |
+
#endif
|
| 748 |
+
|
| 749 |
+
#ifdef wstandend
|
| 750 |
+
inline int UNDEF(wstandend)(WINDOW *win) { return wstandend(win); }
|
| 751 |
+
#undef wstandend
|
| 752 |
+
#define wstandend UNDEF(wstandend)
|
| 753 |
+
#endif
|
| 754 |
+
|
| 755 |
+
#ifdef wstandout
|
| 756 |
+
inline int UNDEF(wstandout)(WINDOW *win) { return wstandout(win); }
|
| 757 |
+
#undef wstandout
|
| 758 |
+
#define wstandout UNDEF(wstandout)
|
| 759 |
+
#endif
|
| 760 |
+
|
| 761 |
+
/*
|
| 762 |
+
*
|
| 763 |
+
* C++ class for windows.
|
| 764 |
+
*
|
| 765 |
+
*/
|
| 766 |
+
|
| 767 |
+
extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int));
|
| 768 |
+
extern "C" int _nc_xx_ripoff_init(WINDOW *, int);
|
| 769 |
+
extern "C" int _nc_has_mouse(void);
|
| 770 |
+
|
| 771 |
+
class NCURSES_CXX_IMPEXP NCursesWindow
|
| 772 |
+
{
|
| 773 |
+
friend class NCursesMenu;
|
| 774 |
+
friend class NCursesForm;
|
| 775 |
+
|
| 776 |
+
private:
|
| 777 |
+
static bool b_initialized;
|
| 778 |
+
static void initialize();
|
| 779 |
+
void constructing();
|
| 780 |
+
friend int _nc_xx_ripoff_init(WINDOW *, int);
|
| 781 |
+
|
| 782 |
+
void set_keyboard();
|
| 783 |
+
|
| 784 |
+
NCURSES_COLOR_T getcolor(int getback) const;
|
| 785 |
+
NCURSES_PAIRS_T getPair() const;
|
| 786 |
+
|
| 787 |
+
static int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back, NCURSES_PAIRS_T pair);
|
| 788 |
+
static int colorInitialized;
|
| 789 |
+
|
| 790 |
+
// This private constructor is only used during the initialization
|
| 791 |
+
// of windows generated by ripoffline() calls.
|
| 792 |
+
NCursesWindow(WINDOW* win, int ncols);
|
| 793 |
+
|
| 794 |
+
protected:
|
| 795 |
+
virtual void err_handler(const char *) const THROWS(NCursesException);
|
| 796 |
+
// Signal an error with the given message text.
|
| 797 |
+
|
| 798 |
+
static long count; // count of all active windows:
|
| 799 |
+
// We rely on the c++ promise that
|
| 800 |
+
// all otherwise uninitialized
|
| 801 |
+
// static class vars are set to 0
|
| 802 |
+
|
| 803 |
+
WINDOW* w; // the curses WINDOW
|
| 804 |
+
|
| 805 |
+
bool alloced; // TRUE if we own the WINDOW
|
| 806 |
+
|
| 807 |
+
NCursesWindow* par; // parent, if subwindow
|
| 808 |
+
NCursesWindow* subwins; // head of subwindows list
|
| 809 |
+
NCursesWindow* sib; // next subwindow of parent
|
| 810 |
+
|
| 811 |
+
void kill_subwindows(); // disable all subwindows
|
| 812 |
+
// Destroy all subwindows.
|
| 813 |
+
|
| 814 |
+
/* Only for use by derived classes. They are then in charge to
|
| 815 |
+
fill the member variables correctly. */
|
| 816 |
+
NCursesWindow();
|
| 817 |
+
|
| 818 |
+
public:
|
| 819 |
+
explicit NCursesWindow(WINDOW* window); // useful only for stdscr
|
| 820 |
+
|
| 821 |
+
NCursesWindow(int nlines, // number of lines
|
| 822 |
+
int ncols, // number of columns
|
| 823 |
+
int begin_y, // line origin
|
| 824 |
+
int begin_x); // col origin
|
| 825 |
+
|
| 826 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 827 |
+
int nlines, // number of lines
|
| 828 |
+
int ncols, // number of columns
|
| 829 |
+
int begin_y, // absolute or relative
|
| 830 |
+
int begin_x, // origins:
|
| 831 |
+
char absrel = 'a');// if `a', begin_y & begin_x are
|
| 832 |
+
// absolute screen pos, else if `r', they are relative to par origin
|
| 833 |
+
|
| 834 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 835 |
+
bool do_box = TRUE);
|
| 836 |
+
// this is the very common case that we want to create the subwindow that
|
| 837 |
+
// is two lines and two columns smaller and begins at (1,1).
|
| 838 |
+
// We may automatically request the box around it.
|
| 839 |
+
|
| 840 |
+
NCursesWindow& operator=(const NCursesWindow& rhs)
|
| 841 |
+
{
|
| 842 |
+
if (this != &rhs)
|
| 843 |
+
*this = rhs;
|
| 844 |
+
return *this;
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
NCursesWindow(const NCursesWindow& rhs)
|
| 848 |
+
: w(rhs.w), alloced(rhs.alloced), par(rhs.par), subwins(rhs.subwins), sib(rhs.sib)
|
| 849 |
+
{
|
| 850 |
+
}
|
| 851 |
+
|
| 852 |
+
virtual ~NCursesWindow() THROWS(NCursesException);
|
| 853 |
+
|
| 854 |
+
NCursesWindow Clone();
|
| 855 |
+
// Make an exact copy of the window.
|
| 856 |
+
|
| 857 |
+
// Initialization.
|
| 858 |
+
static void useColors(void);
|
| 859 |
+
// Call this routine very early if you want to have colors.
|
| 860 |
+
|
| 861 |
+
static int ripoffline(int ripoff_lines,
|
| 862 |
+
int (*init)(NCursesWindow& win));
|
| 863 |
+
// This function is used to generate a window of ripped-of lines.
|
| 864 |
+
// If the argument is positive, lines are removed from the top, if it
|
| 865 |
+
// is negative lines are removed from the bottom. This enhances the
|
| 866 |
+
// lowlevel ripoffline() function because it uses the internal
|
| 867 |
+
// implementation that allows to remove more than just a single line.
|
| 868 |
+
// This function must be called before any other ncurses function. The
|
| 869 |
+
// creation of the window is deferred until ncurses gets initialized.
|
| 870 |
+
// The initialization function is then called.
|
| 871 |
+
|
| 872 |
+
// -------------------------------------------------------------------------
|
| 873 |
+
// terminal status
|
| 874 |
+
// -------------------------------------------------------------------------
|
| 875 |
+
int lines() const { initialize(); return LINES; }
|
| 876 |
+
// Number of lines on terminal, *not* window
|
| 877 |
+
|
| 878 |
+
int cols() const { initialize(); return COLS; }
|
| 879 |
+
// Number of cols on terminal, *not* window
|
| 880 |
+
|
| 881 |
+
int tabsize() const { initialize(); return TABSIZE; }
|
| 882 |
+
// Size of a tab on terminal, *not* window
|
| 883 |
+
|
| 884 |
+
static int NumberOfColors();
|
| 885 |
+
// Number of available colors
|
| 886 |
+
|
| 887 |
+
int colors() const { return NumberOfColors(); }
|
| 888 |
+
// Number of available colors
|
| 889 |
+
|
| 890 |
+
// -------------------------------------------------------------------------
|
| 891 |
+
// window status
|
| 892 |
+
// -------------------------------------------------------------------------
|
| 893 |
+
int height() const { return maxy() + 1; }
|
| 894 |
+
// Number of lines in this window
|
| 895 |
+
|
| 896 |
+
int width() const { return maxx() + 1; }
|
| 897 |
+
// Number of columns in this window
|
| 898 |
+
|
| 899 |
+
int begx() const { return getbegx(w); }
|
| 900 |
+
// Column of top left corner relative to stdscr
|
| 901 |
+
|
| 902 |
+
int begy() const { return getbegy(w); }
|
| 903 |
+
// Line of top left corner relative to stdscr
|
| 904 |
+
|
| 905 |
+
int curx() const { return getcurx(w); }
|
| 906 |
+
// Column of top left corner relative to stdscr
|
| 907 |
+
|
| 908 |
+
int cury() const { return getcury(w); }
|
| 909 |
+
// Line of top left corner relative to stdscr
|
| 910 |
+
|
| 911 |
+
int maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
|
| 912 |
+
// Largest x coord in window
|
| 913 |
+
|
| 914 |
+
int maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
|
| 915 |
+
// Largest y coord in window
|
| 916 |
+
|
| 917 |
+
NCURSES_PAIRS_T getcolor() const;
|
| 918 |
+
// Actual color pair
|
| 919 |
+
|
| 920 |
+
NCURSES_COLOR_T foreground() const { return getcolor(0); }
|
| 921 |
+
// Actual foreground color
|
| 922 |
+
|
| 923 |
+
NCURSES_COLOR_T background() const { return getcolor(1); }
|
| 924 |
+
// Actual background color
|
| 925 |
+
|
| 926 |
+
int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back);
|
| 927 |
+
// Set color palette entry
|
| 928 |
+
|
| 929 |
+
int setcolor(NCURSES_PAIRS_T pair);
|
| 930 |
+
// Set actually used palette entry
|
| 931 |
+
|
| 932 |
+
// -------------------------------------------------------------------------
|
| 933 |
+
// window positioning
|
| 934 |
+
// -------------------------------------------------------------------------
|
| 935 |
+
virtual int mvwin(int begin_y, int begin_x) {
|
| 936 |
+
return ::mvwin(w, begin_y, begin_x); }
|
| 937 |
+
// Move window to new position with the new position as top left corner.
|
| 938 |
+
// This is virtual because it is redefined in NCursesPanel.
|
| 939 |
+
|
| 940 |
+
// -------------------------------------------------------------------------
|
| 941 |
+
// coordinate positioning
|
| 942 |
+
// -------------------------------------------------------------------------
|
| 943 |
+
int move(int y, int x) { return ::wmove(w, y, x); }
|
| 944 |
+
// Move cursor the this position
|
| 945 |
+
|
| 946 |
+
void getyx(int& y, int& x) const { ::getyx(w, y, x); }
|
| 947 |
+
// Get current position of the cursor
|
| 948 |
+
|
| 949 |
+
void getbegyx(int& y, int& x) const { ::getbegyx(w, y, x); }
|
| 950 |
+
// Get beginning of the window
|
| 951 |
+
|
| 952 |
+
void getmaxyx(int& y, int& x) const { ::getmaxyx(w, y, x); }
|
| 953 |
+
// Get size of the window
|
| 954 |
+
|
| 955 |
+
void getparyx(int& y, int& x) const { ::getparyx(w, y, x); }
|
| 956 |
+
// Get parent's beginning of the window
|
| 957 |
+
|
| 958 |
+
int mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
|
| 959 |
+
return ::mvcur(oldrow, oldcol, newrow, newcol); }
|
| 960 |
+
// Perform lowlevel cursor motion that takes effect immediately.
|
| 961 |
+
|
| 962 |
+
// -------------------------------------------------------------------------
|
| 963 |
+
// input
|
| 964 |
+
// -------------------------------------------------------------------------
|
| 965 |
+
int getch() { return ::wgetch(w); }
|
| 966 |
+
// Get a keystroke from the window.
|
| 967 |
+
|
| 968 |
+
int getch(int y, int x) { return ::mvwgetch(w, y, x); }
|
| 969 |
+
// Move cursor to position and get a keystroke from the window
|
| 970 |
+
|
| 971 |
+
int getstr(char* str, int n=-1) {
|
| 972 |
+
return ::wgetnstr(w, str, n); }
|
| 973 |
+
// Read a series of characters into str until a newline or carriage return
|
| 974 |
+
// is received. Read at most n characters. If n is negative, the limit is
|
| 975 |
+
// ignored.
|
| 976 |
+
|
| 977 |
+
int getstr(int y, int x, char* str, int n=-1) {
|
| 978 |
+
return ::mvwgetnstr(w, y, x, str, n); }
|
| 979 |
+
// Move the cursor to the requested position and then perform the getstr()
|
| 980 |
+
// as described above.
|
| 981 |
+
|
| 982 |
+
int instr(char *s, int n=-1) { return ::winnstr(w, s, n); }
|
| 983 |
+
// Get a string of characters from the window into the buffer s. Retrieve
|
| 984 |
+
// at most n characters, if n is negative retrieve all characters up to the
|
| 985 |
+
// end of the current line. Attributes are stripped from the characters.
|
| 986 |
+
|
| 987 |
+
int instr(int y, int x, char *s, int n=-1) {
|
| 988 |
+
return ::mvwinnstr(w, y, x, s, n); }
|
| 989 |
+
// Move the cursor to the requested position and then perform the instr()
|
| 990 |
+
// as described above.
|
| 991 |
+
|
| 992 |
+
int scanw(const char* fmt, ...)
|
| 993 |
+
// Perform a scanw function from the window.
|
| 994 |
+
#if __GNUG__ >= 2
|
| 995 |
+
__attribute__ ((format (scanf, 2, 3)));
|
| 996 |
+
#else
|
| 997 |
+
;
|
| 998 |
+
#endif
|
| 999 |
+
|
| 1000 |
+
int scanw(const char*, va_list);
|
| 1001 |
+
// Perform a scanw function from the window.
|
| 1002 |
+
|
| 1003 |
+
int scanw(int y, int x, const char* fmt, ...)
|
| 1004 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1005 |
+
// from the window.
|
| 1006 |
+
#if __GNUG__ >= 2
|
| 1007 |
+
__attribute__ ((format (scanf, 4, 5)));
|
| 1008 |
+
#else
|
| 1009 |
+
;
|
| 1010 |
+
#endif
|
| 1011 |
+
|
| 1012 |
+
int scanw(int y, int x, const char* fmt, va_list);
|
| 1013 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1014 |
+
// from the window.
|
| 1015 |
+
|
| 1016 |
+
// -------------------------------------------------------------------------
|
| 1017 |
+
// output
|
| 1018 |
+
// -------------------------------------------------------------------------
|
| 1019 |
+
int addch(const chtype ch) { return ::waddch(w, ch); }
|
| 1020 |
+
// Put attributed character to the window.
|
| 1021 |
+
|
| 1022 |
+
int addch(int y, int x, const chtype ch) {
|
| 1023 |
+
return ::mvwaddch(w, y, x, ch); }
|
| 1024 |
+
// Move cursor to the requested position and then put attributed character
|
| 1025 |
+
// to the window.
|
| 1026 |
+
|
| 1027 |
+
int echochar(const chtype ch) { return ::wechochar(w, ch); }
|
| 1028 |
+
// Put attributed character to the window and refresh it immediately.
|
| 1029 |
+
|
| 1030 |
+
int addstr(const char* str, int n=-1) {
|
| 1031 |
+
return ::waddnstr(w, str, n); }
|
| 1032 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1033 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1034 |
+
|
| 1035 |
+
int addstr(int y, int x, const char * str, int n=-1) {
|
| 1036 |
+
return ::mvwaddnstr(w, y, x, str, n); }
|
| 1037 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1038 |
+
// as described above.
|
| 1039 |
+
|
| 1040 |
+
int addchstr(const chtype* str, int n=-1) {
|
| 1041 |
+
return ::waddchnstr(w, str, n); }
|
| 1042 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1043 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1044 |
+
|
| 1045 |
+
int addchstr(int y, int x, const chtype * str, int n=-1) {
|
| 1046 |
+
return ::mvwaddchnstr(w, y, x, str, n); }
|
| 1047 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1048 |
+
// as described above.
|
| 1049 |
+
|
| 1050 |
+
int printw(const char* fmt, ...)
|
| 1051 |
+
// Do a formatted print to the window.
|
| 1052 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1053 |
+
__attribute__ ((format (printf, 2, 3)));
|
| 1054 |
+
#else
|
| 1055 |
+
;
|
| 1056 |
+
#endif
|
| 1057 |
+
|
| 1058 |
+
int printw(int y, int x, const char * fmt, ...)
|
| 1059 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1060 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1061 |
+
__attribute__ ((format (printf, 4, 5)));
|
| 1062 |
+
#else
|
| 1063 |
+
;
|
| 1064 |
+
#endif
|
| 1065 |
+
|
| 1066 |
+
int printw(const char* fmt, va_list args);
|
| 1067 |
+
// Do a formatted print to the window.
|
| 1068 |
+
|
| 1069 |
+
int printw(int y, int x, const char * fmt, va_list args);
|
| 1070 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1071 |
+
|
| 1072 |
+
chtype inch() const { return ::winch(w); }
|
| 1073 |
+
// Retrieve attributed character under the current cursor position.
|
| 1074 |
+
|
| 1075 |
+
chtype inch(int y, int x) { return ::mvwinch(w, y, x); }
|
| 1076 |
+
// Move cursor to requested position and then retrieve attributed character
|
| 1077 |
+
// at this position.
|
| 1078 |
+
|
| 1079 |
+
int inchstr(chtype* str, int n=-1) {
|
| 1080 |
+
return ::winchnstr(w, str, n); }
|
| 1081 |
+
// Read the string str from the window, stop reading if the terminating
|
| 1082 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1083 |
+
|
| 1084 |
+
int inchstr(int y, int x, chtype * str, int n=-1) {
|
| 1085 |
+
return ::mvwinchnstr(w, y, x, str, n); }
|
| 1086 |
+
// Move the cursor to the requested position and then perform the inchstr
|
| 1087 |
+
// as described above.
|
| 1088 |
+
|
| 1089 |
+
int insch(chtype ch) { return ::winsch(w, ch); }
|
| 1090 |
+
// Insert attributed character into the window before current cursor
|
| 1091 |
+
// position.
|
| 1092 |
+
|
| 1093 |
+
int insch(int y, int x, chtype ch) {
|
| 1094 |
+
return ::mvwinsch(w, y, x, ch); }
|
| 1095 |
+
// Move cursor to requested position and then insert the attributed
|
| 1096 |
+
// character before that position.
|
| 1097 |
+
|
| 1098 |
+
int insertln() { return ::winsdelln(w, 1); }
|
| 1099 |
+
// Insert an empty line above the current line.
|
| 1100 |
+
|
| 1101 |
+
int insdelln(int n=1) { return ::winsdelln(w, n); }
|
| 1102 |
+
// If n>0 insert that many lines above the current line. If n<0 delete
|
| 1103 |
+
// that many lines beginning with the current line.
|
| 1104 |
+
|
| 1105 |
+
int insstr(const char *s, int n=-1) {
|
| 1106 |
+
return ::winsnstr(w, s, n); }
|
| 1107 |
+
// Insert the string into the window before the current cursor position.
|
| 1108 |
+
// Insert stops at end of string or when the limit n is reached. If n is
|
| 1109 |
+
// negative, it is ignored.
|
| 1110 |
+
|
| 1111 |
+
int insstr(int y, int x, const char *s, int n=-1) {
|
| 1112 |
+
return ::mvwinsnstr(w, y, x, s, n); }
|
| 1113 |
+
// Move the cursor to the requested position and then perform the insstr()
|
| 1114 |
+
// as described above.
|
| 1115 |
+
|
| 1116 |
+
int attron (chtype at) { return ::wattron (w, at); }
|
| 1117 |
+
// Switch on the window attributes;
|
| 1118 |
+
|
| 1119 |
+
int attroff(chtype at) { return ::wattroff(w, static_cast<int>(at)); }
|
| 1120 |
+
// Switch off the window attributes;
|
| 1121 |
+
|
| 1122 |
+
int attrset(chtype at) { return ::wattrset(w, static_cast<int>(at)); }
|
| 1123 |
+
// Set the window attributes;
|
| 1124 |
+
|
| 1125 |
+
chtype attrget() { return ::getattrs(w); }
|
| 1126 |
+
// Get the window attributes;
|
| 1127 |
+
|
| 1128 |
+
int color_set(NCURSES_PAIRS_T color_pair_number, void* opts=NULL) {
|
| 1129 |
+
return ::wcolor_set(w, color_pair_number, opts); }
|
| 1130 |
+
// Set the window color attribute;
|
| 1131 |
+
|
| 1132 |
+
int chgat(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1133 |
+
return ::wchgat(w, n, attr, color, opts); }
|
| 1134 |
+
// Change the attributes of the next n characters in the current line. If
|
| 1135 |
+
// n is negative or greater than the number of remaining characters in the
|
| 1136 |
+
// line, the attributes will be changed up to the end of the line.
|
| 1137 |
+
|
| 1138 |
+
int chgat(int y, int x,
|
| 1139 |
+
int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1140 |
+
return ::mvwchgat(w, y, x, n, attr, color, opts); }
|
| 1141 |
+
// Move the cursor to the requested position and then perform chgat() as
|
| 1142 |
+
// described above.
|
| 1143 |
+
|
| 1144 |
+
// -------------------------------------------------------------------------
|
| 1145 |
+
// background
|
| 1146 |
+
// -------------------------------------------------------------------------
|
| 1147 |
+
chtype getbkgd() const { return ::getbkgd(w); }
|
| 1148 |
+
// Get current background setting.
|
| 1149 |
+
|
| 1150 |
+
int bkgd(const chtype ch) { return ::wbkgd(w, ch); }
|
| 1151 |
+
// Set the background property and apply it to the window.
|
| 1152 |
+
|
| 1153 |
+
void bkgdset(chtype ch) { ::wbkgdset(w, ch); }
|
| 1154 |
+
// Set the background property.
|
| 1155 |
+
|
| 1156 |
+
// -------------------------------------------------------------------------
|
| 1157 |
+
// borders
|
| 1158 |
+
// -------------------------------------------------------------------------
|
| 1159 |
+
int box(chtype vert=0, chtype hor=0) {
|
| 1160 |
+
return ::wborder(w, vert, vert, hor, hor, 0, 0, 0, 0); }
|
| 1161 |
+
// Draw a box around the window with the given vertical and horizontal
|
| 1162 |
+
// drawing characters. If you specify a zero as character, curses will try
|
| 1163 |
+
// to find a "nice" character.
|
| 1164 |
+
|
| 1165 |
+
int border(chtype left=0, chtype right=0,
|
| 1166 |
+
chtype top =0, chtype bottom=0,
|
| 1167 |
+
chtype top_left =0, chtype top_right=0,
|
| 1168 |
+
chtype bottom_left =0, chtype bottom_right=0) {
|
| 1169 |
+
return ::wborder(w, left, right, top, bottom, top_left, top_right,
|
| 1170 |
+
bottom_left, bottom_right); }
|
| 1171 |
+
// Draw a border around the window with the given characters for the
|
| 1172 |
+
// various parts of the border. If you pass zero for a character, curses
|
| 1173 |
+
// will try to find "nice" characters.
|
| 1174 |
+
|
| 1175 |
+
// -------------------------------------------------------------------------
|
| 1176 |
+
// lines and boxes
|
| 1177 |
+
// -------------------------------------------------------------------------
|
| 1178 |
+
int hline(int len, chtype ch=0) { return ::whline(w, ch, len); }
|
| 1179 |
+
// Draw a horizontal line of len characters with the given character. If
|
| 1180 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1181 |
+
|
| 1182 |
+
int hline(int y, int x, int len, chtype ch=0) {
|
| 1183 |
+
return ::mvwhline(w, y, x, ch, len); }
|
| 1184 |
+
// Move the cursor to the requested position and then draw a horizontal line.
|
| 1185 |
+
|
| 1186 |
+
int vline(int len, chtype ch=0) { return ::wvline(w, ch, len); }
|
| 1187 |
+
// Draw a vertical line of len characters with the given character. If
|
| 1188 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1189 |
+
|
| 1190 |
+
int vline(int y, int x, int len, chtype ch=0) {
|
| 1191 |
+
return ::mvwvline(w, y, x, ch, len); }
|
| 1192 |
+
// Move the cursor to the requested position and then draw a vertical line.
|
| 1193 |
+
|
| 1194 |
+
// -------------------------------------------------------------------------
|
| 1195 |
+
// erasure
|
| 1196 |
+
// -------------------------------------------------------------------------
|
| 1197 |
+
int erase() { return ::werase(w); }
|
| 1198 |
+
// Erase the window.
|
| 1199 |
+
|
| 1200 |
+
int clear() { return ::wclear(w); }
|
| 1201 |
+
// Clear the window.
|
| 1202 |
+
|
| 1203 |
+
int clearok(bool bf) { return ::clearok(w, bf); }
|
| 1204 |
+
// Set/Reset the clear flag. If set, the next refresh() will clear the
|
| 1205 |
+
// screen.
|
| 1206 |
+
|
| 1207 |
+
int clrtobot() { return ::wclrtobot(w); }
|
| 1208 |
+
// Clear to the end of the window.
|
| 1209 |
+
|
| 1210 |
+
int clrtoeol() { return ::wclrtoeol(w); }
|
| 1211 |
+
// Clear to the end of the line.
|
| 1212 |
+
|
| 1213 |
+
int delch() { return ::wdelch(w); }
|
| 1214 |
+
// Delete character under the cursor.
|
| 1215 |
+
|
| 1216 |
+
int delch(int y, int x) { return ::mvwdelch(w, y, x); }
|
| 1217 |
+
// Move cursor to requested position and delete the character under the
|
| 1218 |
+
// cursor.
|
| 1219 |
+
|
| 1220 |
+
int deleteln() { return ::winsdelln(w, -1); }
|
| 1221 |
+
// Delete the current line.
|
| 1222 |
+
|
| 1223 |
+
// -------------------------------------------------------------------------
|
| 1224 |
+
// screen control
|
| 1225 |
+
// -------------------------------------------------------------------------
|
| 1226 |
+
int scroll(int amount=1) { return ::wscrl(w, amount); }
|
| 1227 |
+
// Scroll amount lines. If amount is positive, scroll up, otherwise
|
| 1228 |
+
// scroll down.
|
| 1229 |
+
|
| 1230 |
+
int scrollok(bool bf) { return ::scrollok(w, bf); }
|
| 1231 |
+
// If bf is TRUE, window scrolls if cursor is moved off the bottom
|
| 1232 |
+
// edge of the window or a scrolling region, otherwise the cursor is left
|
| 1233 |
+
// at the bottom line.
|
| 1234 |
+
|
| 1235 |
+
int setscrreg(int from, int to) {
|
| 1236 |
+
return ::wsetscrreg(w, from, to); }
|
| 1237 |
+
// Define a soft scrolling region.
|
| 1238 |
+
|
| 1239 |
+
int idlok(bool bf) { return ::idlok(w, bf); }
|
| 1240 |
+
// If bf is TRUE, use insert/delete line hardware support if possible.
|
| 1241 |
+
// Otherwise do it in software.
|
| 1242 |
+
|
| 1243 |
+
void idcok(bool bf) { ::idcok(w, bf); }
|
| 1244 |
+
// If bf is TRUE, use insert/delete character hardware support if possible.
|
| 1245 |
+
// Otherwise do it in software.
|
| 1246 |
+
|
| 1247 |
+
int touchline(int s, int c) { return ::touchline(w, s, c); }
|
| 1248 |
+
// Mark the given lines as modified.
|
| 1249 |
+
|
| 1250 |
+
int touchwin() { return ::wtouchln(w, 0, height(), 1); }
|
| 1251 |
+
// Mark the whole window as modified.
|
| 1252 |
+
|
| 1253 |
+
int untouchwin() { return ::wtouchln(w, 0, height(), 0); }
|
| 1254 |
+
// Mark the whole window as unmodified.
|
| 1255 |
+
|
| 1256 |
+
int touchln(int s, int cnt, bool changed=TRUE) {
|
| 1257 |
+
return ::wtouchln(w, s, cnt, static_cast<int>(changed ? 1 : 0)); }
|
| 1258 |
+
// Mark cnt lines beginning from line s as changed or unchanged, depending
|
| 1259 |
+
// on the value of the changed flag.
|
| 1260 |
+
|
| 1261 |
+
bool is_linetouched(int line) const {
|
| 1262 |
+
return (::is_linetouched(w, line) == TRUE ? TRUE:FALSE); }
|
| 1263 |
+
// Return TRUE if line is marked as changed, FALSE otherwise
|
| 1264 |
+
|
| 1265 |
+
bool is_wintouched() const {
|
| 1266 |
+
return (::is_wintouched(w) ? TRUE:FALSE); }
|
| 1267 |
+
// Return TRUE if window is marked as changed, FALSE otherwise
|
| 1268 |
+
|
| 1269 |
+
int leaveok(bool bf) { return ::leaveok(w, bf); }
|
| 1270 |
+
// If bf is TRUE, curses will leave the cursor after an update wherever
|
| 1271 |
+
// it is after the update.
|
| 1272 |
+
|
| 1273 |
+
int redrawln(int from, int n) { return ::wredrawln(w, from, n); }
|
| 1274 |
+
// Redraw n lines starting from the requested line
|
| 1275 |
+
|
| 1276 |
+
int redrawwin() { return ::wredrawln(w, 0, height()); }
|
| 1277 |
+
// Redraw the whole window
|
| 1278 |
+
|
| 1279 |
+
int doupdate() { return ::doupdate(); }
|
| 1280 |
+
// Do all outputs to make the physical screen looking like the virtual one
|
| 1281 |
+
|
| 1282 |
+
void syncdown() { ::wsyncdown(w); }
|
| 1283 |
+
// Propagate the changes down to all descendant windows
|
| 1284 |
+
|
| 1285 |
+
void syncup() { ::wsyncup(w); }
|
| 1286 |
+
// Propagate the changes up in the hierarchy
|
| 1287 |
+
|
| 1288 |
+
void cursyncup() { ::wcursyncup(w); }
|
| 1289 |
+
// Position the cursor in all ancestor windows corresponding to our setting
|
| 1290 |
+
|
| 1291 |
+
int syncok(bool bf) { return ::syncok(w, bf); }
|
| 1292 |
+
// If called with bf=TRUE, syncup() is called whenever the window is changed
|
| 1293 |
+
|
| 1294 |
+
#ifndef _no_flushok
|
| 1295 |
+
int flushok(bool bf) { return ::flushok(w, bf); }
|
| 1296 |
+
#endif
|
| 1297 |
+
|
| 1298 |
+
void immedok(bool bf) { ::immedok(w, bf); }
|
| 1299 |
+
// If called with bf=TRUE, any change in the window will cause an
|
| 1300 |
+
// automatic immediate refresh()
|
| 1301 |
+
|
| 1302 |
+
int intrflush(bool bf) { return ::intrflush(w, bf); }
|
| 1303 |
+
|
| 1304 |
+
int keypad(bool bf) { return ::keypad(w, bf); }
|
| 1305 |
+
// If called with bf=TRUE, the application will interpret function keys.
|
| 1306 |
+
|
| 1307 |
+
int nodelay(bool bf) { return ::nodelay(w, bf); }
|
| 1308 |
+
|
| 1309 |
+
int meta(bool bf) { return ::meta(w, bf); }
|
| 1310 |
+
// If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise
|
| 1311 |
+
// 7-Bit characters are generated.
|
| 1312 |
+
|
| 1313 |
+
int standout() { return ::wstandout(w); }
|
| 1314 |
+
// Enable "standout" attributes
|
| 1315 |
+
|
| 1316 |
+
int standend() { return ::wstandend(w); }
|
| 1317 |
+
// Disable "standout" attributes
|
| 1318 |
+
|
| 1319 |
+
// -------------------------------------------------------------------------
|
| 1320 |
+
// The next two are virtual, because we redefine them in the
|
| 1321 |
+
// NCursesPanel class.
|
| 1322 |
+
// -------------------------------------------------------------------------
|
| 1323 |
+
virtual int refresh() { return ::wrefresh(w); }
|
| 1324 |
+
// Propagate the changes in this window to the virtual screen and call
|
| 1325 |
+
// doupdate(). This is redefined in NCursesPanel.
|
| 1326 |
+
|
| 1327 |
+
virtual int noutrefresh() { return ::wnoutrefresh(w); }
|
| 1328 |
+
// Propagate the changes in this window to the virtual screen. This is
|
| 1329 |
+
// redefined in NCursesPanel.
|
| 1330 |
+
|
| 1331 |
+
// -------------------------------------------------------------------------
|
| 1332 |
+
// multiple window control
|
| 1333 |
+
// -------------------------------------------------------------------------
|
| 1334 |
+
int overlay(NCursesWindow& win) {
|
| 1335 |
+
return ::overlay(w, win.w); }
|
| 1336 |
+
// Overlay this window over win.
|
| 1337 |
+
|
| 1338 |
+
int overwrite(NCursesWindow& win) {
|
| 1339 |
+
return ::overwrite(w, win.w); }
|
| 1340 |
+
// Overwrite win with this window.
|
| 1341 |
+
|
| 1342 |
+
int copywin(NCursesWindow& win,
|
| 1343 |
+
int sminrow, int smincol,
|
| 1344 |
+
int dminrow, int dmincol,
|
| 1345 |
+
int dmaxrow, int dmaxcol, bool overlaywin=TRUE) {
|
| 1346 |
+
return ::copywin(w, win.w, sminrow, smincol, dminrow, dmincol,
|
| 1347 |
+
dmaxrow, dmaxcol, static_cast<int>(overlaywin ? 1 : 0)); }
|
| 1348 |
+
// Overlay or overwrite the rectangle in win given by dminrow,dmincol,
|
| 1349 |
+
// dmaxrow,dmaxcol with the rectangle in this window beginning at
|
| 1350 |
+
// sminrow,smincol.
|
| 1351 |
+
|
| 1352 |
+
// -------------------------------------------------------------------------
|
| 1353 |
+
// Extended functions
|
| 1354 |
+
// -------------------------------------------------------------------------
|
| 1355 |
+
#if defined(NCURSES_EXT_FUNCS) && (NCURSES_EXT_FUNCS != 0)
|
| 1356 |
+
int wresize(int newLines, int newColumns) {
|
| 1357 |
+
return ::wresize(w, newLines, newColumns); }
|
| 1358 |
+
#endif
|
| 1359 |
+
|
| 1360 |
+
// -------------------------------------------------------------------------
|
| 1361 |
+
// Mouse related
|
| 1362 |
+
// -------------------------------------------------------------------------
|
| 1363 |
+
bool has_mouse() const;
|
| 1364 |
+
// Return TRUE if terminal supports a mouse, FALSE otherwise
|
| 1365 |
+
|
| 1366 |
+
// -------------------------------------------------------------------------
|
| 1367 |
+
// traversal support
|
| 1368 |
+
// -------------------------------------------------------------------------
|
| 1369 |
+
NCursesWindow* child() { return subwins; }
|
| 1370 |
+
// Get the first child window.
|
| 1371 |
+
|
| 1372 |
+
NCursesWindow* sibling() { return sib; }
|
| 1373 |
+
// Get the next child of my parent.
|
| 1374 |
+
|
| 1375 |
+
NCursesWindow* parent() { return par; }
|
| 1376 |
+
// Get my parent.
|
| 1377 |
+
|
| 1378 |
+
bool isDescendant(NCursesWindow& win);
|
| 1379 |
+
// Return TRUE if win is a descendant of this.
|
| 1380 |
+
};
|
| 1381 |
+
|
| 1382 |
+
// -------------------------------------------------------------------------
|
| 1383 |
+
// We leave this here for compatibility reasons.
|
| 1384 |
+
// -------------------------------------------------------------------------
|
| 1385 |
+
class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
|
| 1386 |
+
{
|
| 1387 |
+
public:
|
| 1388 |
+
explicit NCursesColorWindow(WINDOW* &window) // useful only for stdscr
|
| 1389 |
+
: NCursesWindow(window) {
|
| 1390 |
+
useColors(); }
|
| 1391 |
+
|
| 1392 |
+
NCursesColorWindow(int nlines, // number of lines
|
| 1393 |
+
int ncols, // number of columns
|
| 1394 |
+
int begin_y, // line origin
|
| 1395 |
+
int begin_x) // col origin
|
| 1396 |
+
: NCursesWindow(nlines, ncols, begin_y, begin_x) {
|
| 1397 |
+
useColors(); }
|
| 1398 |
+
|
| 1399 |
+
NCursesColorWindow(NCursesWindow& parentWin,// parent window
|
| 1400 |
+
int nlines, // number of lines
|
| 1401 |
+
int ncols, // number of columns
|
| 1402 |
+
int begin_y, // absolute or relative
|
| 1403 |
+
int begin_x, // origins:
|
| 1404 |
+
char absrel = 'a') // if `a', by & bx are
|
| 1405 |
+
: NCursesWindow(parentWin,
|
| 1406 |
+
nlines, ncols, // absolute screen pos,
|
| 1407 |
+
begin_y, begin_x, // else if `r', they are
|
| 1408 |
+
absrel ) { // relative to par origin
|
| 1409 |
+
useColors(); }
|
| 1410 |
+
};
|
| 1411 |
+
|
| 1412 |
+
// These enum definitions really belong inside the NCursesPad class, but only
|
| 1413 |
+
// recent compilers support that feature.
|
| 1414 |
+
|
| 1415 |
+
typedef enum {
|
| 1416 |
+
REQ_PAD_REFRESH = KEY_MAX + 1,
|
| 1417 |
+
REQ_PAD_UP,
|
| 1418 |
+
REQ_PAD_DOWN,
|
| 1419 |
+
REQ_PAD_LEFT,
|
| 1420 |
+
REQ_PAD_RIGHT,
|
| 1421 |
+
REQ_PAD_EXIT
|
| 1422 |
+
} Pad_Request;
|
| 1423 |
+
|
| 1424 |
+
const Pad_Request PAD_LOW = REQ_PAD_REFRESH; // lowest op-code
|
| 1425 |
+
const Pad_Request PAD_HIGH = REQ_PAD_EXIT; // highest op-code
|
| 1426 |
+
|
| 1427 |
+
// -------------------------------------------------------------------------
|
| 1428 |
+
// Pad Support. We allow an association of a pad with a "real" window
|
| 1429 |
+
// through which the pad may be viewed.
|
| 1430 |
+
// -------------------------------------------------------------------------
|
| 1431 |
+
class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow
|
| 1432 |
+
{
|
| 1433 |
+
private:
|
| 1434 |
+
NCursesWindow* viewWin; // the "viewport" window
|
| 1435 |
+
NCursesWindow* viewSub; // the "viewport" subwindow
|
| 1436 |
+
|
| 1437 |
+
int h_gridsize, v_gridsize;
|
| 1438 |
+
|
| 1439 |
+
protected:
|
| 1440 |
+
int min_row, min_col; // top left row/col of the pads display area
|
| 1441 |
+
|
| 1442 |
+
NCursesWindow* Win(void) const {
|
| 1443 |
+
// Get the window into which the pad should be copied (if any)
|
| 1444 |
+
return (viewSub?viewSub:(viewWin?viewWin:0));
|
| 1445 |
+
}
|
| 1446 |
+
|
| 1447 |
+
NCursesWindow* getWindow(void) const {
|
| 1448 |
+
return viewWin;
|
| 1449 |
+
}
|
| 1450 |
+
|
| 1451 |
+
NCursesWindow* getSubWindow(void) const {
|
| 1452 |
+
return viewSub;
|
| 1453 |
+
}
|
| 1454 |
+
|
| 1455 |
+
virtual int driver (int key); // Virtualize keystroke key
|
| 1456 |
+
// The driver translates the keystroke c into an Pad_Request
|
| 1457 |
+
|
| 1458 |
+
virtual void OnUnknownOperation(int pad_req) {
|
| 1459 |
+
(void) pad_req;
|
| 1460 |
+
::beep();
|
| 1461 |
+
}
|
| 1462 |
+
// This is called if the driver returns an unknown op-code
|
| 1463 |
+
|
| 1464 |
+
virtual void OnNavigationError(int pad_req) {
|
| 1465 |
+
(void) pad_req;
|
| 1466 |
+
::beep();
|
| 1467 |
+
}
|
| 1468 |
+
// This is called if a navigation request couldn't be satisfied
|
| 1469 |
+
|
| 1470 |
+
virtual void OnOperation(int pad_req) {
|
| 1471 |
+
(void) pad_req;
|
| 1472 |
+
};
|
| 1473 |
+
// OnOperation is called if a Pad_Operation was executed and just before
|
| 1474 |
+
// the refresh() operation is done.
|
| 1475 |
+
|
| 1476 |
+
public:
|
| 1477 |
+
NCursesPad(int nlines, int ncols);
|
| 1478 |
+
// create a pad with the given size
|
| 1479 |
+
|
| 1480 |
+
NCursesPad& operator=(const NCursesPad& rhs)
|
| 1481 |
+
{
|
| 1482 |
+
if (this != &rhs) {
|
| 1483 |
+
*this = rhs;
|
| 1484 |
+
NCursesWindow::operator=(rhs);
|
| 1485 |
+
}
|
| 1486 |
+
return *this;
|
| 1487 |
+
}
|
| 1488 |
+
|
| 1489 |
+
NCursesPad(const NCursesPad& rhs)
|
| 1490 |
+
: NCursesWindow(rhs),
|
| 1491 |
+
viewWin(rhs.viewWin),
|
| 1492 |
+
viewSub(rhs.viewSub),
|
| 1493 |
+
h_gridsize(rhs.h_gridsize),
|
| 1494 |
+
v_gridsize(rhs.v_gridsize),
|
| 1495 |
+
min_row(rhs.min_row),
|
| 1496 |
+
min_col(rhs.min_col)
|
| 1497 |
+
{
|
| 1498 |
+
}
|
| 1499 |
+
|
| 1500 |
+
virtual ~NCursesPad() THROWS(NCursesException) {}
|
| 1501 |
+
|
| 1502 |
+
int echochar(const chtype ch) { return ::pechochar(w, ch); }
|
| 1503 |
+
// Put the attributed character onto the pad and immediately do a
|
| 1504 |
+
// prefresh().
|
| 1505 |
+
|
| 1506 |
+
int refresh() NCURSES_OVERRIDE;
|
| 1507 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1508 |
+
// this is a noop.
|
| 1509 |
+
|
| 1510 |
+
int refresh(int pminrow, int pmincol,
|
| 1511 |
+
int sminrow, int smincol,
|
| 1512 |
+
int smaxrow, int smaxcol) {
|
| 1513 |
+
return ::prefresh(w, pminrow, pmincol,
|
| 1514 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1515 |
+
}
|
| 1516 |
+
// The coordinates sminrow,smincol,smaxrow,smaxcol describe a rectangle
|
| 1517 |
+
// on the screen. <b>refresh</b> copies a rectangle of this size beginning
|
| 1518 |
+
// with top left corner pminrow,pmincol onto the screen and calls doupdate().
|
| 1519 |
+
|
| 1520 |
+
int noutrefresh() NCURSES_OVERRIDE;
|
| 1521 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1522 |
+
// this is a noop.
|
| 1523 |
+
|
| 1524 |
+
int noutrefresh(int pminrow, int pmincol,
|
| 1525 |
+
int sminrow, int smincol,
|
| 1526 |
+
int smaxrow, int smaxcol) {
|
| 1527 |
+
return ::pnoutrefresh(w, pminrow, pmincol,
|
| 1528 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1529 |
+
}
|
| 1530 |
+
// Does the same as refresh() but without calling doupdate().
|
| 1531 |
+
|
| 1532 |
+
virtual void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1);
|
| 1533 |
+
// Add the window "view" as viewing window to the pad.
|
| 1534 |
+
|
| 1535 |
+
virtual void setSubWindow(NCursesWindow& sub);
|
| 1536 |
+
// Use the subwindow "sub" of the viewport window for the actual viewing.
|
| 1537 |
+
// The full viewport window is usually used to provide some decorations
|
| 1538 |
+
// like frames, titles etc.
|
| 1539 |
+
|
| 1540 |
+
virtual void operator() (void);
|
| 1541 |
+
// Perform Pad's operation
|
| 1542 |
+
};
|
| 1543 |
+
|
| 1544 |
+
// A FramedPad is constructed always with a viewport window. This viewport
|
| 1545 |
+
// will be framed (by a box() command) and the interior of the box is the
|
| 1546 |
+
// viewport subwindow. On the frame we display scrollbar sliders.
|
| 1547 |
+
class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad
|
| 1548 |
+
{
|
| 1549 |
+
protected:
|
| 1550 |
+
virtual void OnOperation(int pad_req) NCURSES_OVERRIDE;
|
| 1551 |
+
|
| 1552 |
+
public:
|
| 1553 |
+
NCursesFramedPad(NCursesWindow& win, int nlines, int ncols,
|
| 1554 |
+
int v_grid = 1, int h_grid = 1)
|
| 1555 |
+
: NCursesPad(nlines, ncols) {
|
| 1556 |
+
NCursesPad::setWindow(win, v_grid, h_grid);
|
| 1557 |
+
NCursesPad::setSubWindow(*(new NCursesWindow(win)));
|
| 1558 |
+
}
|
| 1559 |
+
// Construct the FramedPad with the given Window win as viewport.
|
| 1560 |
+
|
| 1561 |
+
virtual ~NCursesFramedPad() THROWS(NCursesException) {
|
| 1562 |
+
delete getSubWindow();
|
| 1563 |
+
}
|
| 1564 |
+
|
| 1565 |
+
void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1) NCURSES_OVERRIDE {
|
| 1566 |
+
(void) view;
|
| 1567 |
+
(void) v_grid;
|
| 1568 |
+
(void) h_grid;
|
| 1569 |
+
err_handler("Operation not allowed");
|
| 1570 |
+
}
|
| 1571 |
+
// Disable this call; the viewport is already defined
|
| 1572 |
+
|
| 1573 |
+
void setSubWindow(NCursesWindow& sub) NCURSES_OVERRIDE {
|
| 1574 |
+
(void) sub;
|
| 1575 |
+
err_handler("Operation not allowed");
|
| 1576 |
+
}
|
| 1577 |
+
// Disable this call; the viewport subwindow is already defined
|
| 1578 |
+
|
| 1579 |
+
};
|
| 1580 |
+
|
| 1581 |
+
#endif /* NCURSES_CURSESW_H_incl */
|
data/miniconda3/include/ncursesw/cursslk.h
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2020,2021 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2003,2005 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
/****************************************************************************
|
| 33 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
// $Id: cursslk.h,v 1.19 2021/04/17 18:11:08 tom Exp $
|
| 37 |
+
|
| 38 |
+
#ifndef NCURSES_CURSSLK_H_incl
|
| 39 |
+
#define NCURSES_CURSSLK_H_incl
|
| 40 |
+
|
| 41 |
+
#include <ncursesw/cursesw.h>
|
| 42 |
+
|
| 43 |
+
class NCURSES_CXX_IMPEXP Soft_Label_Key_Set {
|
| 44 |
+
public:
|
| 45 |
+
// This inner class represents the attributes of a Soft Label Key (SLK)
|
| 46 |
+
class NCURSES_CXX_IMPEXP Soft_Label_Key {
|
| 47 |
+
friend class Soft_Label_Key_Set;
|
| 48 |
+
public:
|
| 49 |
+
typedef enum { Left=0, Center=1, Right=2 } Justification;
|
| 50 |
+
|
| 51 |
+
private:
|
| 52 |
+
char *label; // The Text of the Label
|
| 53 |
+
Justification format; // The Justification
|
| 54 |
+
int num; // The number of the Label
|
| 55 |
+
|
| 56 |
+
Soft_Label_Key() : label(NULL), format(Left), num(-1) {
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
virtual ~Soft_Label_Key() {
|
| 60 |
+
delete[] label;
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
public:
|
| 64 |
+
// Set the text of the Label
|
| 65 |
+
Soft_Label_Key& operator=(char *text);
|
| 66 |
+
|
| 67 |
+
// Set the Justification of the Label
|
| 68 |
+
Soft_Label_Key& operator=(Justification just) {
|
| 69 |
+
format = just;
|
| 70 |
+
return *this;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
// Retrieve the text of the label
|
| 74 |
+
inline char* operator()(void) const {
|
| 75 |
+
return label;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
Soft_Label_Key& operator=(const Soft_Label_Key& rhs)
|
| 79 |
+
{
|
| 80 |
+
if (this != &rhs) {
|
| 81 |
+
*this = rhs;
|
| 82 |
+
}
|
| 83 |
+
return *this;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
Soft_Label_Key(const Soft_Label_Key& rhs)
|
| 87 |
+
: label(NULL),
|
| 88 |
+
format(rhs.format),
|
| 89 |
+
num(rhs.num)
|
| 90 |
+
{
|
| 91 |
+
*this = rhs.label;
|
| 92 |
+
}
|
| 93 |
+
};
|
| 94 |
+
|
| 95 |
+
public:
|
| 96 |
+
typedef enum {
|
| 97 |
+
None = -1,
|
| 98 |
+
Three_Two_Three = 0,
|
| 99 |
+
Four_Four = 1,
|
| 100 |
+
PC_Style = 2,
|
| 101 |
+
PC_Style_With_Index = 3
|
| 102 |
+
} Label_Layout;
|
| 103 |
+
|
| 104 |
+
private:
|
| 105 |
+
static long count; // Number of Key Sets
|
| 106 |
+
static Label_Layout format; // Layout of the Key Sets
|
| 107 |
+
static int num_labels; // Number Of Labels in Key Sets
|
| 108 |
+
bool b_attrInit; // Are attributes initialized
|
| 109 |
+
|
| 110 |
+
Soft_Label_Key *slk_array; // The array of SLK's
|
| 111 |
+
|
| 112 |
+
// Init the Key Set
|
| 113 |
+
void init();
|
| 114 |
+
|
| 115 |
+
// Activate or Deactivate Label# i, Label counting starts with 1!
|
| 116 |
+
void activate_label(int i, bool bf=TRUE);
|
| 117 |
+
|
| 118 |
+
// Activate of Deactivate all Labels
|
| 119 |
+
void activate_labels(bool bf);
|
| 120 |
+
|
| 121 |
+
protected:
|
| 122 |
+
inline void Error (const char* msg) const THROWS(NCursesException) {
|
| 123 |
+
THROW(new NCursesException (msg));
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
// Remove SLK's from screen
|
| 127 |
+
void clear() {
|
| 128 |
+
if (ERR==::slk_clear())
|
| 129 |
+
Error("slk_clear");
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
// Restore them
|
| 133 |
+
void restore() {
|
| 134 |
+
if (ERR==::slk_restore())
|
| 135 |
+
Error("slk_restore");
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
public:
|
| 139 |
+
|
| 140 |
+
// Construct a Key Set, use the most comfortable layout as default.
|
| 141 |
+
// You must create a Soft_Label_Key_Set before you create any object of
|
| 142 |
+
// the NCursesWindow, NCursesPanel or derived classes. (Actually before
|
| 143 |
+
// ::initscr() is called).
|
| 144 |
+
explicit Soft_Label_Key_Set(Label_Layout fmt);
|
| 145 |
+
|
| 146 |
+
// This constructor assumes, that you already constructed a Key Set
|
| 147 |
+
// with a layout by the constructor above. This layout will be reused.
|
| 148 |
+
Soft_Label_Key_Set();
|
| 149 |
+
|
| 150 |
+
Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs)
|
| 151 |
+
{
|
| 152 |
+
if (this != &rhs) {
|
| 153 |
+
*this = rhs;
|
| 154 |
+
init(); // allocate a new slk_array[]
|
| 155 |
+
}
|
| 156 |
+
return *this;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
Soft_Label_Key_Set(const Soft_Label_Key_Set& rhs)
|
| 160 |
+
: b_attrInit(rhs.b_attrInit),
|
| 161 |
+
slk_array(NULL)
|
| 162 |
+
{
|
| 163 |
+
init(); // allocate a new slk_array[]
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
virtual ~Soft_Label_Key_Set() THROWS(NCursesException);
|
| 167 |
+
|
| 168 |
+
// Get Label# i. Label counting starts with 1!
|
| 169 |
+
Soft_Label_Key& operator[](int i);
|
| 170 |
+
|
| 171 |
+
// Retrieve number of Labels
|
| 172 |
+
int labels() const;
|
| 173 |
+
|
| 174 |
+
// Refresh the SLK portion of the screen
|
| 175 |
+
inline void refresh() {
|
| 176 |
+
if (ERR==::slk_refresh())
|
| 177 |
+
Error("slk_refresh");
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
// Mark the SLK portion of the screen for refresh, defer actual refresh
|
| 181 |
+
// until next update call.
|
| 182 |
+
inline void noutrefresh() {
|
| 183 |
+
if (ERR==::slk_noutrefresh())
|
| 184 |
+
Error("slk_noutrefresh");
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
// Mark the whole SLK portion of the screen as modified
|
| 188 |
+
inline void touch() {
|
| 189 |
+
if (ERR==::slk_touch())
|
| 190 |
+
Error("slk_touch");
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
// Activate Label# i
|
| 194 |
+
inline void show(int i) {
|
| 195 |
+
activate_label(i,FALSE);
|
| 196 |
+
activate_label(i,TRUE);
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
// Hide Label# i
|
| 200 |
+
inline void hide(int i) {
|
| 201 |
+
activate_label(i,FALSE);
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
// Show all Labels
|
| 205 |
+
inline void show() {
|
| 206 |
+
activate_labels(FALSE);
|
| 207 |
+
activate_labels(TRUE);
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
// Hide all Labels
|
| 211 |
+
inline void hide() {
|
| 212 |
+
activate_labels(FALSE);
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
inline void attron(attr_t attrs) {
|
| 216 |
+
if (ERR==::slk_attron(attrs))
|
| 217 |
+
Error("slk_attron");
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
inline void attroff(attr_t attrs) {
|
| 221 |
+
if (ERR==::slk_attroff(attrs))
|
| 222 |
+
Error("slk_attroff");
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
inline void attrset(attr_t attrs) {
|
| 226 |
+
if (ERR==::slk_attrset(attrs))
|
| 227 |
+
Error("slk_attrset");
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
inline void color(short color_pair_number) {
|
| 231 |
+
if (ERR==::slk_color(color_pair_number))
|
| 232 |
+
Error("slk_color");
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
inline attr_t attr() const {
|
| 236 |
+
return ::slk_attr();
|
| 237 |
+
}
|
| 238 |
+
};
|
| 239 |
+
|
| 240 |
+
#endif /* NCURSES_CURSSLK_H_incl */
|
data/miniconda3/include/ncursesw/eti.h
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2002,2003 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: eti.h,v 1.9 2020/02/02 23:34:34 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef NCURSES_ETI_H_incl
|
| 37 |
+
#define NCURSES_ETI_H_incl 1
|
| 38 |
+
|
| 39 |
+
#define E_OK (0)
|
| 40 |
+
#define E_SYSTEM_ERROR (-1)
|
| 41 |
+
#define E_BAD_ARGUMENT (-2)
|
| 42 |
+
#define E_POSTED (-3)
|
| 43 |
+
#define E_CONNECTED (-4)
|
| 44 |
+
#define E_BAD_STATE (-5)
|
| 45 |
+
#define E_NO_ROOM (-6)
|
| 46 |
+
#define E_NOT_POSTED (-7)
|
| 47 |
+
#define E_UNKNOWN_COMMAND (-8)
|
| 48 |
+
#define E_NO_MATCH (-9)
|
| 49 |
+
#define E_NOT_SELECTABLE (-10)
|
| 50 |
+
#define E_NOT_CONNECTED (-11)
|
| 51 |
+
#define E_REQUEST_DENIED (-12)
|
| 52 |
+
#define E_INVALID_FIELD (-13)
|
| 53 |
+
#define E_CURRENT (-14)
|
| 54 |
+
|
| 55 |
+
#endif
|
data/miniconda3/include/ncursesw/etip.h
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2018-2021,2022 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2012,2017 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: etip.h.in,v 1.50 2022/08/20 20:50:00 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_ETIP_H_incl
|
| 38 |
+
#define NCURSES_ETIP_H_incl 1
|
| 39 |
+
|
| 40 |
+
// These are substituted at configure/build time
|
| 41 |
+
#ifndef HAVE_BUILTIN_H
|
| 42 |
+
#define HAVE_BUILTIN_H 0
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#ifndef HAVE_GXX_BUILTIN_H
|
| 46 |
+
#define HAVE_GXX_BUILTIN_H 0
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#ifndef HAVE_GPP_BUILTIN_H
|
| 50 |
+
#define HAVE_GPP_BUILTIN_H 0
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
#ifndef HAVE_IOSTREAM
|
| 54 |
+
#define HAVE_IOSTREAM 1
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#ifndef HAVE_TYPEINFO
|
| 58 |
+
#define HAVE_TYPEINFO 1
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#ifndef HAVE_VALUES_H
|
| 62 |
+
#define HAVE_VALUES_H 0
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
#ifndef ETIP_NEEDS_MATH_H
|
| 66 |
+
#define ETIP_NEEDS_MATH_H 0
|
| 67 |
+
#endif
|
| 68 |
+
|
| 69 |
+
#ifndef ETIP_NEEDS_MATH_EXCEPTION
|
| 70 |
+
#define ETIP_NEEDS_MATH_EXCEPTION 0
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifndef CPP_HAS_OVERRIDE
|
| 74 |
+
#define CPP_HAS_OVERRIDE 0
|
| 75 |
+
#endif
|
| 76 |
+
|
| 77 |
+
#ifndef CPP_HAS_PARAM_INIT
|
| 78 |
+
#define CPP_HAS_PARAM_INIT 0
|
| 79 |
+
#endif
|
| 80 |
+
|
| 81 |
+
#ifndef CPP_HAS_STATIC_CAST
|
| 82 |
+
#define CPP_HAS_STATIC_CAST 1
|
| 83 |
+
#endif
|
| 84 |
+
|
| 85 |
+
#ifndef IOSTREAM_NAMESPACE
|
| 86 |
+
#define IOSTREAM_NAMESPACE 1
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
#ifdef __GNUG__
|
| 90 |
+
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
|
| 91 |
+
# if HAVE_TYPEINFO
|
| 92 |
+
# include <typeinfo>
|
| 93 |
+
# endif
|
| 94 |
+
# endif
|
| 95 |
+
#endif
|
| 96 |
+
|
| 97 |
+
#if defined(__GNUG__)
|
| 98 |
+
# if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
|
| 99 |
+
# if ETIP_NEEDS_MATH_H
|
| 100 |
+
# if ETIP_NEEDS_MATH_EXCEPTION
|
| 101 |
+
# undef exception
|
| 102 |
+
# define exception math_exception
|
| 103 |
+
# endif
|
| 104 |
+
# include <math.h>
|
| 105 |
+
# endif
|
| 106 |
+
# undef exception
|
| 107 |
+
# define exception builtin_exception
|
| 108 |
+
# if HAVE_GPP_BUILTIN_H
|
| 109 |
+
# include <gpp/builtin.h>
|
| 110 |
+
# elif HAVE_GXX_BUILTIN_H
|
| 111 |
+
# include <g++/builtin.h>
|
| 112 |
+
# else
|
| 113 |
+
# include <builtin.h>
|
| 114 |
+
# endif
|
| 115 |
+
# undef exception
|
| 116 |
+
# endif
|
| 117 |
+
#elif defined (__SUNPRO_CC)
|
| 118 |
+
# include <generic.h>
|
| 119 |
+
#endif
|
| 120 |
+
|
| 121 |
+
#include <ncursesw/curses.h>
|
| 122 |
+
|
| 123 |
+
extern "C" {
|
| 124 |
+
#if HAVE_VALUES_H
|
| 125 |
+
# include <values.h>
|
| 126 |
+
#endif
|
| 127 |
+
|
| 128 |
+
#include <assert.h>
|
| 129 |
+
#include <ncursesw/eti.h>
|
| 130 |
+
#include <errno.h>
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// Language features
|
| 134 |
+
#if CPP_HAS_OVERRIDE
|
| 135 |
+
#define NCURSES_OVERRIDE override
|
| 136 |
+
#else
|
| 137 |
+
#define NCURSES_OVERRIDE /*nothing*/
|
| 138 |
+
#endif
|
| 139 |
+
|
| 140 |
+
#if CPP_HAS_PARAM_INIT
|
| 141 |
+
#define NCURSES_PARAM_INIT(value) = value
|
| 142 |
+
#else
|
| 143 |
+
#define NCURSES_PARAM_INIT(value) /*nothing*/
|
| 144 |
+
#endif
|
| 145 |
+
|
| 146 |
+
#if CPP_HAS_STATIC_CAST
|
| 147 |
+
#define STATIC_CAST(s) static_cast<s>
|
| 148 |
+
#else
|
| 149 |
+
#define STATIC_CAST(s) (s)
|
| 150 |
+
#endif
|
| 151 |
+
|
| 152 |
+
#ifndef NCURSES_CXX_IMPEXP
|
| 153 |
+
#define NCURSES_CXX_IMPEXP /* nothing */
|
| 154 |
+
#endif
|
| 155 |
+
|
| 156 |
+
// Forward Declarations
|
| 157 |
+
class NCURSES_CXX_IMPEXP NCursesPanel;
|
| 158 |
+
class NCURSES_CXX_IMPEXP NCursesMenu;
|
| 159 |
+
class NCURSES_CXX_IMPEXP NCursesForm;
|
| 160 |
+
|
| 161 |
+
class NCURSES_CXX_IMPEXP NCursesException
|
| 162 |
+
{
|
| 163 |
+
public:
|
| 164 |
+
const char *message;
|
| 165 |
+
int errorno;
|
| 166 |
+
|
| 167 |
+
NCursesException (const char* msg, int err)
|
| 168 |
+
: message(msg), errorno (err)
|
| 169 |
+
{};
|
| 170 |
+
|
| 171 |
+
explicit NCursesException (const char* msg)
|
| 172 |
+
: message(msg), errorno (E_SYSTEM_ERROR)
|
| 173 |
+
{};
|
| 174 |
+
|
| 175 |
+
NCursesException& operator=(const NCursesException& rhs)
|
| 176 |
+
{
|
| 177 |
+
message = rhs.message;
|
| 178 |
+
errorno = rhs.errorno;
|
| 179 |
+
return *this;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
NCursesException(const NCursesException& rhs)
|
| 183 |
+
: message(rhs.message), errorno(rhs.errorno)
|
| 184 |
+
{
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
virtual const char *classname() const {
|
| 188 |
+
return "NCursesWindow";
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
virtual ~NCursesException()
|
| 192 |
+
{
|
| 193 |
+
}
|
| 194 |
+
};
|
| 195 |
+
|
| 196 |
+
class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
|
| 197 |
+
{
|
| 198 |
+
public:
|
| 199 |
+
const NCursesPanel* p;
|
| 200 |
+
|
| 201 |
+
NCursesPanelException (const char *msg, int err) :
|
| 202 |
+
NCursesException (msg, err),
|
| 203 |
+
p (0)
|
| 204 |
+
{};
|
| 205 |
+
|
| 206 |
+
NCursesPanelException (const NCursesPanel* panel,
|
| 207 |
+
const char *msg,
|
| 208 |
+
int err) :
|
| 209 |
+
NCursesException (msg, err),
|
| 210 |
+
p (panel)
|
| 211 |
+
{};
|
| 212 |
+
|
| 213 |
+
explicit NCursesPanelException (int err) :
|
| 214 |
+
NCursesException ("panel library error", err),
|
| 215 |
+
p (0)
|
| 216 |
+
{};
|
| 217 |
+
|
| 218 |
+
NCursesPanelException (const NCursesPanel* panel,
|
| 219 |
+
int err) :
|
| 220 |
+
NCursesException ("panel library error", err),
|
| 221 |
+
p (panel)
|
| 222 |
+
{};
|
| 223 |
+
|
| 224 |
+
NCursesPanelException& operator=(const NCursesPanelException& rhs)
|
| 225 |
+
{
|
| 226 |
+
if (this != &rhs) {
|
| 227 |
+
NCursesException::operator=(rhs);
|
| 228 |
+
p = rhs.p;
|
| 229 |
+
}
|
| 230 |
+
return *this;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
NCursesPanelException(const NCursesPanelException& rhs)
|
| 234 |
+
: NCursesException(rhs), p(rhs.p)
|
| 235 |
+
{
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 239 |
+
return "NCursesPanel";
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
virtual ~NCursesPanelException()
|
| 243 |
+
{
|
| 244 |
+
}
|
| 245 |
+
};
|
| 246 |
+
|
| 247 |
+
class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
|
| 248 |
+
{
|
| 249 |
+
public:
|
| 250 |
+
const NCursesMenu* m;
|
| 251 |
+
|
| 252 |
+
NCursesMenuException (const char *msg, int err) :
|
| 253 |
+
NCursesException (msg, err),
|
| 254 |
+
m (0)
|
| 255 |
+
{};
|
| 256 |
+
|
| 257 |
+
NCursesMenuException (const NCursesMenu* menu,
|
| 258 |
+
const char *msg,
|
| 259 |
+
int err) :
|
| 260 |
+
NCursesException (msg, err),
|
| 261 |
+
m (menu)
|
| 262 |
+
{};
|
| 263 |
+
|
| 264 |
+
explicit NCursesMenuException (int err) :
|
| 265 |
+
NCursesException ("menu library error", err),
|
| 266 |
+
m (0)
|
| 267 |
+
{};
|
| 268 |
+
|
| 269 |
+
NCursesMenuException (const NCursesMenu* menu,
|
| 270 |
+
int err) :
|
| 271 |
+
NCursesException ("menu library error", err),
|
| 272 |
+
m (menu)
|
| 273 |
+
{};
|
| 274 |
+
|
| 275 |
+
NCursesMenuException& operator=(const NCursesMenuException& rhs)
|
| 276 |
+
{
|
| 277 |
+
if (this != &rhs) {
|
| 278 |
+
NCursesException::operator=(rhs);
|
| 279 |
+
m = rhs.m;
|
| 280 |
+
}
|
| 281 |
+
return *this;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
NCursesMenuException(const NCursesMenuException& rhs)
|
| 285 |
+
: NCursesException(rhs), m(rhs.m)
|
| 286 |
+
{
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 290 |
+
return "NCursesMenu";
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
virtual ~NCursesMenuException()
|
| 294 |
+
{
|
| 295 |
+
}
|
| 296 |
+
};
|
| 297 |
+
|
| 298 |
+
class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
|
| 299 |
+
{
|
| 300 |
+
public:
|
| 301 |
+
const NCursesForm* f;
|
| 302 |
+
|
| 303 |
+
NCursesFormException (const char *msg, int err) :
|
| 304 |
+
NCursesException (msg, err),
|
| 305 |
+
f (0)
|
| 306 |
+
{};
|
| 307 |
+
|
| 308 |
+
NCursesFormException (const NCursesForm* form,
|
| 309 |
+
const char *msg,
|
| 310 |
+
int err) :
|
| 311 |
+
NCursesException (msg, err),
|
| 312 |
+
f (form)
|
| 313 |
+
{};
|
| 314 |
+
|
| 315 |
+
explicit NCursesFormException (int err) :
|
| 316 |
+
NCursesException ("form library error", err),
|
| 317 |
+
f (0)
|
| 318 |
+
{};
|
| 319 |
+
|
| 320 |
+
NCursesFormException (const NCursesForm* form,
|
| 321 |
+
int err) :
|
| 322 |
+
NCursesException ("form library error", err),
|
| 323 |
+
f (form)
|
| 324 |
+
{};
|
| 325 |
+
|
| 326 |
+
NCursesFormException& operator=(const NCursesFormException& rhs)
|
| 327 |
+
{
|
| 328 |
+
if (this != &rhs) {
|
| 329 |
+
NCursesException::operator=(rhs);
|
| 330 |
+
f = rhs.f;
|
| 331 |
+
}
|
| 332 |
+
return *this;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
NCursesFormException(const NCursesFormException& rhs)
|
| 336 |
+
: NCursesException(rhs), f(rhs.f)
|
| 337 |
+
{
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
virtual const char *classname() const NCURSES_OVERRIDE {
|
| 341 |
+
return "NCursesForm";
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
virtual ~NCursesFormException()
|
| 345 |
+
{
|
| 346 |
+
}
|
| 347 |
+
};
|
| 348 |
+
|
| 349 |
+
#if !((defined(__GNUG__) && defined(__EXCEPTIONS) && (__GNUG__ < 7)) || defined(__SUNPRO_CC))
|
| 350 |
+
# if HAVE_IOSTREAM
|
| 351 |
+
# include <iostream>
|
| 352 |
+
# if IOSTREAM_NAMESPACE
|
| 353 |
+
using std::cerr;
|
| 354 |
+
using std::endl;
|
| 355 |
+
# endif
|
| 356 |
+
# else
|
| 357 |
+
# include <iostream.h>
|
| 358 |
+
# endif
|
| 359 |
+
#endif
|
| 360 |
+
|
| 361 |
+
inline void THROW(const NCursesException *e) {
|
| 362 |
+
#if defined(__GNUG__) && defined(__EXCEPTIONS)
|
| 363 |
+
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
|
| 364 |
+
(*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
|
| 365 |
+
# elif (__GNUG__ >= 7)
|
| 366 |
+
// g++ 7.0 warns about deprecation, but lacks the predefined symbols
|
| 367 |
+
::endwin();
|
| 368 |
+
std::cerr << "Found a problem - goodbye" << std::endl;
|
| 369 |
+
exit(EXIT_FAILURE);
|
| 370 |
+
# else
|
| 371 |
+
# define CPP_HAS_TRY_CATCH 1
|
| 372 |
+
# endif
|
| 373 |
+
#elif defined(__SUNPRO_CC)
|
| 374 |
+
# if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5)
|
| 375 |
+
genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
|
| 376 |
+
# else
|
| 377 |
+
# define CPP_HAS_TRY_CATCH 1
|
| 378 |
+
# endif
|
| 379 |
+
#else
|
| 380 |
+
if (e)
|
| 381 |
+
cerr << e->message << endl;
|
| 382 |
+
exit(0);
|
| 383 |
+
#endif
|
| 384 |
+
|
| 385 |
+
#ifndef CPP_HAS_TRY_CATCH
|
| 386 |
+
#define CPP_HAS_TRY_CATCH 0
|
| 387 |
+
#define NCURSES_CPP_TRY /* nothing */
|
| 388 |
+
#define NCURSES_CPP_CATCH(e) if (false)
|
| 389 |
+
#define THROWS(s) /* nothing */
|
| 390 |
+
#define THROW2(s,t) /* nothing */
|
| 391 |
+
#elif CPP_HAS_TRY_CATCH
|
| 392 |
+
throw *e;
|
| 393 |
+
#define NCURSES_CPP_TRY try
|
| 394 |
+
#define NCURSES_CPP_CATCH(e) catch(e)
|
| 395 |
+
#if defined(__cpp_noexcept_function_type) && (__cpp_noexcept_function_type >= 201510)
|
| 396 |
+
// C++17 deprecates the usage of throw().
|
| 397 |
+
#define THROWS(s) /* nothing */
|
| 398 |
+
#define THROW2(s,t) /* nothing */
|
| 399 |
+
#else
|
| 400 |
+
#define THROWS(s) throw(s)
|
| 401 |
+
#define THROW2(s,t) throw(s,t)
|
| 402 |
+
#endif
|
| 403 |
+
#endif
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
#endif /* NCURSES_ETIP_H_incl */
|
data/miniconda3/include/ncursesw/form.h
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2019-2020,2021 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: form.h,v 0.32 2021/06/17 21:26:02 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef FORM_H
|
| 37 |
+
#define FORM_H
|
| 38 |
+
/* *INDENT-OFF*/
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/curses.h>
|
| 41 |
+
#include <ncursesw/eti.h>
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
extern "C" {
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#if defined(BUILDING_FORM)
|
| 48 |
+
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 49 |
+
#else
|
| 50 |
+
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 54 |
+
|
| 55 |
+
#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API
|
| 56 |
+
#define FORM_EXPORT_VAR(type) FORM_IMPEXP type
|
| 57 |
+
|
| 58 |
+
#ifndef FORM_PRIV_H
|
| 59 |
+
typedef void *FIELD_CELL;
|
| 60 |
+
#endif
|
| 61 |
+
|
| 62 |
+
#ifndef NCURSES_FIELD_INTERNALS
|
| 63 |
+
#define NCURSES_FIELD_INTERNALS /* nothing */
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
typedef int Form_Options;
|
| 67 |
+
typedef int Field_Options;
|
| 68 |
+
|
| 69 |
+
/**********
|
| 70 |
+
* _PAGE *
|
| 71 |
+
**********/
|
| 72 |
+
|
| 73 |
+
typedef struct pagenode
|
| 74 |
+
#if !NCURSES_OPAQUE_FORM
|
| 75 |
+
{
|
| 76 |
+
short pmin; /* index of first field on page */
|
| 77 |
+
short pmax; /* index of last field on page */
|
| 78 |
+
short smin; /* index of top leftmost field on page */
|
| 79 |
+
short smax; /* index of bottom rightmost field on page */
|
| 80 |
+
}
|
| 81 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 82 |
+
_PAGE;
|
| 83 |
+
|
| 84 |
+
/**********
|
| 85 |
+
* FIELD *
|
| 86 |
+
**********/
|
| 87 |
+
|
| 88 |
+
typedef struct fieldnode
|
| 89 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
|
| 90 |
+
{
|
| 91 |
+
unsigned short status; /* flags */
|
| 92 |
+
short rows; /* size in rows */
|
| 93 |
+
short cols; /* size in cols */
|
| 94 |
+
short frow; /* first row */
|
| 95 |
+
short fcol; /* first col */
|
| 96 |
+
int drows; /* dynamic rows */
|
| 97 |
+
int dcols; /* dynamic cols */
|
| 98 |
+
int maxgrow; /* maximum field growth */
|
| 99 |
+
int nrow; /* off-screen rows */
|
| 100 |
+
short nbuf; /* additional buffers */
|
| 101 |
+
short just; /* justification */
|
| 102 |
+
short page; /* page on form */
|
| 103 |
+
short index; /* into form -> field */
|
| 104 |
+
int pad; /* pad character */
|
| 105 |
+
chtype fore; /* foreground attribute */
|
| 106 |
+
chtype back; /* background attribute */
|
| 107 |
+
Field_Options opts; /* options */
|
| 108 |
+
struct fieldnode * snext; /* sorted order pointer */
|
| 109 |
+
struct fieldnode * sprev; /* sorted order pointer */
|
| 110 |
+
struct fieldnode * link; /* linked field chain */
|
| 111 |
+
struct formnode * form; /* containing form */
|
| 112 |
+
struct typenode * type; /* field type */
|
| 113 |
+
void * arg; /* argument for type */
|
| 114 |
+
FIELD_CELL * buf; /* field buffers */
|
| 115 |
+
void * usrptr; /* user pointer */
|
| 116 |
+
/*
|
| 117 |
+
* The wide-character configuration requires extra information. Because
|
| 118 |
+
* there are existing applications that manipulate the members of FIELD
|
| 119 |
+
* directly, we cannot make the struct opaque, except by changing the ABI.
|
| 120 |
+
* Offsets of members up to this point are the same in the narrow- and
|
| 121 |
+
* wide-character configuration. But note that the type of buf depends on
|
| 122 |
+
* the configuration, and is made opaque for that reason.
|
| 123 |
+
*/
|
| 124 |
+
NCURSES_FIELD_INTERNALS
|
| 125 |
+
}
|
| 126 |
+
#endif /* NCURSES_OPAQUE_FORM */
|
| 127 |
+
FIELD;
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
/*********
|
| 131 |
+
* FORM *
|
| 132 |
+
*********/
|
| 133 |
+
|
| 134 |
+
typedef struct formnode
|
| 135 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_FORM */
|
| 136 |
+
{
|
| 137 |
+
unsigned short status; /* flags */
|
| 138 |
+
short rows; /* size in rows */
|
| 139 |
+
short cols; /* size in cols */
|
| 140 |
+
int currow; /* current row in field window */
|
| 141 |
+
int curcol; /* current col in field window */
|
| 142 |
+
int toprow; /* in scrollable field window */
|
| 143 |
+
int begincol; /* in horiz. scrollable field */
|
| 144 |
+
short maxfield; /* number of fields */
|
| 145 |
+
short maxpage; /* number of pages */
|
| 146 |
+
short curpage; /* index into page */
|
| 147 |
+
Form_Options opts; /* options */
|
| 148 |
+
WINDOW * win; /* window */
|
| 149 |
+
WINDOW * sub; /* subwindow */
|
| 150 |
+
WINDOW * w; /* window for current field */
|
| 151 |
+
FIELD ** field; /* field [maxfield] */
|
| 152 |
+
FIELD * current; /* current field */
|
| 153 |
+
_PAGE * page; /* page [maxpage] */
|
| 154 |
+
void * usrptr; /* user pointer */
|
| 155 |
+
|
| 156 |
+
void (*forminit)(struct formnode *);
|
| 157 |
+
void (*formterm)(struct formnode *);
|
| 158 |
+
void (*fieldinit)(struct formnode *);
|
| 159 |
+
void (*fieldterm)(struct formnode *);
|
| 160 |
+
|
| 161 |
+
}
|
| 162 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 163 |
+
FORM;
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
/**************
|
| 167 |
+
* FIELDTYPE *
|
| 168 |
+
**************/
|
| 169 |
+
|
| 170 |
+
typedef struct typenode
|
| 171 |
+
#if !NCURSES_OPAQUE_FORM
|
| 172 |
+
{
|
| 173 |
+
unsigned short status; /* flags */
|
| 174 |
+
long ref; /* reference count */
|
| 175 |
+
struct typenode * left; /* ptr to operand for | */
|
| 176 |
+
struct typenode * right; /* ptr to operand for | */
|
| 177 |
+
|
| 178 |
+
void* (*makearg)(va_list *); /* make fieldtype arg */
|
| 179 |
+
void* (*copyarg)(const void *); /* copy fieldtype arg */
|
| 180 |
+
void (*freearg)(void *); /* free fieldtype arg */
|
| 181 |
+
|
| 182 |
+
#if NCURSES_INTEROP_FUNCS
|
| 183 |
+
union {
|
| 184 |
+
bool (*ofcheck)(FIELD *,const void *); /* field validation */
|
| 185 |
+
bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */
|
| 186 |
+
} fieldcheck;
|
| 187 |
+
union {
|
| 188 |
+
bool (*occheck)(int,const void *); /* character validation */
|
| 189 |
+
bool (*gccheck)(int,FORM*,
|
| 190 |
+
FIELD*,const void*); /* generic char validation */
|
| 191 |
+
} charcheck;
|
| 192 |
+
union {
|
| 193 |
+
bool (*onext)(FIELD *,const void *); /* enumerate next value */
|
| 194 |
+
bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */
|
| 195 |
+
} enum_next;
|
| 196 |
+
union {
|
| 197 |
+
bool (*oprev)(FIELD *,const void *); /* enumerate prev value */
|
| 198 |
+
bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */
|
| 199 |
+
} enum_prev;
|
| 200 |
+
void* (*genericarg)(void*); /* Alternate Arg method */
|
| 201 |
+
#else
|
| 202 |
+
bool (*fcheck)(FIELD *,const void *); /* field validation */
|
| 203 |
+
bool (*ccheck)(int,const void *); /* character validation */
|
| 204 |
+
|
| 205 |
+
bool (*next)(FIELD *,const void *); /* enumerate next value */
|
| 206 |
+
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
|
| 207 |
+
#endif
|
| 208 |
+
}
|
| 209 |
+
#endif /* !NCURSES_OPAQUE_FORM */
|
| 210 |
+
FIELDTYPE;
|
| 211 |
+
|
| 212 |
+
typedef void (*Form_Hook)(FORM *);
|
| 213 |
+
|
| 214 |
+
/***************************
|
| 215 |
+
* miscellaneous #defines *
|
| 216 |
+
***************************/
|
| 217 |
+
|
| 218 |
+
/* field justification */
|
| 219 |
+
#define NO_JUSTIFICATION (0)
|
| 220 |
+
#define JUSTIFY_LEFT (1)
|
| 221 |
+
#define JUSTIFY_CENTER (2)
|
| 222 |
+
#define JUSTIFY_RIGHT (3)
|
| 223 |
+
|
| 224 |
+
/* field options */
|
| 225 |
+
#define O_VISIBLE (0x0001U)
|
| 226 |
+
#define O_ACTIVE (0x0002U)
|
| 227 |
+
#define O_PUBLIC (0x0004U)
|
| 228 |
+
#define O_EDIT (0x0008U)
|
| 229 |
+
#define O_WRAP (0x0010U)
|
| 230 |
+
#define O_BLANK (0x0020U)
|
| 231 |
+
#define O_AUTOSKIP (0x0040U)
|
| 232 |
+
#define O_NULLOK (0x0080U)
|
| 233 |
+
#define O_PASSOK (0x0100U)
|
| 234 |
+
#define O_STATIC (0x0200U)
|
| 235 |
+
#define O_DYNAMIC_JUSTIFY (0x0400U) /* ncurses extension */
|
| 236 |
+
#define O_NO_LEFT_STRIP (0x0800U) /* ncurses extension */
|
| 237 |
+
#define O_EDGE_INSERT_STAY (0x1000U) /* ncurses extension */
|
| 238 |
+
#define O_INPUT_LIMIT (0x2000U) /* ncurses extension */
|
| 239 |
+
|
| 240 |
+
/* form options */
|
| 241 |
+
#define O_NL_OVERLOAD (0x0001U)
|
| 242 |
+
#define O_BS_OVERLOAD (0x0002U)
|
| 243 |
+
|
| 244 |
+
/* form driver commands */
|
| 245 |
+
#define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */
|
| 246 |
+
#define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */
|
| 247 |
+
#define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */
|
| 248 |
+
#define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */
|
| 249 |
+
|
| 250 |
+
#define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */
|
| 251 |
+
#define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */
|
| 252 |
+
#define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */
|
| 253 |
+
#define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */
|
| 254 |
+
#define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */
|
| 255 |
+
#define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */
|
| 256 |
+
#define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */
|
| 257 |
+
#define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */
|
| 258 |
+
#define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */
|
| 259 |
+
#define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */
|
| 260 |
+
#define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */
|
| 261 |
+
#define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */
|
| 262 |
+
|
| 263 |
+
#define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */
|
| 264 |
+
#define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */
|
| 265 |
+
#define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */
|
| 266 |
+
#define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */
|
| 267 |
+
#define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */
|
| 268 |
+
#define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */
|
| 269 |
+
#define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */
|
| 270 |
+
#define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */
|
| 271 |
+
#define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */
|
| 272 |
+
#define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */
|
| 273 |
+
#define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */
|
| 274 |
+
#define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */
|
| 275 |
+
#define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */
|
| 276 |
+
#define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */
|
| 277 |
+
|
| 278 |
+
#define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */
|
| 279 |
+
#define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */
|
| 280 |
+
#define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */
|
| 281 |
+
#define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */
|
| 282 |
+
#define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */
|
| 283 |
+
#define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */
|
| 284 |
+
#define REQ_DEL_WORD (KEY_MAX + 37) /* delete word at cursor */
|
| 285 |
+
#define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */
|
| 286 |
+
#define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */
|
| 287 |
+
#define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */
|
| 288 |
+
#define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */
|
| 289 |
+
#define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */
|
| 290 |
+
#define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */
|
| 291 |
+
#define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */
|
| 292 |
+
#define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */
|
| 293 |
+
#define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */
|
| 294 |
+
#define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */
|
| 295 |
+
#define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */
|
| 296 |
+
#define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */
|
| 297 |
+
#define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */
|
| 298 |
+
#define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */
|
| 299 |
+
#define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */
|
| 300 |
+
#define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */
|
| 301 |
+
#define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */
|
| 302 |
+
|
| 303 |
+
#define REQ_VALIDATION (KEY_MAX + 55) /* validate field */
|
| 304 |
+
#define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */
|
| 305 |
+
#define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */
|
| 306 |
+
|
| 307 |
+
#define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */
|
| 308 |
+
#define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */
|
| 309 |
+
|
| 310 |
+
#if defined(MAX_COMMAND)
|
| 311 |
+
# if (MAX_FORM_COMMAND > MAX_COMMAND)
|
| 312 |
+
# error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND
|
| 313 |
+
# elif (MAX_COMMAND != (KEY_MAX + 128))
|
| 314 |
+
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
|
| 315 |
+
# endif
|
| 316 |
+
#else
|
| 317 |
+
# define MAX_COMMAND (KEY_MAX + 128)
|
| 318 |
+
#endif
|
| 319 |
+
|
| 320 |
+
/*************************
|
| 321 |
+
* standard field types *
|
| 322 |
+
*************************/
|
| 323 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
|
| 324 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
|
| 325 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
|
| 326 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
|
| 327 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
|
| 328 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
|
| 329 |
+
|
| 330 |
+
/************************************
|
| 331 |
+
* built-in additional field types *
|
| 332 |
+
* They are not defined in SVr4 *
|
| 333 |
+
************************************/
|
| 334 |
+
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
|
| 335 |
+
|
| 336 |
+
/***********************
|
| 337 |
+
* FIELDTYPE routines *
|
| 338 |
+
***********************/
|
| 339 |
+
extern FORM_EXPORT(FIELDTYPE *) new_fieldtype (
|
| 340 |
+
bool (* const field_check)(FIELD *,const void *),
|
| 341 |
+
bool (* const char_check)(int,const void *));
|
| 342 |
+
extern FORM_EXPORT(FIELDTYPE *) link_fieldtype(
|
| 343 |
+
FIELDTYPE *, FIELDTYPE *);
|
| 344 |
+
|
| 345 |
+
extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *);
|
| 346 |
+
extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
|
| 347 |
+
void * (* const make_arg)(va_list *),
|
| 348 |
+
void * (* const copy_arg)(const void *),
|
| 349 |
+
void (* const free_arg)(void *));
|
| 350 |
+
extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
|
| 351 |
+
bool (* const next_choice)(FIELD *,const void *),
|
| 352 |
+
bool (* const prev_choice)(FIELD *,const void *));
|
| 353 |
+
|
| 354 |
+
/*******************
|
| 355 |
+
* FIELD routines *
|
| 356 |
+
*******************/
|
| 357 |
+
extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
|
| 358 |
+
extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int);
|
| 359 |
+
extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int);
|
| 360 |
+
|
| 361 |
+
extern FORM_EXPORT(int) free_field (FIELD *);
|
| 362 |
+
extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
|
| 363 |
+
extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
|
| 364 |
+
extern FORM_EXPORT(int) set_max_field ( FIELD *,int);
|
| 365 |
+
extern FORM_EXPORT(int) move_field (FIELD *,int,int);
|
| 366 |
+
extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
|
| 367 |
+
extern FORM_EXPORT(int) set_new_page (FIELD *,bool);
|
| 368 |
+
extern FORM_EXPORT(int) set_field_just (FIELD *,int);
|
| 369 |
+
extern FORM_EXPORT(int) field_just (const FIELD *);
|
| 370 |
+
extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype);
|
| 371 |
+
extern FORM_EXPORT(int) set_field_back (FIELD *,chtype);
|
| 372 |
+
extern FORM_EXPORT(int) set_field_pad (FIELD *,int);
|
| 373 |
+
extern FORM_EXPORT(int) field_pad (const FIELD *);
|
| 374 |
+
extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
|
| 375 |
+
extern FORM_EXPORT(int) set_field_status (FIELD *,bool);
|
| 376 |
+
extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *);
|
| 377 |
+
extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options);
|
| 378 |
+
extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options);
|
| 379 |
+
extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options);
|
| 380 |
+
|
| 381 |
+
extern FORM_EXPORT(chtype) field_fore (const FIELD *);
|
| 382 |
+
extern FORM_EXPORT(chtype) field_back (const FIELD *);
|
| 383 |
+
|
| 384 |
+
extern FORM_EXPORT(bool) new_page (const FIELD *);
|
| 385 |
+
extern FORM_EXPORT(bool) field_status (const FIELD *);
|
| 386 |
+
|
| 387 |
+
extern FORM_EXPORT(void *) field_arg (const FIELD *);
|
| 388 |
+
|
| 389 |
+
extern FORM_EXPORT(void *) field_userptr (const FIELD *);
|
| 390 |
+
|
| 391 |
+
extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *);
|
| 392 |
+
|
| 393 |
+
extern FORM_EXPORT(char *) field_buffer (const FIELD *,int);
|
| 394 |
+
|
| 395 |
+
extern FORM_EXPORT(Field_Options) field_opts (const FIELD *);
|
| 396 |
+
|
| 397 |
+
/******************
|
| 398 |
+
* FORM routines *
|
| 399 |
+
******************/
|
| 400 |
+
|
| 401 |
+
extern FORM_EXPORT(FORM *) new_form (FIELD **);
|
| 402 |
+
|
| 403 |
+
extern FORM_EXPORT(FIELD **) form_fields (const FORM *);
|
| 404 |
+
extern FORM_EXPORT(FIELD *) current_field (const FORM *);
|
| 405 |
+
|
| 406 |
+
extern FORM_EXPORT(WINDOW *) form_win (const FORM *);
|
| 407 |
+
extern FORM_EXPORT(WINDOW *) form_sub (const FORM *);
|
| 408 |
+
|
| 409 |
+
extern FORM_EXPORT(Form_Hook) form_init (const FORM *);
|
| 410 |
+
extern FORM_EXPORT(Form_Hook) form_term (const FORM *);
|
| 411 |
+
extern FORM_EXPORT(Form_Hook) field_init (const FORM *);
|
| 412 |
+
extern FORM_EXPORT(Form_Hook) field_term (const FORM *);
|
| 413 |
+
|
| 414 |
+
extern FORM_EXPORT(int) free_form (FORM *);
|
| 415 |
+
extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **);
|
| 416 |
+
extern FORM_EXPORT(int) field_count (const FORM *);
|
| 417 |
+
extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *);
|
| 418 |
+
extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *);
|
| 419 |
+
extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *);
|
| 420 |
+
extern FORM_EXPORT(int) unfocus_current_field (FORM *);
|
| 421 |
+
extern FORM_EXPORT(int) field_index (const FIELD *);
|
| 422 |
+
extern FORM_EXPORT(int) set_form_page (FORM *,int);
|
| 423 |
+
extern FORM_EXPORT(int) form_page (const FORM *);
|
| 424 |
+
extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *);
|
| 425 |
+
extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook);
|
| 426 |
+
extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook);
|
| 427 |
+
extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook);
|
| 428 |
+
extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook);
|
| 429 |
+
extern FORM_EXPORT(int) post_form (FORM *);
|
| 430 |
+
extern FORM_EXPORT(int) unpost_form (FORM *);
|
| 431 |
+
extern FORM_EXPORT(int) pos_form_cursor (FORM *);
|
| 432 |
+
extern FORM_EXPORT(int) form_driver (FORM *,int);
|
| 433 |
+
# if NCURSES_WIDECHAR
|
| 434 |
+
extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
|
| 435 |
+
# endif
|
| 436 |
+
extern FORM_EXPORT(int) set_form_userptr (FORM *,void *);
|
| 437 |
+
extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options);
|
| 438 |
+
extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options);
|
| 439 |
+
extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options);
|
| 440 |
+
extern FORM_EXPORT(int) form_request_by_name (const char *);
|
| 441 |
+
|
| 442 |
+
extern FORM_EXPORT(const char *) form_request_name (int);
|
| 443 |
+
|
| 444 |
+
extern FORM_EXPORT(void *) form_userptr (const FORM *);
|
| 445 |
+
|
| 446 |
+
extern FORM_EXPORT(Form_Options) form_opts (const FORM *);
|
| 447 |
+
|
| 448 |
+
extern FORM_EXPORT(bool) data_ahead (const FORM *);
|
| 449 |
+
extern FORM_EXPORT(bool) data_behind (const FORM *);
|
| 450 |
+
|
| 451 |
+
#if NCURSES_SP_FUNCS
|
| 452 |
+
extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
|
| 453 |
+
#endif
|
| 454 |
+
|
| 455 |
+
#ifdef __cplusplus
|
| 456 |
+
}
|
| 457 |
+
#endif
|
| 458 |
+
/* *INDENT-ON*/
|
| 459 |
+
|
| 460 |
+
#endif /* FORM_H */
|
data/miniconda3/include/ncursesw/menu.h
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: menu.h,v 1.26 2020/12/12 00:38:02 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef ETI_MENU
|
| 37 |
+
#define ETI_MENU
|
| 38 |
+
|
| 39 |
+
#ifdef AMIGA
|
| 40 |
+
#define TEXT TEXT_ncurses
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/curses.h>
|
| 44 |
+
#include <ncursesw/eti.h>
|
| 45 |
+
|
| 46 |
+
#ifdef __cplusplus
|
| 47 |
+
extern "C"
|
| 48 |
+
{
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#if defined(BUILDING_MENU)
|
| 52 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 53 |
+
#else
|
| 54 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 58 |
+
|
| 59 |
+
#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
|
| 60 |
+
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type
|
| 61 |
+
|
| 62 |
+
typedef int Menu_Options;
|
| 63 |
+
typedef int Item_Options;
|
| 64 |
+
|
| 65 |
+
/* Menu options: */
|
| 66 |
+
#define O_ONEVALUE (0x01)
|
| 67 |
+
#define O_SHOWDESC (0x02)
|
| 68 |
+
#define O_ROWMAJOR (0x04)
|
| 69 |
+
#define O_IGNORECASE (0x08)
|
| 70 |
+
#define O_SHOWMATCH (0x10)
|
| 71 |
+
#define O_NONCYCLIC (0x20)
|
| 72 |
+
#define O_MOUSE_MENU (0x40)
|
| 73 |
+
|
| 74 |
+
/* Item options: */
|
| 75 |
+
#define O_SELECTABLE (0x01)
|
| 76 |
+
|
| 77 |
+
#if !NCURSES_OPAQUE_MENU
|
| 78 |
+
typedef struct
|
| 79 |
+
{
|
| 80 |
+
const char *str;
|
| 81 |
+
unsigned short length;
|
| 82 |
+
}
|
| 83 |
+
TEXT;
|
| 84 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 85 |
+
|
| 86 |
+
struct tagMENU;
|
| 87 |
+
|
| 88 |
+
typedef struct tagITEM
|
| 89 |
+
#if !NCURSES_OPAQUE_MENU
|
| 90 |
+
{
|
| 91 |
+
TEXT name; /* name of menu item */
|
| 92 |
+
TEXT description; /* description of item, optional in display */
|
| 93 |
+
struct tagMENU *imenu; /* Pointer to parent menu */
|
| 94 |
+
void *userptr; /* Pointer to user defined per item data */
|
| 95 |
+
Item_Options opt; /* Item options */
|
| 96 |
+
short index; /* Item number if connected to a menu */
|
| 97 |
+
short y; /* y and x location of item in menu */
|
| 98 |
+
short x;
|
| 99 |
+
bool value; /* Selection value */
|
| 100 |
+
|
| 101 |
+
struct tagITEM *left; /* neighbor items */
|
| 102 |
+
struct tagITEM *right;
|
| 103 |
+
struct tagITEM *up;
|
| 104 |
+
struct tagITEM *down;
|
| 105 |
+
|
| 106 |
+
}
|
| 107 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 108 |
+
ITEM;
|
| 109 |
+
|
| 110 |
+
typedef void (*Menu_Hook) (struct tagMENU *);
|
| 111 |
+
|
| 112 |
+
typedef struct tagMENU
|
| 113 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_MENU */
|
| 114 |
+
{
|
| 115 |
+
short height; /* Nr. of chars high */
|
| 116 |
+
short width; /* Nr. of chars wide */
|
| 117 |
+
short rows; /* Nr. of items high */
|
| 118 |
+
short cols; /* Nr. of items wide */
|
| 119 |
+
short frows; /* Nr. of formatted items high */
|
| 120 |
+
short fcols; /* Nr. of formatted items wide */
|
| 121 |
+
short arows; /* Nr. of items high (actual) */
|
| 122 |
+
short namelen; /* Max. name length */
|
| 123 |
+
short desclen; /* Max. description length */
|
| 124 |
+
short marklen; /* Length of mark, if any */
|
| 125 |
+
short itemlen; /* Length of one item */
|
| 126 |
+
short spc_desc; /* Spacing for descriptor */
|
| 127 |
+
short spc_cols; /* Spacing for columns */
|
| 128 |
+
short spc_rows; /* Spacing for rows */
|
| 129 |
+
char *pattern; /* Buffer to store match chars */
|
| 130 |
+
short pindex; /* Index into pattern buffer */
|
| 131 |
+
WINDOW *win; /* Window containing menu */
|
| 132 |
+
WINDOW *sub; /* Subwindow for menu display */
|
| 133 |
+
WINDOW *userwin; /* User's window */
|
| 134 |
+
WINDOW *usersub; /* User's subwindow */
|
| 135 |
+
ITEM **items; /* array of items */
|
| 136 |
+
short nitems; /* Nr. of items in menu */
|
| 137 |
+
ITEM *curitem; /* Current item */
|
| 138 |
+
short toprow; /* Top row of menu */
|
| 139 |
+
chtype fore; /* Selection attribute */
|
| 140 |
+
chtype back; /* Nonselection attribute */
|
| 141 |
+
chtype grey; /* Inactive attribute */
|
| 142 |
+
unsigned char pad; /* Pad character */
|
| 143 |
+
|
| 144 |
+
Menu_Hook menuinit; /* User hooks */
|
| 145 |
+
Menu_Hook menuterm;
|
| 146 |
+
Menu_Hook iteminit;
|
| 147 |
+
Menu_Hook itemterm;
|
| 148 |
+
|
| 149 |
+
void *userptr; /* Pointer to menus user data */
|
| 150 |
+
char *mark; /* Pointer to marker string */
|
| 151 |
+
|
| 152 |
+
Menu_Options opt; /* Menu options */
|
| 153 |
+
unsigned short status; /* Internal state of menu */
|
| 154 |
+
}
|
| 155 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 156 |
+
MENU;
|
| 157 |
+
|
| 158 |
+
/* Define keys */
|
| 159 |
+
|
| 160 |
+
#define REQ_LEFT_ITEM (KEY_MAX + 1)
|
| 161 |
+
#define REQ_RIGHT_ITEM (KEY_MAX + 2)
|
| 162 |
+
#define REQ_UP_ITEM (KEY_MAX + 3)
|
| 163 |
+
#define REQ_DOWN_ITEM (KEY_MAX + 4)
|
| 164 |
+
#define REQ_SCR_ULINE (KEY_MAX + 5)
|
| 165 |
+
#define REQ_SCR_DLINE (KEY_MAX + 6)
|
| 166 |
+
#define REQ_SCR_DPAGE (KEY_MAX + 7)
|
| 167 |
+
#define REQ_SCR_UPAGE (KEY_MAX + 8)
|
| 168 |
+
#define REQ_FIRST_ITEM (KEY_MAX + 9)
|
| 169 |
+
#define REQ_LAST_ITEM (KEY_MAX + 10)
|
| 170 |
+
#define REQ_NEXT_ITEM (KEY_MAX + 11)
|
| 171 |
+
#define REQ_PREV_ITEM (KEY_MAX + 12)
|
| 172 |
+
#define REQ_TOGGLE_ITEM (KEY_MAX + 13)
|
| 173 |
+
#define REQ_CLEAR_PATTERN (KEY_MAX + 14)
|
| 174 |
+
#define REQ_BACK_PATTERN (KEY_MAX + 15)
|
| 175 |
+
#define REQ_NEXT_MATCH (KEY_MAX + 16)
|
| 176 |
+
#define REQ_PREV_MATCH (KEY_MAX + 17)
|
| 177 |
+
|
| 178 |
+
#define MIN_MENU_COMMAND (KEY_MAX + 1)
|
| 179 |
+
#define MAX_MENU_COMMAND (KEY_MAX + 17)
|
| 180 |
+
|
| 181 |
+
/*
|
| 182 |
+
* Some AT&T code expects MAX_COMMAND to be out-of-band not
|
| 183 |
+
* just for menu commands but for forms ones as well.
|
| 184 |
+
*/
|
| 185 |
+
#if defined(MAX_COMMAND)
|
| 186 |
+
# if (MAX_MENU_COMMAND > MAX_COMMAND)
|
| 187 |
+
# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND
|
| 188 |
+
# elif (MAX_COMMAND != (KEY_MAX + 128))
|
| 189 |
+
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
|
| 190 |
+
# endif
|
| 191 |
+
#else
|
| 192 |
+
# define MAX_COMMAND (KEY_MAX + 128)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
/* --------- prototypes for libmenu functions ----------------------------- */
|
| 196 |
+
|
| 197 |
+
extern MENU_EXPORT(ITEM **) menu_items(const MENU *);
|
| 198 |
+
extern MENU_EXPORT(ITEM *) current_item(const MENU *);
|
| 199 |
+
extern MENU_EXPORT(ITEM *) new_item(const char *, const char *);
|
| 200 |
+
|
| 201 |
+
extern MENU_EXPORT(MENU *) new_menu(ITEM **);
|
| 202 |
+
|
| 203 |
+
extern MENU_EXPORT(Item_Options) item_opts(const ITEM *);
|
| 204 |
+
extern MENU_EXPORT(Menu_Options) menu_opts(const MENU *);
|
| 205 |
+
|
| 206 |
+
extern MENU_EXPORT(Menu_Hook) item_init(const MENU *);
|
| 207 |
+
extern MENU_EXPORT(Menu_Hook) item_term(const MENU *);
|
| 208 |
+
extern MENU_EXPORT(Menu_Hook) menu_init(const MENU *);
|
| 209 |
+
extern MENU_EXPORT(Menu_Hook) menu_term(const MENU *);
|
| 210 |
+
|
| 211 |
+
extern MENU_EXPORT(WINDOW *) menu_sub(const MENU *);
|
| 212 |
+
extern MENU_EXPORT(WINDOW *) menu_win(const MENU *);
|
| 213 |
+
|
| 214 |
+
extern MENU_EXPORT(const char *) item_description(const ITEM *);
|
| 215 |
+
extern MENU_EXPORT(const char *) item_name(const ITEM *);
|
| 216 |
+
extern MENU_EXPORT(const char *) menu_mark(const MENU *);
|
| 217 |
+
extern MENU_EXPORT(const char *) menu_request_name(int);
|
| 218 |
+
|
| 219 |
+
extern MENU_EXPORT(char *) menu_pattern(const MENU *);
|
| 220 |
+
|
| 221 |
+
extern MENU_EXPORT(void *) menu_userptr(const MENU *);
|
| 222 |
+
extern MENU_EXPORT(void *) item_userptr(const ITEM *);
|
| 223 |
+
|
| 224 |
+
extern MENU_EXPORT(chtype) menu_back(const MENU *);
|
| 225 |
+
extern MENU_EXPORT(chtype) menu_fore(const MENU *);
|
| 226 |
+
extern MENU_EXPORT(chtype) menu_grey(const MENU *);
|
| 227 |
+
|
| 228 |
+
extern MENU_EXPORT(int) free_item(ITEM *);
|
| 229 |
+
extern MENU_EXPORT(int) free_menu(MENU *);
|
| 230 |
+
extern MENU_EXPORT(int) item_count(const MENU *);
|
| 231 |
+
extern MENU_EXPORT(int) item_index(const ITEM *);
|
| 232 |
+
extern MENU_EXPORT(int) item_opts_off(ITEM *, Item_Options);
|
| 233 |
+
extern MENU_EXPORT(int) item_opts_on(ITEM *, Item_Options);
|
| 234 |
+
extern MENU_EXPORT(int) menu_driver(MENU *, int);
|
| 235 |
+
extern MENU_EXPORT(int) menu_opts_off(MENU *, Menu_Options);
|
| 236 |
+
extern MENU_EXPORT(int) menu_opts_on(MENU *, Menu_Options);
|
| 237 |
+
extern MENU_EXPORT(int) menu_pad(const MENU *);
|
| 238 |
+
extern MENU_EXPORT(int) pos_menu_cursor(const MENU *);
|
| 239 |
+
extern MENU_EXPORT(int) post_menu(MENU *);
|
| 240 |
+
extern MENU_EXPORT(int) scale_menu(const MENU *, int *, int *);
|
| 241 |
+
extern MENU_EXPORT(int) set_current_item(MENU *menu, ITEM *item);
|
| 242 |
+
extern MENU_EXPORT(int) set_item_init(MENU *, Menu_Hook);
|
| 243 |
+
extern MENU_EXPORT(int) set_item_opts(ITEM *, Item_Options);
|
| 244 |
+
extern MENU_EXPORT(int) set_item_term(MENU *, Menu_Hook);
|
| 245 |
+
extern MENU_EXPORT(int) set_item_userptr(ITEM *, void *);
|
| 246 |
+
extern MENU_EXPORT(int) set_item_value(ITEM *, bool);
|
| 247 |
+
extern MENU_EXPORT(int) set_menu_back(MENU *, chtype);
|
| 248 |
+
extern MENU_EXPORT(int) set_menu_fore(MENU *, chtype);
|
| 249 |
+
extern MENU_EXPORT(int) set_menu_format(MENU *, int, int);
|
| 250 |
+
extern MENU_EXPORT(int) set_menu_grey(MENU *, chtype);
|
| 251 |
+
extern MENU_EXPORT(int) set_menu_init(MENU *, Menu_Hook);
|
| 252 |
+
extern MENU_EXPORT(int) set_menu_items(MENU *, ITEM **);
|
| 253 |
+
extern MENU_EXPORT(int) set_menu_mark(MENU *, const char *);
|
| 254 |
+
extern MENU_EXPORT(int) set_menu_opts(MENU *, Menu_Options);
|
| 255 |
+
extern MENU_EXPORT(int) set_menu_pad(MENU *, int);
|
| 256 |
+
extern MENU_EXPORT(int) set_menu_pattern(MENU *, const char *);
|
| 257 |
+
extern MENU_EXPORT(int) set_menu_sub(MENU *, WINDOW *);
|
| 258 |
+
extern MENU_EXPORT(int) set_menu_term(MENU *, Menu_Hook);
|
| 259 |
+
extern MENU_EXPORT(int) set_menu_userptr(MENU *, void *);
|
| 260 |
+
extern MENU_EXPORT(int) set_menu_win(MENU *, WINDOW *);
|
| 261 |
+
extern MENU_EXPORT(int) set_top_row(MENU *, int);
|
| 262 |
+
extern MENU_EXPORT(int) top_row(const MENU *);
|
| 263 |
+
extern MENU_EXPORT(int) unpost_menu(MENU *);
|
| 264 |
+
extern MENU_EXPORT(int) menu_request_by_name(const char *);
|
| 265 |
+
extern MENU_EXPORT(int) set_menu_spacing(MENU *, int, int, int);
|
| 266 |
+
extern MENU_EXPORT(int) menu_spacing(const MENU *, int *, int *, int *);
|
| 267 |
+
|
| 268 |
+
extern MENU_EXPORT(bool) item_value(const ITEM *);
|
| 269 |
+
extern MENU_EXPORT(bool) item_visible(const ITEM *);
|
| 270 |
+
|
| 271 |
+
extern MENU_EXPORT(void) menu_format(const MENU *, int *, int *);
|
| 272 |
+
|
| 273 |
+
#if NCURSES_SP_FUNCS
|
| 274 |
+
extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN *, ITEM **);
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef __cplusplus
|
| 278 |
+
}
|
| 279 |
+
#endif
|
| 280 |
+
|
| 281 |
+
#endif /* ETI_MENU */
|
data/miniconda3/include/ncursesw/ncurses.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/miniconda3/include/ncursesw/ncurses_dll.h
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2020,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 2009,2014 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
/* $Id: ncurses_dll.h.in,v 1.18 2023/05/06 20:12:43 tom Exp $ */
|
| 30 |
+
|
| 31 |
+
#ifndef NCURSES_DLL_H_incl
|
| 32 |
+
#define NCURSES_DLL_H_incl 1
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* MinGW gcc (unlike MSYS2 and Cygwin) should define _WIN32 and possibly _WIN64.
|
| 36 |
+
*/
|
| 37 |
+
#if defined(__MINGW64__)
|
| 38 |
+
|
| 39 |
+
#ifndef _WIN64
|
| 40 |
+
#define _WIN64 1
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#elif defined(__MINGW32__)
|
| 44 |
+
|
| 45 |
+
#ifndef _WIN32
|
| 46 |
+
#define _WIN32 1
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
/* 2014-08-02 workaround for broken MinGW compiler.
|
| 50 |
+
* Oddly, only TRACE is mapped to trace - the other -D's are okay.
|
| 51 |
+
* suggest TDM as an alternative.
|
| 52 |
+
*/
|
| 53 |
+
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
|
| 54 |
+
|
| 55 |
+
#ifdef trace
|
| 56 |
+
#undef trace
|
| 57 |
+
#define TRACE
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
#endif /* broken compiler */
|
| 61 |
+
|
| 62 |
+
#endif /* MingW */
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* For reentrant code, we map the various global variables into SCREEN by
|
| 66 |
+
* using functions to access them.
|
| 67 |
+
*/
|
| 68 |
+
#define NCURSES_PUBLIC_VAR(name) _nc_##name
|
| 69 |
+
|
| 70 |
+
#if defined(BUILDING_NCURSES)
|
| 71 |
+
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 72 |
+
#else
|
| 73 |
+
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 77 |
+
|
| 78 |
+
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
|
| 79 |
+
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* These symbols hide dllimport/dllexport, for compilers which care about it.
|
| 83 |
+
*/
|
| 84 |
+
#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
|
| 85 |
+
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
|
| 86 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT
|
| 87 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT
|
| 88 |
+
# else
|
| 89 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
|
| 90 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
|
| 91 |
+
# endif
|
| 92 |
+
# define NCURSES_API __cdecl
|
| 93 |
+
#else
|
| 94 |
+
# define NCURSES_EXPORT_GENERAL_IMPORT
|
| 95 |
+
# if (__GNUC__ >= 4) && !defined(__cplusplus)
|
| 96 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT __attribute__((visibility ("default")))
|
| 97 |
+
# else
|
| 98 |
+
# define NCURSES_EXPORT_GENERAL_EXPORT
|
| 99 |
+
# endif
|
| 100 |
+
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
|
| 101 |
+
#endif
|
| 102 |
+
|
| 103 |
+
#endif /* NCURSES_DLL_H_incl */
|
data/miniconda3/include/ncursesw/panel.h
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2009,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
* and: Juergen Pfeifer 1996-1999,2008 *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: panel.h,v 1.14 2020/07/04 20:38:43 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/* panel.h -- interface file for panels library */
|
| 39 |
+
|
| 40 |
+
#ifndef NCURSES_PANEL_H_incl
|
| 41 |
+
#define NCURSES_PANEL_H_incl 1
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/curses.h>
|
| 44 |
+
|
| 45 |
+
typedef struct panel
|
| 46 |
+
#if !NCURSES_OPAQUE_PANEL
|
| 47 |
+
{
|
| 48 |
+
WINDOW *win;
|
| 49 |
+
struct panel *below;
|
| 50 |
+
struct panel *above;
|
| 51 |
+
NCURSES_CONST void *user;
|
| 52 |
+
}
|
| 53 |
+
#endif /* !NCURSES_OPAQUE_PANEL */
|
| 54 |
+
PANEL;
|
| 55 |
+
|
| 56 |
+
#if defined(__cplusplus)
|
| 57 |
+
extern "C" {
|
| 58 |
+
#endif
|
| 59 |
+
|
| 60 |
+
#if defined(BUILDING_PANEL)
|
| 61 |
+
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 62 |
+
#else
|
| 63 |
+
# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 67 |
+
|
| 68 |
+
#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API
|
| 69 |
+
#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type
|
| 70 |
+
|
| 71 |
+
extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *);
|
| 72 |
+
extern PANEL_EXPORT(void) update_panels (void);
|
| 73 |
+
extern PANEL_EXPORT(int) hide_panel (PANEL *);
|
| 74 |
+
extern PANEL_EXPORT(int) show_panel (PANEL *);
|
| 75 |
+
extern PANEL_EXPORT(int) del_panel (PANEL *);
|
| 76 |
+
extern PANEL_EXPORT(int) top_panel (PANEL *);
|
| 77 |
+
extern PANEL_EXPORT(int) bottom_panel (PANEL *);
|
| 78 |
+
extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *);
|
| 79 |
+
extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *);
|
| 80 |
+
extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *);
|
| 81 |
+
extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *);
|
| 82 |
+
extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *);
|
| 83 |
+
extern PANEL_EXPORT(int) move_panel (PANEL *, int, int);
|
| 84 |
+
extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *);
|
| 85 |
+
extern PANEL_EXPORT(int) panel_hidden (const PANEL *);
|
| 86 |
+
|
| 87 |
+
#if NCURSES_SP_FUNCS
|
| 88 |
+
extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *);
|
| 89 |
+
extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *);
|
| 90 |
+
|
| 91 |
+
extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
|
| 92 |
+
#endif
|
| 93 |
+
|
| 94 |
+
#if defined(__cplusplus)
|
| 95 |
+
}
|
| 96 |
+
#endif
|
| 97 |
+
|
| 98 |
+
#endif /* NCURSES_PANEL_H_incl */
|
| 99 |
+
|
| 100 |
+
/* end of pan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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2021,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2013,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************/
|
| 31 |
+
/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */
|
| 32 |
+
/* and: Eric S. Raymond <esr@snark.thyrsus.com> */
|
| 33 |
+
/* and: Thomas E. Dickey 1995-on */
|
| 34 |
+
/****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: MKterm.h.awk.in,v 1.85 2023/04/23 19:15:36 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
** term.h -- Definition of struct term
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
#ifndef NCURSES_TERM_H_incl
|
| 43 |
+
#define NCURSES_TERM_H_incl 1
|
| 44 |
+
|
| 45 |
+
#undef NCURSES_VERSION
|
| 46 |
+
#define NCURSES_VERSION "6.5"
|
| 47 |
+
|
| 48 |
+
#include <ncursesw/ncurses_dll.h>
|
| 49 |
+
|
| 50 |
+
#ifdef __cplusplus
|
| 51 |
+
extern "C" {
|
| 52 |
+
#endif
|
| 53 |
+
|
| 54 |
+
/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H
|
| 55 |
+
* definition (based on the system for which this was configured).
|
| 56 |
+
*/
|
| 57 |
+
|
| 58 |
+
#ifndef __NCURSES_H
|
| 59 |
+
|
| 60 |
+
typedef struct screen SCREEN;
|
| 61 |
+
|
| 62 |
+
#if 1
|
| 63 |
+
#undef NCURSES_SP_FUNCS
|
| 64 |
+
#define NCURSES_SP_FUNCS 20240427
|
| 65 |
+
#undef NCURSES_SP_NAME
|
| 66 |
+
#define NCURSES_SP_NAME(name) name##_sp
|
| 67 |
+
|
| 68 |
+
/* Define the sp-funcs helper function */
|
| 69 |
+
#undef NCURSES_SP_OUTC
|
| 70 |
+
#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
|
| 71 |
+
typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
|
| 72 |
+
#endif
|
| 73 |
+
|
| 74 |
+
#endif /* __NCURSES_H */
|
| 75 |
+
|
| 76 |
+
#undef NCURSES_CONST
|
| 77 |
+
#define NCURSES_CONST const
|
| 78 |
+
|
| 79 |
+
#undef NCURSES_SBOOL
|
| 80 |
+
#define NCURSES_SBOOL char
|
| 81 |
+
|
| 82 |
+
#undef NCURSES_USE_DATABASE
|
| 83 |
+
#define NCURSES_USE_DATABASE 1
|
| 84 |
+
|
| 85 |
+
#undef NCURSES_USE_TERMCAP
|
| 86 |
+
#define NCURSES_USE_TERMCAP 1
|
| 87 |
+
|
| 88 |
+
#undef NCURSES_XNAMES
|
| 89 |
+
#define NCURSES_XNAMES 1
|
| 90 |
+
|
| 91 |
+
/* We will use these symbols to hide differences between
|
| 92 |
+
* termios/termio/sgttyb interfaces.
|
| 93 |
+
*/
|
| 94 |
+
#undef TTY
|
| 95 |
+
#undef SET_TTY
|
| 96 |
+
#undef GET_TTY
|
| 97 |
+
|
| 98 |
+
/* Assume POSIX termio if we have the header and function */
|
| 99 |
+
/* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */
|
| 100 |
+
#if 1 && 1
|
| 101 |
+
|
| 102 |
+
#undef TERMIOS
|
| 103 |
+
#define TERMIOS 1
|
| 104 |
+
|
| 105 |
+
#include <termios.h>
|
| 106 |
+
#define TTY struct termios
|
| 107 |
+
|
| 108 |
+
#else /* !HAVE_TERMIOS_H */
|
| 109 |
+
|
| 110 |
+
/* #if HAVE_TERMIO_H */
|
| 111 |
+
#if 1
|
| 112 |
+
|
| 113 |
+
#undef TERMIOS
|
| 114 |
+
#define TERMIOS 1
|
| 115 |
+
|
| 116 |
+
#include <termio.h>
|
| 117 |
+
#define TTY struct termio
|
| 118 |
+
|
| 119 |
+
#else /* !HAVE_TERMIO_H */
|
| 120 |
+
|
| 121 |
+
#if (defined(_WIN32) || defined(_WIN64))
|
| 122 |
+
#if 0
|
| 123 |
+
#include <ncursesw/win32_curses.h>
|
| 124 |
+
#define TTY struct winconmode
|
| 125 |
+
#else
|
| 126 |
+
#include <ncursesw/ncurses_mingw.h>
|
| 127 |
+
#define TTY struct termios
|
| 128 |
+
#endif
|
| 129 |
+
#else
|
| 130 |
+
#undef TERMIOS
|
| 131 |
+
#include <sgtty.h>
|
| 132 |
+
#include <sys/ioctl.h>
|
| 133 |
+
#define TTY struct sgttyb
|
| 134 |
+
#endif /* MINGW32 */
|
| 135 |
+
#endif /* HAVE_TERMIO_H */
|
| 136 |
+
|
| 137 |
+
#endif /* HAVE_TERMIOS_H */
|
| 138 |
+
|
| 139 |
+
#ifdef TERMIOS
|
| 140 |
+
#define GET_TTY(fd, buf) tcgetattr(fd, buf)
|
| 141 |
+
#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)
|
| 142 |
+
#elif 0 && (defined(_WIN32) || defined(_WIN64))
|
| 143 |
+
#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)
|
| 144 |
+
#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),buf)
|
| 145 |
+
#else
|
| 146 |
+
#define GET_TTY(fd, buf) gtty(fd, buf)
|
| 147 |
+
#define SET_TTY(fd, buf) stty(fd, buf)
|
| 148 |
+
#endif
|
| 149 |
+
|
| 150 |
+
#ifndef GCC_NORETURN
|
| 151 |
+
#define GCC_NORETURN /* nothing */
|
| 152 |
+
#endif
|
| 153 |
+
|
| 154 |
+
#define NAMESIZE 256
|
| 155 |
+
|
| 156 |
+
/* The cast works because TERMTYPE is the first data in TERMINAL */
|
| 157 |
+
#define CUR ((TERMTYPE *)(cur_term))->
|
| 158 |
+
|
| 159 |
+
#define auto_left_margin CUR Booleans[0]
|
| 160 |
+
#define auto_right_margin CUR Booleans[1]
|
| 161 |
+
#define no_esc_ctlc CUR Booleans[2]
|
| 162 |
+
#define ceol_standout_glitch CUR Booleans[3]
|
| 163 |
+
#define eat_newline_glitch CUR Booleans[4]
|
| 164 |
+
#define erase_overstrike CUR Booleans[5]
|
| 165 |
+
#define generic_type CUR Booleans[6]
|
| 166 |
+
#define hard_copy CUR Booleans[7]
|
| 167 |
+
#define has_meta_key CUR Booleans[8]
|
| 168 |
+
#define has_status_line CUR Booleans[9]
|
| 169 |
+
#define insert_null_glitch CUR Booleans[10]
|
| 170 |
+
#define memory_above CUR Booleans[11]
|
| 171 |
+
#define memory_below CUR Booleans[12]
|
| 172 |
+
#define move_insert_mode CUR Booleans[13]
|
| 173 |
+
#define move_standout_mode CUR Booleans[14]
|
| 174 |
+
#define over_strike CUR Booleans[15]
|
| 175 |
+
#define status_line_esc_ok CUR Booleans[16]
|
| 176 |
+
#define dest_tabs_magic_smso CUR Booleans[17]
|
| 177 |
+
#define tilde_glitch CUR Booleans[18]
|
| 178 |
+
#define transparent_underline CUR Booleans[19]
|
| 179 |
+
#define xon_xoff CUR Booleans[20]
|
| 180 |
+
#define needs_xon_xoff CUR Booleans[21]
|
| 181 |
+
#define prtr_silent CUR Booleans[22]
|
| 182 |
+
#define hard_cursor CUR Booleans[23]
|
| 183 |
+
#define non_rev_rmcup CUR Booleans[24]
|
| 184 |
+
#define no_pad_char CUR Booleans[25]
|
| 185 |
+
#define non_dest_scroll_region CUR Booleans[26]
|
| 186 |
+
#define can_change CUR Booleans[27]
|
| 187 |
+
#define back_color_erase CUR Booleans[28]
|
| 188 |
+
#define hue_lightness_saturation CUR Booleans[29]
|
| 189 |
+
#define col_addr_glitch CUR Booleans[30]
|
| 190 |
+
#define cr_cancels_micro_mode CUR Booleans[31]
|
| 191 |
+
#define has_print_wheel CUR Booleans[32]
|
| 192 |
+
#define row_addr_glitch CUR Booleans[33]
|
| 193 |
+
#define semi_auto_right_margin CUR Booleans[34]
|
| 194 |
+
#define cpi_changes_res CUR Booleans[35]
|
| 195 |
+
#define lpi_changes_res CUR Booleans[36]
|
| 196 |
+
#define columns CUR Numbers[0]
|
| 197 |
+
#define init_tabs CUR Numbers[1]
|
| 198 |
+
#define lines CUR Numbers[2]
|
| 199 |
+
#define lines_of_memory CUR Numbers[3]
|
| 200 |
+
#define magic_cookie_glitch CUR Numbers[4]
|
| 201 |
+
#define padding_baud_rate CUR Numbers[5]
|
| 202 |
+
#define virtual_terminal CUR Numbers[6]
|
| 203 |
+
#define width_status_line CUR Numbers[7]
|
| 204 |
+
#define num_labels CUR Numbers[8]
|
| 205 |
+
#define label_height CUR Numbers[9]
|
| 206 |
+
#define label_width CUR Numbers[10]
|
| 207 |
+
#define max_attributes CUR Numbers[11]
|
| 208 |
+
#define maximum_windows CUR Numbers[12]
|
| 209 |
+
#define max_colors CUR Numbers[13]
|
| 210 |
+
#define max_pairs CUR Numbers[14]
|
| 211 |
+
#define no_color_video CUR Numbers[15]
|
| 212 |
+
#define buffer_capacity CUR Numbers[16]
|
| 213 |
+
#define dot_vert_spacing CUR Numbers[17]
|
| 214 |
+
#define dot_horz_spacing CUR Numbers[18]
|
| 215 |
+
#define max_micro_address CUR Numbers[19]
|
| 216 |
+
#define max_micro_jump CUR Numbers[20]
|
| 217 |
+
#define micro_col_size CUR Numbers[21]
|
| 218 |
+
#define micro_line_size CUR Numbers[22]
|
| 219 |
+
#define number_of_pins CUR Numbers[23]
|
| 220 |
+
#define output_res_char CUR Numbers[24]
|
| 221 |
+
#define output_res_line CUR Numbers[25]
|
| 222 |
+
#define output_res_horz_inch CUR Numbers[26]
|
| 223 |
+
#define output_res_vert_inch CUR Numbers[27]
|
| 224 |
+
#define print_rate CUR Numbers[28]
|
| 225 |
+
#define wide_char_size CUR Numbers[29]
|
| 226 |
+
#define buttons CUR Numbers[30]
|
| 227 |
+
#define bit_image_entwining CUR Numbers[31]
|
| 228 |
+
#define bit_image_type CUR Numbers[32]
|
| 229 |
+
#define back_tab CUR Strings[0]
|
| 230 |
+
#define bell CUR Strings[1]
|
| 231 |
+
#define carriage_return CUR Strings[2]
|
| 232 |
+
#define change_scroll_region CUR Strings[3]
|
| 233 |
+
#define clear_all_tabs CUR Strings[4]
|
| 234 |
+
#define clear_screen CUR Strings[5]
|
| 235 |
+
#define clr_eol CUR Strings[6]
|
| 236 |
+
#define clr_eos CUR Strings[7]
|
| 237 |
+
#define column_address CUR Strings[8]
|
| 238 |
+
#define command_character CUR Strings[9]
|
| 239 |
+
#define cursor_address CUR Strings[10]
|
| 240 |
+
#define cursor_down CUR Strings[11]
|
| 241 |
+
#define cursor_home CUR Strings[12]
|
| 242 |
+
#define cursor_invisible CUR Strings[13]
|
| 243 |
+
#define cursor_left CUR Strings[14]
|
| 244 |
+
#define cursor_mem_address CUR Strings[15]
|
| 245 |
+
#define cursor_normal CUR Strings[16]
|
| 246 |
+
#define cursor_right CUR Strings[17]
|
| 247 |
+
#define cursor_to_ll CUR Strings[18]
|
| 248 |
+
#define cursor_up CUR Strings[19]
|
| 249 |
+
#define cursor_visible CUR Strings[20]
|
| 250 |
+
#define delete_character CUR Strings[21]
|
| 251 |
+
#define delete_line CUR Strings[22]
|
| 252 |
+
#define dis_status_line CUR Strings[23]
|
| 253 |
+
#define down_half_line CUR Strings[24]
|
| 254 |
+
#define enter_alt_charset_mode CUR Strings[25]
|
| 255 |
+
#define enter_blink_mode CUR Strings[26]
|
| 256 |
+
#define enter_bold_mode CUR Strings[27]
|
| 257 |
+
#define enter_ca_mode CUR Strings[28]
|
| 258 |
+
#define enter_delete_mode CUR Strings[29]
|
| 259 |
+
#define enter_dim_mode CUR Strings[30]
|
| 260 |
+
#define enter_insert_mode CUR Strings[31]
|
| 261 |
+
#define enter_secure_mode CUR Strings[32]
|
| 262 |
+
#define enter_protected_mode CUR Strings[33]
|
| 263 |
+
#define enter_reverse_mode CUR Strings[34]
|
| 264 |
+
#define enter_standout_mode CUR Strings[35]
|
| 265 |
+
#define enter_underline_mode CUR Strings[36]
|
| 266 |
+
#define erase_chars CUR Strings[37]
|
| 267 |
+
#define exit_alt_charset_mode CUR Strings[38]
|
| 268 |
+
#define exit_attribute_mode CUR Strings[39]
|
| 269 |
+
#define exit_ca_mode CUR Strings[40]
|
| 270 |
+
#define exit_delete_mode CUR Strings[41]
|
| 271 |
+
#define exit_insert_mode CUR Strings[42]
|
| 272 |
+
#define exit_standout_mode CUR Strings[43]
|
| 273 |
+
#define exit_underline_mode CUR Strings[44]
|
| 274 |
+
#define flash_screen CUR Strings[45]
|
| 275 |
+
#define form_feed CUR Strings[46]
|
| 276 |
+
#define from_status_line CUR Strings[47]
|
| 277 |
+
#define init_1string CUR Strings[48]
|
| 278 |
+
#define init_2string CUR Strings[49]
|
| 279 |
+
#define init_3string CUR Strings[50]
|
| 280 |
+
#define init_file CUR Strings[51]
|
| 281 |
+
#define insert_character CUR Strings[52]
|
| 282 |
+
#define insert_line CUR Strings[53]
|
| 283 |
+
#define insert_padding CUR Strings[54]
|
| 284 |
+
#define key_backspace CUR Strings[55]
|
| 285 |
+
#define key_catab CUR Strings[56]
|
| 286 |
+
#define key_clear CUR Strings[57]
|
| 287 |
+
#define key_ctab CUR Strings[58]
|
| 288 |
+
#define key_dc CUR Strings[59]
|
| 289 |
+
#define key_dl CUR Strings[60]
|
| 290 |
+
#define key_down CUR Strings[61]
|
| 291 |
+
#define key_eic CUR Strings[62]
|
| 292 |
+
#define key_eol CUR Strings[63]
|
| 293 |
+
#define key_eos CUR Strings[64]
|
| 294 |
+
#define key_f0 CUR Strings[65]
|
| 295 |
+
#define key_f1 CUR Strings[66]
|
| 296 |
+
#define key_f10 CUR Strings[67]
|
| 297 |
+
#define key_f2 CUR Strings[68]
|
| 298 |
+
#define key_f3 CUR Strings[69]
|
| 299 |
+
#define key_f4 CUR Strings[70]
|
| 300 |
+
#define key_f5 CUR Strings[71]
|
| 301 |
+
#define key_f6 CUR Strings[72]
|
| 302 |
+
#define key_f7 CUR Strings[73]
|
| 303 |
+
#define key_f8 CUR Strings[74]
|
| 304 |
+
#define key_f9 CUR Strings[75]
|
| 305 |
+
#define key_home CUR Strings[76]
|
| 306 |
+
#define key_ic CUR Strings[77]
|
| 307 |
+
#define key_il CUR Strings[78]
|
| 308 |
+
#define key_left CUR Strings[79]
|
| 309 |
+
#define key_ll CUR Strings[80]
|
| 310 |
+
#define key_npage CUR Strings[81]
|
| 311 |
+
#define key_ppage CUR Strings[82]
|
| 312 |
+
#define key_right CUR Strings[83]
|
| 313 |
+
#define key_sf CUR Strings[84]
|
| 314 |
+
#define key_sr CUR Strings[85]
|
| 315 |
+
#define key_stab CUR Strings[86]
|
| 316 |
+
#define key_up CUR Strings[87]
|
| 317 |
+
#define keypad_local CUR Strings[88]
|
| 318 |
+
#define keypad_xmit CUR Strings[89]
|
| 319 |
+
#define lab_f0 CUR Strings[90]
|
| 320 |
+
#define lab_f1 CUR Strings[91]
|
| 321 |
+
#define lab_f10 CUR Strings[92]
|
| 322 |
+
#define lab_f2 CUR Strings[93]
|
| 323 |
+
#define lab_f3 CUR Strings[94]
|
| 324 |
+
#define lab_f4 CUR Strings[95]
|
| 325 |
+
#define lab_f5 CUR Strings[96]
|
| 326 |
+
#define lab_f6 CUR Strings[97]
|
| 327 |
+
#define lab_f7 CUR Strings[98]
|
| 328 |
+
#define lab_f8 CUR Strings[99]
|
| 329 |
+
#define lab_f9 CUR Strings[100]
|
| 330 |
+
#define meta_off CUR Strings[101]
|
| 331 |
+
#define meta_on CUR Strings[102]
|
| 332 |
+
#define newline CUR Strings[103]
|
| 333 |
+
#define pad_char CUR Strings[104]
|
| 334 |
+
#define parm_dch CUR Strings[105]
|
| 335 |
+
#define parm_delete_line CUR Strings[106]
|
| 336 |
+
#define parm_down_cursor CUR Strings[107]
|
| 337 |
+
#define parm_ich CUR Strings[108]
|
| 338 |
+
#define parm_index CUR Strings[109]
|
| 339 |
+
#define parm_insert_line CUR Strings[110]
|
| 340 |
+
#define parm_left_cursor CUR Strings[111]
|
| 341 |
+
#define parm_right_cursor CUR Strings[112]
|
| 342 |
+
#define parm_rindex CUR Strings[113]
|
| 343 |
+
#define parm_up_cursor CUR Strings[114]
|
| 344 |
+
#define pkey_key CUR Strings[115]
|
| 345 |
+
#define pkey_local CUR Strings[116]
|
| 346 |
+
#define pkey_xmit CUR Strings[117]
|
| 347 |
+
#define print_screen CUR Strings[118]
|
| 348 |
+
#define prtr_off CUR Strings[119]
|
| 349 |
+
#define prtr_on CUR Strings[120]
|
| 350 |
+
#define repeat_char CUR Strings[121]
|
| 351 |
+
#define reset_1string CUR Strings[122]
|
| 352 |
+
#define reset_2string CUR Strings[123]
|
| 353 |
+
#define reset_3string CUR Strings[124]
|
| 354 |
+
#define reset_file CUR Strings[125]
|
| 355 |
+
#define restore_cursor CUR Strings[126]
|
| 356 |
+
#define row_address CUR Strings[127]
|
| 357 |
+
#define save_cursor CUR Strings[128]
|
| 358 |
+
#define scroll_forward CUR Strings[129]
|
| 359 |
+
#define scroll_reverse CUR Strings[130]
|
| 360 |
+
#define set_attributes CUR Strings[131]
|
| 361 |
+
#define set_tab CUR Strings[132]
|
| 362 |
+
#define set_window CUR Strings[133]
|
| 363 |
+
#define tab CUR Strings[134]
|
| 364 |
+
#define to_status_line CUR Strings[135]
|
| 365 |
+
#define underline_char CUR Strings[136]
|
| 366 |
+
#define up_half_line CUR Strings[137]
|
| 367 |
+
#define init_prog CUR Strings[138]
|
| 368 |
+
#define key_a1 CUR Strings[139]
|
| 369 |
+
#define key_a3 CUR Strings[140]
|
| 370 |
+
#define key_b2 CUR Strings[141]
|
| 371 |
+
#define key_c1 CUR Strings[142]
|
| 372 |
+
#define key_c3 CUR Strings[143]
|
| 373 |
+
#define prtr_non CUR Strings[144]
|
| 374 |
+
#define char_padding CUR Strings[145]
|
| 375 |
+
#define acs_chars CUR Strings[146]
|
| 376 |
+
#define plab_norm CUR Strings[147]
|
| 377 |
+
#define key_btab CUR Strings[148]
|
| 378 |
+
#define enter_xon_mode CUR Strings[149]
|
| 379 |
+
#define exit_xon_mode CUR Strings[150]
|
| 380 |
+
#define enter_am_mode CUR Strings[151]
|
| 381 |
+
#define exit_am_mode CUR Strings[152]
|
| 382 |
+
#define xon_character CUR Strings[153]
|
| 383 |
+
#define xoff_character CUR Strings[154]
|
| 384 |
+
#define ena_acs CUR Strings[155]
|
| 385 |
+
#define label_on CUR Strings[156]
|
| 386 |
+
#define label_off CUR Strings[157]
|
| 387 |
+
#define key_beg CUR Strings[158]
|
| 388 |
+
#define key_cancel CUR Strings[159]
|
| 389 |
+
#define key_close CUR Strings[160]
|
| 390 |
+
#define key_command CUR Strings[161]
|
| 391 |
+
#define key_copy CUR Strings[162]
|
| 392 |
+
#define key_create CUR Strings[163]
|
| 393 |
+
#define key_end CUR Strings[164]
|
| 394 |
+
#define key_enter CUR Strings[165]
|
| 395 |
+
#define key_exit CUR Strings[166]
|
| 396 |
+
#define key_find CUR Strings[167]
|
| 397 |
+
#define key_help CUR Strings[168]
|
| 398 |
+
#define key_mark CUR Strings[169]
|
| 399 |
+
#define key_message CUR Strings[170]
|
| 400 |
+
#define key_move CUR Strings[171]
|
| 401 |
+
#define key_next CUR Strings[172]
|
| 402 |
+
#define key_open CUR Strings[173]
|
| 403 |
+
#define key_options CUR Strings[174]
|
| 404 |
+
#define key_previous CUR Strings[175]
|
| 405 |
+
#define key_print CUR Strings[176]
|
| 406 |
+
#define key_redo CUR Strings[177]
|
| 407 |
+
#define key_reference CUR Strings[178]
|
| 408 |
+
#define key_refresh CUR Strings[179]
|
| 409 |
+
#define key_replace CUR Strings[180]
|
| 410 |
+
#define key_restart CUR Strings[181]
|
| 411 |
+
#define key_resume CUR Strings[182]
|
| 412 |
+
#define key_save CUR Strings[183]
|
| 413 |
+
#define key_suspend CUR Strings[184]
|
| 414 |
+
#define key_undo CUR Strings[185]
|
| 415 |
+
#define key_sbeg CUR Strings[186]
|
| 416 |
+
#define key_scancel CUR Strings[187]
|
| 417 |
+
#define key_scommand CUR Strings[188]
|
| 418 |
+
#define key_scopy CUR Strings[189]
|
| 419 |
+
#define key_screate CUR Strings[190]
|
| 420 |
+
#define key_sdc CUR Strings[191]
|
| 421 |
+
#define key_sdl CUR Strings[192]
|
| 422 |
+
#define key_select CUR Strings[193]
|
| 423 |
+
#define key_send CUR Strings[194]
|
| 424 |
+
#define key_seol CUR Strings[195]
|
| 425 |
+
#define key_sexit CUR Strings[196]
|
| 426 |
+
#define key_sfind CUR Strings[197]
|
| 427 |
+
#define key_shelp CUR Strings[198]
|
| 428 |
+
#define key_shome CUR Strings[199]
|
| 429 |
+
#define key_sic CUR Strings[200]
|
| 430 |
+
#define key_sleft CUR Strings[201]
|
| 431 |
+
#define key_smessage CUR Strings[202]
|
| 432 |
+
#define key_smove CUR Strings[203]
|
| 433 |
+
#define key_snext CUR Strings[204]
|
| 434 |
+
#define key_soptions CUR Strings[205]
|
| 435 |
+
#define key_sprevious CUR Strings[206]
|
| 436 |
+
#define key_sprint CUR Strings[207]
|
| 437 |
+
#define key_sredo CUR Strings[208]
|
| 438 |
+
#define key_sreplace CUR Strings[209]
|
| 439 |
+
#define key_sright CUR Strings[210]
|
| 440 |
+
#define key_srsume CUR Strings[211]
|
| 441 |
+
#define key_ssave CUR Strings[212]
|
| 442 |
+
#define key_ssuspend CUR Strings[213]
|
| 443 |
+
#define key_sundo CUR Strings[214]
|
| 444 |
+
#define req_for_input CUR Strings[215]
|
| 445 |
+
#define key_f11 CUR Strings[216]
|
| 446 |
+
#define key_f12 CUR Strings[217]
|
| 447 |
+
#define key_f13 CUR Strings[218]
|
| 448 |
+
#define key_f14 CUR Strings[219]
|
| 449 |
+
#define key_f15 CUR Strings[220]
|
| 450 |
+
#define key_f16 CUR Strings[221]
|
| 451 |
+
#define key_f17 CUR Strings[222]
|
| 452 |
+
#define key_f18 CUR Strings[223]
|
| 453 |
+
#define key_f19 CUR Strings[224]
|
| 454 |
+
#define key_f20 CUR Strings[225]
|
| 455 |
+
#define key_f21 CUR Strings[226]
|
| 456 |
+
#define key_f22 CUR Strings[227]
|
| 457 |
+
#define key_f23 CUR Strings[228]
|
| 458 |
+
#define key_f24 CUR Strings[229]
|
| 459 |
+
#define key_f25 CUR Strings[230]
|
| 460 |
+
#define key_f26 CUR Strings[231]
|
| 461 |
+
#define key_f27 CUR Strings[232]
|
| 462 |
+
#define key_f28 CUR Strings[233]
|
| 463 |
+
#define key_f29 CUR Strings[234]
|
| 464 |
+
#define key_f30 CUR Strings[235]
|
| 465 |
+
#define key_f31 CUR Strings[236]
|
| 466 |
+
#define key_f32 CUR Strings[237]
|
| 467 |
+
#define key_f33 CUR Strings[238]
|
| 468 |
+
#define key_f34 CUR Strings[239]
|
| 469 |
+
#define key_f35 CUR Strings[240]
|
| 470 |
+
#define key_f36 CUR Strings[241]
|
| 471 |
+
#define key_f37 CUR Strings[242]
|
| 472 |
+
#define key_f38 CUR Strings[243]
|
| 473 |
+
#define key_f39 CUR Strings[244]
|
| 474 |
+
#define key_f40 CUR Strings[245]
|
| 475 |
+
#define key_f41 CUR Strings[246]
|
| 476 |
+
#define key_f42 CUR Strings[247]
|
| 477 |
+
#define key_f43 CUR Strings[248]
|
| 478 |
+
#define key_f44 CUR Strings[249]
|
| 479 |
+
#define key_f45 CUR Strings[250]
|
| 480 |
+
#define key_f46 CUR Strings[251]
|
| 481 |
+
#define key_f47 CUR Strings[252]
|
| 482 |
+
#define key_f48 CUR Strings[253]
|
| 483 |
+
#define key_f49 CUR Strings[254]
|
| 484 |
+
#define key_f50 CUR Strings[255]
|
| 485 |
+
#define key_f51 CUR Strings[256]
|
| 486 |
+
#define key_f52 CUR Strings[257]
|
| 487 |
+
#define key_f53 CUR Strings[258]
|
| 488 |
+
#define key_f54 CUR Strings[259]
|
| 489 |
+
#define key_f55 CUR Strings[260]
|
| 490 |
+
#define key_f56 CUR Strings[261]
|
| 491 |
+
#define key_f57 CUR Strings[262]
|
| 492 |
+
#define key_f58 CUR Strings[263]
|
| 493 |
+
#define key_f59 CUR Strings[264]
|
| 494 |
+
#define key_f60 CUR Strings[265]
|
| 495 |
+
#define key_f61 CUR Strings[266]
|
| 496 |
+
#define key_f62 CUR Strings[267]
|
| 497 |
+
#define key_f63 CUR Strings[268]
|
| 498 |
+
#define clr_bol CUR Strings[269]
|
| 499 |
+
#define clear_margins CUR Strings[270]
|
| 500 |
+
#define set_left_margin CUR Strings[271]
|
| 501 |
+
#define set_right_margin CUR Strings[272]
|
| 502 |
+
#define label_format CUR Strings[273]
|
| 503 |
+
#define set_clock CUR Strings[274]
|
| 504 |
+
#define display_clock CUR Strings[275]
|
| 505 |
+
#define remove_clock CUR Strings[276]
|
| 506 |
+
#define create_window CUR Strings[277]
|
| 507 |
+
#define goto_window CUR Strings[278]
|
| 508 |
+
#define hangup CUR Strings[279]
|
| 509 |
+
#define dial_phone CUR Strings[280]
|
| 510 |
+
#define quick_dial CUR Strings[281]
|
| 511 |
+
#define tone CUR Strings[282]
|
| 512 |
+
#define pulse CUR Strings[283]
|
| 513 |
+
#define flash_hook CUR Strings[284]
|
| 514 |
+
#define fixed_pause CUR Strings[285]
|
| 515 |
+
#define wait_tone CUR Strings[286]
|
| 516 |
+
#define user0 CUR Strings[287]
|
| 517 |
+
#define user1 CUR Strings[288]
|
| 518 |
+
#define user2 CUR Strings[289]
|
| 519 |
+
#define user3 CUR Strings[290]
|
| 520 |
+
#define user4 CUR Strings[291]
|
| 521 |
+
#define user5 CUR Strings[292]
|
| 522 |
+
#define user6 CUR Strings[293]
|
| 523 |
+
#define user7 CUR Strings[294]
|
| 524 |
+
#define user8 CUR Strings[295]
|
| 525 |
+
#define user9 CUR Strings[296]
|
| 526 |
+
#define orig_pair CUR Strings[297]
|
| 527 |
+
#define orig_colors CUR Strings[298]
|
| 528 |
+
#define initialize_color CUR Strings[299]
|
| 529 |
+
#define initialize_pair CUR Strings[300]
|
| 530 |
+
#define set_color_pair CUR Strings[301]
|
| 531 |
+
#define set_foreground CUR Strings[302]
|
| 532 |
+
#define set_background CUR Strings[303]
|
| 533 |
+
#define change_char_pitch CUR Strings[304]
|
| 534 |
+
#define change_line_pitch CUR Strings[305]
|
| 535 |
+
#define change_res_horz CUR Strings[306]
|
| 536 |
+
#define change_res_vert CUR Strings[307]
|
| 537 |
+
#define define_char CUR Strings[308]
|
| 538 |
+
#define enter_doublewide_mode CUR Strings[309]
|
| 539 |
+
#define enter_draft_quality CUR Strings[310]
|
| 540 |
+
#define enter_italics_mode CUR Strings[311]
|
| 541 |
+
#define enter_leftward_mode CUR Strings[312]
|
| 542 |
+
#define enter_micro_mode CUR Strings[313]
|
| 543 |
+
#define enter_near_letter_quality CUR Strings[314]
|
| 544 |
+
#define enter_normal_quality CUR Strings[315]
|
| 545 |
+
#define enter_shadow_mode CUR Strings[316]
|
| 546 |
+
#define enter_subscript_mode CUR Strings[317]
|
| 547 |
+
#define enter_superscript_mode CUR Strings[318]
|
| 548 |
+
#define enter_upward_mode CUR Strings[319]
|
| 549 |
+
#define exit_doublewide_mode CUR Strings[320]
|
| 550 |
+
#define exit_italics_mode CUR Strings[321]
|
| 551 |
+
#define exit_leftward_mode CUR Strings[322]
|
| 552 |
+
#define exit_micro_mode CUR Strings[323]
|
| 553 |
+
#define exit_shadow_mode CUR Strings[324]
|
| 554 |
+
#define exit_subscript_mode CUR Strings[325]
|
| 555 |
+
#define exit_superscript_mode CUR Strings[326]
|
| 556 |
+
#define exit_upward_mode CUR Strings[327]
|
| 557 |
+
#define micro_column_address CUR Strings[328]
|
| 558 |
+
#define micro_down CUR Strings[329]
|
| 559 |
+
#define micro_left CUR Strings[330]
|
| 560 |
+
#define micro_right CUR Strings[331]
|
| 561 |
+
#define micro_row_address CUR Strings[332]
|
| 562 |
+
#define micro_up CUR Strings[333]
|
| 563 |
+
#define order_of_pins CUR Strings[334]
|
| 564 |
+
#define parm_down_micro CUR Strings[335]
|
| 565 |
+
#define parm_left_micro CUR Strings[336]
|
| 566 |
+
#define parm_right_micro CUR Strings[337]
|
| 567 |
+
#define parm_up_micro CUR Strings[338]
|
| 568 |
+
#define select_char_set CUR Strings[339]
|
| 569 |
+
#define set_bottom_margin CUR Strings[340]
|
| 570 |
+
#define set_bottom_margin_parm CUR Strings[341]
|
| 571 |
+
#define set_left_margin_parm CUR Strings[342]
|
| 572 |
+
#define set_right_margin_parm CUR Strings[343]
|
| 573 |
+
#define set_top_margin CUR Strings[344]
|
| 574 |
+
#define set_top_margin_parm CUR Strings[345]
|
| 575 |
+
#define start_bit_image CUR Strings[346]
|
| 576 |
+
#define start_char_set_def CUR Strings[347]
|
| 577 |
+
#define stop_bit_image CUR Strings[348]
|
| 578 |
+
#define stop_char_set_def CUR Strings[349]
|
| 579 |
+
#define subscript_characters CUR Strings[350]
|
| 580 |
+
#define superscript_characters CUR Strings[351]
|
| 581 |
+
#define these_cause_cr CUR Strings[352]
|
| 582 |
+
#define zero_motion CUR Strings[353]
|
| 583 |
+
#define char_set_names CUR Strings[354]
|
| 584 |
+
#define key_mouse CUR Strings[355]
|
| 585 |
+
#define mouse_info CUR Strings[356]
|
| 586 |
+
#define req_mouse_pos CUR Strings[357]
|
| 587 |
+
#define get_mouse CUR Strings[358]
|
| 588 |
+
#define set_a_foreground CUR Strings[359]
|
| 589 |
+
#define set_a_background CUR Strings[360]
|
| 590 |
+
#define pkey_plab CUR Strings[361]
|
| 591 |
+
#define device_type CUR Strings[362]
|
| 592 |
+
#define code_set_init CUR Strings[363]
|
| 593 |
+
#define set0_des_seq CUR Strings[364]
|
| 594 |
+
#define set1_des_seq CUR Strings[365]
|
| 595 |
+
#define set2_des_seq CUR Strings[366]
|
| 596 |
+
#define set3_des_seq CUR Strings[367]
|
| 597 |
+
#define set_lr_margin CUR Strings[368]
|
| 598 |
+
#define set_tb_margin CUR Strings[369]
|
| 599 |
+
#define bit_image_repeat CUR Strings[370]
|
| 600 |
+
#define bit_image_newline CUR Strings[371]
|
| 601 |
+
#define bit_image_carriage_return CUR Strings[372]
|
| 602 |
+
#define color_names CUR Strings[373]
|
| 603 |
+
#define define_bit_image_region CUR Strings[374]
|
| 604 |
+
#define end_bit_image_region CUR Strings[375]
|
| 605 |
+
#define set_color_band CUR Strings[376]
|
| 606 |
+
#define set_page_length CUR Strings[377]
|
| 607 |
+
#define display_pc_char CUR Strings[378]
|
| 608 |
+
#define enter_pc_charset_mode CUR Strings[379]
|
| 609 |
+
#define exit_pc_charset_mode CUR Strings[380]
|
| 610 |
+
#define enter_scancode_mode CUR Strings[381]
|
| 611 |
+
#define exit_scancode_mode CUR Strings[382]
|
| 612 |
+
#define pc_term_options CUR Strings[383]
|
| 613 |
+
#define scancode_escape CUR Strings[384]
|
| 614 |
+
#define alt_scancode_esc CUR Strings[385]
|
| 615 |
+
#define enter_horizontal_hl_mode CUR Strings[386]
|
| 616 |
+
#define enter_left_hl_mode CUR Strings[387]
|
| 617 |
+
#define enter_low_hl_mode CUR Strings[388]
|
| 618 |
+
#define enter_right_hl_mode CUR Strings[389]
|
| 619 |
+
#define enter_top_hl_mode CUR Strings[390]
|
| 620 |
+
#define enter_vertical_hl_mode CUR Strings[391]
|
| 621 |
+
#define set_a_attributes CUR Strings[392]
|
| 622 |
+
#define set_pglen_inch CUR Strings[393]
|
| 623 |
+
|
| 624 |
+
#define BOOLWRITE 37
|
| 625 |
+
#define NUMWRITE 33
|
| 626 |
+
#define STRWRITE 394
|
| 627 |
+
|
| 628 |
+
/* older synonyms for some capabilities */
|
| 629 |
+
#define beehive_glitch no_esc_ctlc
|
| 630 |
+
#define teleray_glitch dest_tabs_magic_smso
|
| 631 |
+
|
| 632 |
+
/* HPUX-11 uses this name rather than the standard one */
|
| 633 |
+
#ifndef micro_char_size
|
| 634 |
+
#define micro_char_size micro_col_size
|
| 635 |
+
#endif
|
| 636 |
+
|
| 637 |
+
#ifdef __INTERNAL_CAPS_VISIBLE
|
| 638 |
+
#define termcap_init2 CUR Strings[394]
|
| 639 |
+
#define termcap_reset CUR Strings[395]
|
| 640 |
+
#define magic_cookie_glitch_ul CUR Numbers[33]
|
| 641 |
+
#define backspaces_with_bs CUR Booleans[37]
|
| 642 |
+
#define crt_no_scrolling CUR Booleans[38]
|
| 643 |
+
#define no_correctly_working_cr CUR Booleans[39]
|
| 644 |
+
#define carriage_return_delay CUR Numbers[34]
|
| 645 |
+
#define new_line_delay CUR Numbers[35]
|
| 646 |
+
#define linefeed_if_not_lf CUR Strings[396]
|
| 647 |
+
#define backspace_if_not_bs CUR Strings[397]
|
| 648 |
+
#define gnu_has_meta_key CUR Booleans[40]
|
| 649 |
+
#define linefeed_is_newline CUR Booleans[41]
|
| 650 |
+
#define backspace_delay CUR Numbers[36]
|
| 651 |
+
#define horizontal_tab_delay CUR Numbers[37]
|
| 652 |
+
#define number_of_function_keys CUR Numbers[38]
|
| 653 |
+
#define other_non_function_keys CUR Strings[398]
|
| 654 |
+
#define arrow_key_map CUR Strings[399]
|
| 655 |
+
#define has_hardware_tabs CUR Booleans[42]
|
| 656 |
+
#define return_does_clr_eol CUR Booleans[43]
|
| 657 |
+
#define acs_ulcorner CUR Strings[400]
|
| 658 |
+
#define acs_llcorner CUR Strings[401]
|
| 659 |
+
#define acs_urcorner CUR Strings[402]
|
| 660 |
+
#define acs_lrcorner CUR Strings[403]
|
| 661 |
+
#define acs_ltee CUR Strings[404]
|
| 662 |
+
#define acs_rtee CUR Strings[405]
|
| 663 |
+
#define acs_btee CUR Strings[406]
|
| 664 |
+
#define acs_ttee CUR Strings[407]
|
| 665 |
+
#define acs_hline CUR Strings[408]
|
| 666 |
+
#define acs_vline CUR Strings[409]
|
| 667 |
+
#define acs_plus CUR Strings[410]
|
| 668 |
+
#define memory_lock CUR Strings[411]
|
| 669 |
+
#define memory_unlock CUR Strings[412]
|
| 670 |
+
#define box_chars_1 CUR Strings[413]
|
| 671 |
+
#endif /* __INTERNAL_CAPS_VISIBLE */
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
/*
|
| 675 |
+
* Predefined terminfo array sizes
|
| 676 |
+
*/
|
| 677 |
+
#define BOOLCOUNT 44
|
| 678 |
+
#define NUMCOUNT 39
|
| 679 |
+
#define STRCOUNT 414
|
| 680 |
+
|
| 681 |
+
/* used by code for comparing entries */
|
| 682 |
+
#define acs_chars_index 146
|
| 683 |
+
|
| 684 |
+
typedef struct termtype { /* in-core form of terminfo data */
|
| 685 |
+
char *term_names; /* str_table offset of term names */
|
| 686 |
+
char *str_table; /* pointer to string table */
|
| 687 |
+
NCURSES_SBOOL *Booleans; /* array of boolean values */
|
| 688 |
+
short *Numbers; /* array of integer values */
|
| 689 |
+
char **Strings; /* array of string offsets */
|
| 690 |
+
|
| 691 |
+
#if NCURSES_XNAMES
|
| 692 |
+
char *ext_str_table; /* pointer to extended string table */
|
| 693 |
+
char **ext_Names; /* corresponding names */
|
| 694 |
+
|
| 695 |
+
unsigned short num_Booleans;/* count total Booleans */
|
| 696 |
+
unsigned short num_Numbers; /* count total Numbers */
|
| 697 |
+
unsigned short num_Strings; /* count total Strings */
|
| 698 |
+
|
| 699 |
+
unsigned short ext_Booleans;/* count extensions to Booleans */
|
| 700 |
+
unsigned short ext_Numbers; /* count extensions to Numbers */
|
| 701 |
+
unsigned short ext_Strings; /* count extensions to Strings */
|
| 702 |
+
#endif /* NCURSES_XNAMES */
|
| 703 |
+
|
| 704 |
+
} TERMTYPE;
|
| 705 |
+
|
| 706 |
+
/*
|
| 707 |
+
* The only reason these structures are visible is for read-only use.
|
| 708 |
+
* Programs which modify the data are not, never were, portable across
|
| 709 |
+
* curses implementations.
|
| 710 |
+
*
|
| 711 |
+
* The first field in TERMINAL is used in macros.
|
| 712 |
+
* The remaining fields are private.
|
| 713 |
+
*/
|
| 714 |
+
#ifdef NCURSES_INTERNALS
|
| 715 |
+
|
| 716 |
+
#undef TERMINAL
|
| 717 |
+
#define TERMINAL struct term
|
| 718 |
+
TERMINAL;
|
| 719 |
+
|
| 720 |
+
typedef struct termtype2 { /* in-core form of terminfo data */
|
| 721 |
+
char *term_names; /* str_table offset of term names */
|
| 722 |
+
char *str_table; /* pointer to string table */
|
| 723 |
+
NCURSES_SBOOL *Booleans; /* array of boolean values */
|
| 724 |
+
int *Numbers; /* array of integer values */
|
| 725 |
+
char **Strings; /* array of string offsets */
|
| 726 |
+
|
| 727 |
+
#if NCURSES_XNAMES
|
| 728 |
+
char *ext_str_table; /* pointer to extended string table */
|
| 729 |
+
char **ext_Names; /* corresponding names */
|
| 730 |
+
|
| 731 |
+
unsigned short num_Booleans;/* count total Booleans */
|
| 732 |
+
unsigned short num_Numbers; /* count total Numbers */
|
| 733 |
+
unsigned short num_Strings; /* count total Strings */
|
| 734 |
+
|
| 735 |
+
unsigned short ext_Booleans;/* count extensions to Booleans */
|
| 736 |
+
unsigned short ext_Numbers; /* count extensions to Numbers */
|
| 737 |
+
unsigned short ext_Strings; /* count extensions to Strings */
|
| 738 |
+
#endif /* NCURSES_XNAMES */
|
| 739 |
+
|
| 740 |
+
} TERMTYPE2;
|
| 741 |
+
#else
|
| 742 |
+
|
| 743 |
+
typedef struct term { /* describe an actual terminal */
|
| 744 |
+
TERMTYPE type; /* terminal type description */
|
| 745 |
+
} TERMINAL;
|
| 746 |
+
|
| 747 |
+
#endif /* NCURSES_INTERNALS */
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
#if 0 && !0
|
| 751 |
+
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
|
| 752 |
+
#elif 0
|
| 753 |
+
NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);
|
| 754 |
+
#define cur_term NCURSES_PUBLIC_VAR(cur_term())
|
| 755 |
+
#else
|
| 756 |
+
extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
|
| 757 |
+
#endif
|
| 758 |
+
|
| 759 |
+
#if 0 || 0
|
| 760 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);
|
| 761 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);
|
| 762 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);
|
| 763 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);
|
| 764 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);
|
| 765 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);
|
| 766 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);
|
| 767 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);
|
| 768 |
+
NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);
|
| 769 |
+
|
| 770 |
+
#define boolnames NCURSES_PUBLIC_VAR(boolnames())
|
| 771 |
+
#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())
|
| 772 |
+
#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())
|
| 773 |
+
#define numnames NCURSES_PUBLIC_VAR(numnames())
|
| 774 |
+
#define numcodes NCURSES_PUBLIC_VAR(numcodes())
|
| 775 |
+
#define numfnames NCURSES_PUBLIC_VAR(numfnames())
|
| 776 |
+
#define strnames NCURSES_PUBLIC_VAR(strnames())
|
| 777 |
+
#define strcodes NCURSES_PUBLIC_VAR(strcodes())
|
| 778 |
+
#define strfnames NCURSES_PUBLIC_VAR(strfnames())
|
| 779 |
+
|
| 780 |
+
#else
|
| 781 |
+
|
| 782 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
|
| 783 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
|
| 784 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
|
| 785 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
|
| 786 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
|
| 787 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
|
| 788 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
|
| 789 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
|
| 790 |
+
extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
|
| 791 |
+
|
| 792 |
+
#endif
|
| 793 |
+
|
| 794 |
+
/*
|
| 795 |
+
* These entrypoints are used only by the ncurses utilities such as tic.
|
| 796 |
+
*/
|
| 797 |
+
#ifdef NCURSES_INTERNALS
|
| 798 |
+
|
| 799 |
+
extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);
|
| 800 |
+
extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const);
|
| 801 |
+
extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *);
|
| 802 |
+
extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);
|
| 803 |
+
extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);
|
| 804 |
+
extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);
|
| 805 |
+
extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);
|
| 806 |
+
extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);
|
| 807 |
+
extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);
|
| 808 |
+
|
| 809 |
+
#endif /* NCURSES_INTERNALS */
|
| 810 |
+
|
| 811 |
+
/*
|
| 812 |
+
* Normal entry points
|
| 813 |
+
*/
|
| 814 |
+
extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);
|
| 815 |
+
extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);
|
| 816 |
+
|
| 817 |
+
/* miscellaneous entry points */
|
| 818 |
+
extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);
|
| 819 |
+
extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);
|
| 820 |
+
|
| 821 |
+
/* terminfo entry points, also declared in curses.h */
|
| 822 |
+
#if !defined(__NCURSES_H)
|
| 823 |
+
extern NCURSES_EXPORT(char *) tigetstr (const char *);
|
| 824 |
+
extern NCURSES_EXPORT_VAR(char) ttytype[];
|
| 825 |
+
extern NCURSES_EXPORT(int) putp (const char *);
|
| 826 |
+
extern NCURSES_EXPORT(int) tigetflag (const char *);
|
| 827 |
+
extern NCURSES_EXPORT(int) tigetnum (const char *);
|
| 828 |
+
|
| 829 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 830 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
|
| 831 |
+
#else
|
| 832 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 833 |
+
#endif
|
| 834 |
+
|
| 835 |
+
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
|
| 836 |
+
extern NCURSES_EXPORT(char *) tiparm_s (int, int, const char *, ...); /* special */
|
| 837 |
+
extern NCURSES_EXPORT(int) tiscan_s (int *, int *, const char *); /* special */
|
| 838 |
+
|
| 839 |
+
#endif /* __NCURSES_H */
|
| 840 |
+
|
| 841 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 842 |
+
#if !defined(NCURSES_TERMCAP_H_incl)
|
| 843 |
+
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
|
| 844 |
+
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
| 845 |
+
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
| 846 |
+
extern NCURSES_EXPORT(int) tgetflag (const char *);
|
| 847 |
+
extern NCURSES_EXPORT(int) tgetnum (const char *);
|
| 848 |
+
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
| 849 |
+
#endif /* NCURSES_TERMCAP_H_incl */
|
| 850 |
+
|
| 851 |
+
/*
|
| 852 |
+
* Include curses.h before term.h to enable these extensions.
|
| 853 |
+
*/
|
| 854 |
+
#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)
|
| 855 |
+
|
| 856 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);
|
| 857 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);
|
| 858 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);
|
| 859 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);
|
| 860 |
+
|
| 861 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 862 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */
|
| 863 |
+
#else
|
| 864 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 865 |
+
#endif
|
| 866 |
+
|
| 867 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 868 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);
|
| 869 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);
|
| 870 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);
|
| 871 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);
|
| 872 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);
|
| 873 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);
|
| 874 |
+
|
| 875 |
+
extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);
|
| 876 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);
|
| 877 |
+
|
| 878 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);
|
| 879 |
+
#endif /* NCURSES_SP_FUNCS */
|
| 880 |
+
|
| 881 |
+
/*
|
| 882 |
+
* Debugging features.
|
| 883 |
+
*/
|
| 884 |
+
extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);
|
| 885 |
+
|
| 886 |
+
#ifdef __cplusplus
|
| 887 |
+
}
|
| 888 |
+
#endif
|
| 889 |
+
|
| 890 |
+
#endif /* NCURSES_TERM_H_incl */
|
data/miniconda3/include/ncursesw/term_entry.h
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2022,2023 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2015,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
* and: Thomas E. Dickey 1998-on *
|
| 34 |
+
****************************************************************************/
|
| 35 |
+
|
| 36 |
+
/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
* term_entry.h -- interface to entry-manipulation code
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
#ifndef NCURSES_TERM_ENTRY_H_incl
|
| 43 |
+
#define NCURSES_TERM_ENTRY_H_incl 1
|
| 44 |
+
/* *INDENT-OFF* */
|
| 45 |
+
|
| 46 |
+
#ifdef __cplusplus
|
| 47 |
+
extern "C" {
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
#include <ncursesw/curses.h>
|
| 51 |
+
#include <ncursesw/term.h>
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* These macros may be used by programs that know about TERMTYPE:
|
| 55 |
+
*/
|
| 56 |
+
#if NCURSES_XNAMES
|
| 57 |
+
#define NUM_BOOLEANS(tp) (tp)->num_Booleans
|
| 58 |
+
#define NUM_NUMBERS(tp) (tp)->num_Numbers
|
| 59 |
+
#define NUM_STRINGS(tp) (tp)->num_Strings
|
| 60 |
+
#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i]
|
| 61 |
+
#else
|
| 62 |
+
#define NUM_BOOLEANS(tp) BOOLCOUNT
|
| 63 |
+
#define NUM_NUMBERS(tp) NUMCOUNT
|
| 64 |
+
#define NUM_STRINGS(tp) STRCOUNT
|
| 65 |
+
#define EXT_NAMES(tp,i,limit,index,table) table[i]
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
|
| 69 |
+
|
| 70 |
+
#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
|
| 71 |
+
#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
|
| 72 |
+
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
|
| 73 |
+
|
| 74 |
+
#if NCURSES_XNAMES
|
| 75 |
+
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; (int) n < (int) NUM_BOOLEANS(tp); n++)
|
| 76 |
+
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; (int) n < (int) NUM_NUMBERS(tp); n++)
|
| 77 |
+
#define for_each_ext_string(n,tp) for(n = STRCOUNT; (int) n < (int) NUM_STRINGS(tp); n++)
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
|
| 81 |
+
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
|
| 82 |
+
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
|
| 83 |
+
|
| 84 |
+
/*
|
| 85 |
+
* The remaining type-definitions and macros are used only internally by the
|
| 86 |
+
* ncurses utilities.
|
| 87 |
+
*/
|
| 88 |
+
#ifdef NCURSES_INTERNALS
|
| 89 |
+
|
| 90 |
+
/*
|
| 91 |
+
* see db_iterator.c - this enumeration lists the places searched for a
|
| 92 |
+
* terminal description and defines the order in which they are searched.
|
| 93 |
+
*/
|
| 94 |
+
typedef enum {
|
| 95 |
+
dbdTIC = 0, /* special, used by tic when writing entry */
|
| 96 |
+
#if NCURSES_USE_DATABASE
|
| 97 |
+
dbdEnvOnce, /* the $TERMINFO environment variable */
|
| 98 |
+
dbdHome, /* $HOME/.terminfo */
|
| 99 |
+
dbdEnvList, /* the $TERMINFO_DIRS environment variable */
|
| 100 |
+
dbdCfgList, /* the compiled-in TERMINFO_DIRS value */
|
| 101 |
+
dbdCfgOnce, /* the compiled-in TERMINFO value */
|
| 102 |
+
#endif
|
| 103 |
+
#if NCURSES_USE_TERMCAP
|
| 104 |
+
dbdEnvOnce2, /* the $TERMCAP environment variable */
|
| 105 |
+
dbdEnvList2, /* the $TERMPATH environment variable */
|
| 106 |
+
dbdCfgList2, /* the compiled-in TERMPATH */
|
| 107 |
+
#endif
|
| 108 |
+
dbdLAST
|
| 109 |
+
} DBDIRS;
|
| 110 |
+
|
| 111 |
+
#define MAX_USES 32
|
| 112 |
+
#define MAX_CROSSLINKS 16
|
| 113 |
+
|
| 114 |
+
typedef struct entry ENTRY;
|
| 115 |
+
|
| 116 |
+
typedef struct {
|
| 117 |
+
char *name;
|
| 118 |
+
ENTRY *link;
|
| 119 |
+
long line;
|
| 120 |
+
} ENTRY_USES;
|
| 121 |
+
|
| 122 |
+
struct entry {
|
| 123 |
+
TERMTYPE2 tterm;
|
| 124 |
+
unsigned nuses;
|
| 125 |
+
ENTRY_USES uses[MAX_USES];
|
| 126 |
+
int ncrosslinks;
|
| 127 |
+
ENTRY *crosslinks[MAX_CROSSLINKS];
|
| 128 |
+
long cstart;
|
| 129 |
+
long cend;
|
| 130 |
+
long startline;
|
| 131 |
+
ENTRY *next;
|
| 132 |
+
ENTRY *last;
|
| 133 |
+
};
|
| 134 |
+
|
| 135 |
+
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
|
| 136 |
+
extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
|
| 137 |
+
#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
|
| 138 |
+
#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next)
|
| 139 |
+
|
| 140 |
+
#define MAX_LINE 132
|
| 141 |
+
|
| 142 |
+
#define NULLHOOK (bool(*)(ENTRY *))0
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Note that WANTED and PRESENT are not simple inverses! If a capability
|
| 146 |
+
* has been explicitly cancelled, it is not considered WANTED.
|
| 147 |
+
*/
|
| 148 |
+
#define WANTED(s) ((s) == ABSENT_STRING)
|
| 149 |
+
#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
|
| 150 |
+
|
| 151 |
+
#define ANDMISSING(p,q) \
|
| 152 |
+
{ \
|
| 153 |
+
if (PRESENT(p) && !PRESENT(q)) \
|
| 154 |
+
_nc_warning(#p " but no " #q); \
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
#define PAIRED(p,q) \
|
| 158 |
+
{ \
|
| 159 |
+
if (PRESENT(q) && !PRESENT(p)) \
|
| 160 |
+
_nc_warning(#q " but no " #p); \
|
| 161 |
+
if (PRESENT(p) && !PRESENT(q)) \
|
| 162 |
+
_nc_warning(#p " but no " #q); \
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/*
|
| 166 |
+
* These entrypoints are used only by the ncurses utilities such as tic.
|
| 167 |
+
*/
|
| 168 |
+
|
| 169 |
+
/* alloc_entry.c: elementary allocation code */
|
| 170 |
+
extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
|
| 171 |
+
extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
|
| 172 |
+
extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
|
| 173 |
+
extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
|
| 174 |
+
extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
|
| 175 |
+
|
| 176 |
+
/* alloc_ttype.c: elementary allocation code */
|
| 177 |
+
extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
|
| 178 |
+
|
| 179 |
+
/* free_ttype.c: elementary allocation code */
|
| 180 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
|
| 181 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
|
| 182 |
+
extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
|
| 183 |
+
|
| 184 |
+
/* lib_termcap.c: trim sgr0 string for termcap users */
|
| 185 |
+
extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
|
| 186 |
+
|
| 187 |
+
/* parse_entry.c: entry-parsing code */
|
| 188 |
+
#if NCURSES_XNAMES
|
| 189 |
+
extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
|
| 190 |
+
extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
|
| 191 |
+
#endif
|
| 192 |
+
extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
|
| 193 |
+
extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
|
| 194 |
+
|
| 195 |
+
/* write_entry.c: writing an entry to the file system */
|
| 196 |
+
extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
|
| 197 |
+
extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
|
| 198 |
+
extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
|
| 199 |
+
|
| 200 |
+
/* comp_parse.c: entry list handling */
|
| 201 |
+
extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
|
| 202 |
+
extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
|
| 203 |
+
extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
|
| 204 |
+
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
|
| 205 |
+
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
|
| 206 |
+
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
|
| 207 |
+
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool);
|
| 208 |
+
|
| 209 |
+
/* trace_xnames.c */
|
| 210 |
+
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
|
| 211 |
+
|
| 212 |
+
#endif /* NCURSES_INTERNALS */
|
| 213 |
+
|
| 214 |
+
#ifdef __cplusplus
|
| 215 |
+
}
|
| 216 |
+
#endif
|
| 217 |
+
|
| 218 |
+
/* *INDENT-ON* */
|
| 219 |
+
|
| 220 |
+
#endif /* NCURSES_TERM_ENTRY_H_incl */
|
data/miniconda3/include/ncursesw/termcap.h
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2020,2021 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2000,2001 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
/* $Id: termcap.h.in,v 1.20 2021/06/17 21:26:02 tom Exp $ */
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_TERMCAP_H_incl
|
| 38 |
+
#define NCURSES_TERMCAP_H_incl 1
|
| 39 |
+
|
| 40 |
+
#undef NCURSES_VERSION
|
| 41 |
+
#define NCURSES_VERSION "6.5"
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/ncurses_dll.h>
|
| 44 |
+
|
| 45 |
+
#ifdef __cplusplus
|
| 46 |
+
extern "C"
|
| 47 |
+
{
|
| 48 |
+
#endif /* __cplusplus */
|
| 49 |
+
|
| 50 |
+
#include <sys/types.h>
|
| 51 |
+
|
| 52 |
+
#undef NCURSES_OSPEED
|
| 53 |
+
#define NCURSES_OSPEED short
|
| 54 |
+
|
| 55 |
+
extern NCURSES_EXPORT_VAR(char) PC;
|
| 56 |
+
extern NCURSES_EXPORT_VAR(char *) UP;
|
| 57 |
+
extern NCURSES_EXPORT_VAR(char *) BC;
|
| 58 |
+
extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
|
| 59 |
+
|
| 60 |
+
#if !defined(NCURSES_TERM_H_incl)
|
| 61 |
+
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
|
| 62 |
+
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
| 63 |
+
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
| 64 |
+
extern NCURSES_EXPORT(int) tgetflag (const char *);
|
| 65 |
+
extern NCURSES_EXPORT(int) tgetnum (const char *);
|
| 66 |
+
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
| 67 |
+
#endif
|
| 68 |
+
|
| 69 |
+
#ifdef __cplusplus
|
| 70 |
+
}
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#endif /* NCURSES_TERMCAP_H_incl */
|
data/miniconda3/include/ncursesw/unctrl.h
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2001,2009 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
|
| 32 |
+
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* unctrl.h
|
| 37 |
+
*
|
| 38 |
+
* Display a printable version of a control character.
|
| 39 |
+
* Control characters are displayed in caret notation (^x), DELETE is displayed
|
| 40 |
+
* as ^?. Printable characters are displayed as is.
|
| 41 |
+
*/
|
| 42 |
+
|
| 43 |
+
/* $Id: unctrl.h.in,v 1.12 2020/02/02 23:34:34 tom Exp $ */
|
| 44 |
+
|
| 45 |
+
#ifndef NCURSES_UNCTRL_H_incl
|
| 46 |
+
#define NCURSES_UNCTRL_H_incl 1
|
| 47 |
+
|
| 48 |
+
#undef NCURSES_VERSION
|
| 49 |
+
#define NCURSES_VERSION "6.5"
|
| 50 |
+
|
| 51 |
+
#ifdef __cplusplus
|
| 52 |
+
extern "C" {
|
| 53 |
+
#endif
|
| 54 |
+
|
| 55 |
+
#include <ncursesw/curses.h>
|
| 56 |
+
|
| 57 |
+
#undef unctrl
|
| 58 |
+
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
|
| 59 |
+
|
| 60 |
+
#if 1
|
| 61 |
+
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#ifdef __cplusplus
|
| 65 |
+
}
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
#endif /* NCURSES_UNCTRL_H_incl */
|
data/miniconda3/include/openssl/aes.h
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_AES_H
|
| 11 |
+
#define OPENSSL_AES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_AES_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#include <stddef.h>
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define AES_BLOCK_SIZE 16
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 29 |
+
|
| 30 |
+
#define AES_ENCRYPT 1
|
| 31 |
+
#define AES_DECRYPT 0
|
| 32 |
+
|
| 33 |
+
#define AES_MAXNR 14
|
| 34 |
+
|
| 35 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 36 |
+
struct aes_key_st {
|
| 37 |
+
#ifdef AES_LONG
|
| 38 |
+
unsigned long rd_key[4 * (AES_MAXNR + 1)];
|
| 39 |
+
#else
|
| 40 |
+
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
| 41 |
+
#endif
|
| 42 |
+
int rounds;
|
| 43 |
+
};
|
| 44 |
+
typedef struct aes_key_st AES_KEY;
|
| 45 |
+
|
| 46 |
+
#endif
|
| 47 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
|
| 49 |
+
OSSL_DEPRECATEDIN_3_0
|
| 50 |
+
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
| 51 |
+
AES_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
| 54 |
+
AES_KEY *key);
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0
|
| 56 |
+
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
| 57 |
+
const AES_KEY *key);
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0
|
| 59 |
+
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
| 60 |
+
const AES_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0
|
| 62 |
+
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 63 |
+
const AES_KEY *key, const int enc);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0
|
| 65 |
+
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 66 |
+
size_t length, const AES_KEY *key,
|
| 67 |
+
unsigned char *ivec, const int enc);
|
| 68 |
+
OSSL_DEPRECATEDIN_3_0
|
| 69 |
+
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 70 |
+
size_t length, const AES_KEY *key,
|
| 71 |
+
unsigned char *ivec, int *num, const int enc);
|
| 72 |
+
OSSL_DEPRECATEDIN_3_0
|
| 73 |
+
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
| 74 |
+
size_t length, const AES_KEY *key,
|
| 75 |
+
unsigned char *ivec, int *num, const int enc);
|
| 76 |
+
OSSL_DEPRECATEDIN_3_0
|
| 77 |
+
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
| 78 |
+
size_t length, const AES_KEY *key,
|
| 79 |
+
unsigned char *ivec, int *num, const int enc);
|
| 80 |
+
OSSL_DEPRECATEDIN_3_0
|
| 81 |
+
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 82 |
+
size_t length, const AES_KEY *key,
|
| 83 |
+
unsigned char *ivec, int *num);
|
| 84 |
+
|
| 85 |
+
/* NB: the IV is _two_ blocks long */
|
| 86 |
+
OSSL_DEPRECATEDIN_3_0
|
| 87 |
+
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 88 |
+
size_t length, const AES_KEY *key,
|
| 89 |
+
unsigned char *ivec, const int enc);
|
| 90 |
+
/* NB: the IV is _four_ blocks long */
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0
|
| 92 |
+
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 93 |
+
size_t length, const AES_KEY *key, const AES_KEY *key2,
|
| 94 |
+
const unsigned char *ivec, const int enc);
|
| 95 |
+
OSSL_DEPRECATEDIN_3_0
|
| 96 |
+
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
| 97 |
+
unsigned char *out, const unsigned char *in,
|
| 98 |
+
unsigned int inlen);
|
| 99 |
+
OSSL_DEPRECATEDIN_3_0
|
| 100 |
+
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
| 101 |
+
unsigned char *out, const unsigned char *in,
|
| 102 |
+
unsigned int inlen);
|
| 103 |
+
#endif
|
| 104 |
+
|
| 105 |
+
#ifdef __cplusplus
|
| 106 |
+
}
|
| 107 |
+
#endif
|
| 108 |
+
|
| 109 |
+
#endif
|
data/miniconda3/include/openssl/async.h
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#include <stdlib.h>
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_ASYNC_H
|
| 13 |
+
#define OPENSSL_ASYNC_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/macros.h>
|
| 17 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
#define HEADER_ASYNC_H
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
#if defined(_WIN32)
|
| 22 |
+
#if defined(BASETYPES) || defined(_WINDEF_H)
|
| 23 |
+
/* application has to include <windows.h> to use this */
|
| 24 |
+
#define OSSL_ASYNC_FD HANDLE
|
| 25 |
+
#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE
|
| 26 |
+
#endif
|
| 27 |
+
#else
|
| 28 |
+
#define OSSL_ASYNC_FD int
|
| 29 |
+
#define OSSL_BAD_ASYNC_FD -1
|
| 30 |
+
#endif
|
| 31 |
+
#include <openssl/asyncerr.h>
|
| 32 |
+
|
| 33 |
+
#ifdef __cplusplus
|
| 34 |
+
extern "C" {
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
typedef struct async_job_st ASYNC_JOB;
|
| 38 |
+
typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
|
| 39 |
+
typedef int (*ASYNC_callback_fn)(void *arg);
|
| 40 |
+
|
| 41 |
+
#define ASYNC_ERR 0
|
| 42 |
+
#define ASYNC_NO_JOBS 1
|
| 43 |
+
#define ASYNC_PAUSE 2
|
| 44 |
+
#define ASYNC_FINISH 3
|
| 45 |
+
|
| 46 |
+
#define ASYNC_STATUS_UNSUPPORTED 0
|
| 47 |
+
#define ASYNC_STATUS_ERR 1
|
| 48 |
+
#define ASYNC_STATUS_OK 2
|
| 49 |
+
#define ASYNC_STATUS_EAGAIN 3
|
| 50 |
+
|
| 51 |
+
int ASYNC_init_thread(size_t max_size, size_t init_size);
|
| 52 |
+
void ASYNC_cleanup_thread(void);
|
| 53 |
+
|
| 54 |
+
#ifdef OSSL_ASYNC_FD
|
| 55 |
+
ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
|
| 56 |
+
void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
|
| 57 |
+
int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 58 |
+
OSSL_ASYNC_FD fd,
|
| 59 |
+
void *custom_data,
|
| 60 |
+
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
| 61 |
+
OSSL_ASYNC_FD, void *));
|
| 62 |
+
int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 63 |
+
OSSL_ASYNC_FD *fd, void **custom_data);
|
| 64 |
+
int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
|
| 65 |
+
size_t *numfds);
|
| 66 |
+
int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
|
| 67 |
+
ASYNC_callback_fn *callback,
|
| 68 |
+
void **callback_arg);
|
| 69 |
+
int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
|
| 70 |
+
ASYNC_callback_fn callback,
|
| 71 |
+
void *callback_arg);
|
| 72 |
+
int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
|
| 73 |
+
int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
|
| 74 |
+
int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd,
|
| 75 |
+
size_t *numaddfds, OSSL_ASYNC_FD *delfd,
|
| 76 |
+
size_t *numdelfds);
|
| 77 |
+
int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
int ASYNC_is_capable(void);
|
| 81 |
+
|
| 82 |
+
typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
|
| 83 |
+
typedef void (*ASYNC_stack_free_fn)(void *addr);
|
| 84 |
+
|
| 85 |
+
int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
|
| 86 |
+
ASYNC_stack_free_fn free_fn);
|
| 87 |
+
void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
|
| 88 |
+
ASYNC_stack_free_fn *free_fn);
|
| 89 |
+
|
| 90 |
+
int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
|
| 91 |
+
int (*func)(void *), void *args, size_t size);
|
| 92 |
+
int ASYNC_pause_job(void);
|
| 93 |
+
|
| 94 |
+
ASYNC_JOB *ASYNC_get_current_job(void);
|
| 95 |
+
ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
|
| 96 |
+
void ASYNC_block_pause(void);
|
| 97 |
+
void ASYNC_unblock_pause(void);
|
| 98 |
+
|
| 99 |
+
#ifdef __cplusplus
|
| 100 |
+
}
|
| 101 |
+
#endif
|
| 102 |
+
#endif
|
data/miniconda3/include/openssl/bio.h
ADDED
|
@@ -0,0 +1,1028 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
/* clang-format off */
|
| 13 |
+
|
| 14 |
+
/* clang-format on */
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_BIO_H
|
| 17 |
+
#define OPENSSL_BIO_H
|
| 18 |
+
#pragma once
|
| 19 |
+
|
| 20 |
+
#include <openssl/macros.h>
|
| 21 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 22 |
+
#define HEADER_BIO_H
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/e_os2.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_STDIO
|
| 28 |
+
#include <stdio.h>
|
| 29 |
+
#endif
|
| 30 |
+
#include <stdarg.h>
|
| 31 |
+
|
| 32 |
+
#include <openssl/crypto.h>
|
| 33 |
+
#include <openssl/bioerr.h>
|
| 34 |
+
#include <openssl/core.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
/* There are the classes of BIOs */
|
| 41 |
+
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 42 |
+
#define BIO_TYPE_FILTER 0x0200
|
| 43 |
+
#define BIO_TYPE_SOURCE_SINK 0x0400
|
| 44 |
+
|
| 45 |
+
/* These are the 'types' of BIOs */
|
| 46 |
+
#define BIO_TYPE_NONE 0
|
| 47 |
+
#define BIO_TYPE_MEM (1 | BIO_TYPE_SOURCE_SINK)
|
| 48 |
+
#define BIO_TYPE_FILE (2 | BIO_TYPE_SOURCE_SINK)
|
| 49 |
+
|
| 50 |
+
#define BIO_TYPE_FD (4 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 51 |
+
#define BIO_TYPE_SOCKET (5 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 52 |
+
#define BIO_TYPE_NULL (6 | BIO_TYPE_SOURCE_SINK)
|
| 53 |
+
#define BIO_TYPE_SSL (7 | BIO_TYPE_FILTER)
|
| 54 |
+
#define BIO_TYPE_MD (8 | BIO_TYPE_FILTER)
|
| 55 |
+
#define BIO_TYPE_BUFFER (9 | BIO_TYPE_FILTER)
|
| 56 |
+
#define BIO_TYPE_CIPHER (10 | BIO_TYPE_FILTER)
|
| 57 |
+
#define BIO_TYPE_BASE64 (11 | BIO_TYPE_FILTER)
|
| 58 |
+
#define BIO_TYPE_CONNECT (12 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 59 |
+
#define BIO_TYPE_ACCEPT (13 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 60 |
+
|
| 61 |
+
#define BIO_TYPE_NBIO_TEST (16 | BIO_TYPE_FILTER) /* server proxy BIO */
|
| 62 |
+
#define BIO_TYPE_NULL_FILTER (17 | BIO_TYPE_FILTER)
|
| 63 |
+
#define BIO_TYPE_BIO (19 | BIO_TYPE_SOURCE_SINK) /* half a BIO pair */
|
| 64 |
+
#define BIO_TYPE_LINEBUFFER (20 | BIO_TYPE_FILTER)
|
| 65 |
+
#define BIO_TYPE_DGRAM (21 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 66 |
+
#define BIO_TYPE_ASN1 (22 | BIO_TYPE_FILTER)
|
| 67 |
+
#define BIO_TYPE_COMP (23 | BIO_TYPE_FILTER)
|
| 68 |
+
#ifndef OPENSSL_NO_SCTP
|
| 69 |
+
#define BIO_TYPE_DGRAM_SCTP (24 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 70 |
+
#endif
|
| 71 |
+
#define BIO_TYPE_CORE_TO_PROV (25 | BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
#define BIO_TYPE_DGRAM_PAIR (26 | BIO_TYPE_SOURCE_SINK)
|
| 73 |
+
#define BIO_TYPE_DGRAM_MEM (27 | BIO_TYPE_SOURCE_SINK)
|
| 74 |
+
|
| 75 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_START 128
|
| 77 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 78 |
+
#define BIO_TYPE_MASK 0xFF
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 82 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 83 |
+
*/
|
| 84 |
+
#define BIO_NOCLOSE 0x00
|
| 85 |
+
#define BIO_CLOSE 0x01
|
| 86 |
+
|
| 87 |
+
/*
|
| 88 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 89 |
+
*/
|
| 90 |
+
#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
|
| 91 |
+
#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
|
| 92 |
+
#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
|
| 93 |
+
#define BIO_CTRL_SET 4 /* man - set the 'IO' type */
|
| 94 |
+
#define BIO_CTRL_GET 5 /* man - get the 'IO' type */
|
| 95 |
+
#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
|
| 96 |
+
#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
|
| 97 |
+
#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
|
| 98 |
+
#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
|
| 99 |
+
#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
|
| 100 |
+
#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
|
| 101 |
+
#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
|
| 102 |
+
#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
|
| 103 |
+
#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */
|
| 104 |
+
#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */
|
| 105 |
+
|
| 106 |
+
#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
|
| 107 |
+
#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */
|
| 108 |
+
|
| 109 |
+
/* dgram BIO stuff */
|
| 110 |
+
#define BIO_CTRL_DGRAM_CONNECT 31 /* BIO dgram special */
|
| 111 |
+
#define BIO_CTRL_DGRAM_SET_CONNECTED 32 /* allow for an externally connected \
|
| 112 |
+
* socket to be passed in */
|
| 113 |
+
#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */
|
| 114 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */
|
| 115 |
+
#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */
|
| 116 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36 /* getsockopt, essentially */
|
| 117 |
+
|
| 118 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37 /* flag whether the last */
|
| 119 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38 /* I/O operation timed out */
|
| 120 |
+
|
| 121 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 122 |
+
#define BIO_CTRL_DGRAM_MTU_DISCOVER 39 /* set DF bit on egress packets */
|
| 123 |
+
/* #endif */
|
| 124 |
+
|
| 125 |
+
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
| 126 |
+
#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 127 |
+
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
| 128 |
+
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for MTU. \
|
| 129 |
+
* want to use this if asking \
|
| 130 |
+
* the kernel fails */
|
| 131 |
+
|
| 132 |
+
#define BIO_CTRL_DGRAM_MTU_EXCEEDED 43 /* check whether the MTU was \
|
| 133 |
+
* exceed in the previous write \
|
| 134 |
+
* operation */
|
| 135 |
+
|
| 136 |
+
#define BIO_CTRL_DGRAM_GET_PEER 46
|
| 137 |
+
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
| 138 |
+
|
| 139 |
+
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout \
|
| 140 |
+
* to adjust socket timeouts */
|
| 141 |
+
#define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 142 |
+
|
| 143 |
+
#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 144 |
+
|
| 145 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 146 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 147 |
+
#ifndef OPENSSL_NO_SCTP
|
| 148 |
+
/* SCTP stuff */
|
| 149 |
+
#define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 150 |
+
#define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 151 |
+
#define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 152 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 153 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 154 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 155 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 156 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 157 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 158 |
+
#define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 159 |
+
#endif
|
| 160 |
+
|
| 161 |
+
#define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 162 |
+
|
| 163 |
+
/*
|
| 164 |
+
* internal BIO:
|
| 165 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 166 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 167 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 168 |
+
*/
|
| 169 |
+
|
| 170 |
+
#define BIO_CTRL_GET_KTLS_SEND 73
|
| 171 |
+
#define BIO_CTRL_GET_KTLS_RECV 76
|
| 172 |
+
|
| 173 |
+
#define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 174 |
+
#define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 175 |
+
|
| 176 |
+
/* BIO_f_prefix controls */
|
| 177 |
+
#define BIO_CTRL_SET_PREFIX 79
|
| 178 |
+
#define BIO_CTRL_SET_INDENT 80
|
| 179 |
+
#define BIO_CTRL_GET_INDENT 81
|
| 180 |
+
|
| 181 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 182 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 183 |
+
#define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 184 |
+
#define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 185 |
+
#define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 186 |
+
#define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 187 |
+
#define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 188 |
+
#define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 189 |
+
|
| 190 |
+
/*
|
| 191 |
+
* internal BIO:
|
| 192 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 193 |
+
*/
|
| 194 |
+
|
| 195 |
+
#define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 196 |
+
#define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 197 |
+
#define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 198 |
+
#define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 199 |
+
|
| 200 |
+
#define BIO_DGRAM_CAP_NONE 0U
|
| 201 |
+
#define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 202 |
+
#define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 203 |
+
#define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 204 |
+
#define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 205 |
+
|
| 206 |
+
#ifndef OPENSSL_NO_KTLS
|
| 207 |
+
#define BIO_get_ktls_send(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 209 |
+
#define BIO_get_ktls_recv(b) \
|
| 210 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 211 |
+
#else
|
| 212 |
+
#define BIO_get_ktls_send(b) (0)
|
| 213 |
+
#define BIO_get_ktls_recv(b) (0)
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
/* modifiers */
|
| 217 |
+
#define BIO_FP_READ 0x02
|
| 218 |
+
#define BIO_FP_WRITE 0x04
|
| 219 |
+
#define BIO_FP_APPEND 0x08
|
| 220 |
+
#define BIO_FP_TEXT 0x10
|
| 221 |
+
|
| 222 |
+
#define BIO_FLAGS_READ 0x01
|
| 223 |
+
#define BIO_FLAGS_WRITE 0x02
|
| 224 |
+
#define BIO_FLAGS_IO_SPECIAL 0x04
|
| 225 |
+
#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
|
| 226 |
+
#define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 227 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 228 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 229 |
+
#define BIO_FLAGS_UPLINK 0
|
| 230 |
+
#endif
|
| 231 |
+
|
| 232 |
+
#define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 233 |
+
|
| 234 |
+
/*
|
| 235 |
+
* This is used with memory BIOs:
|
| 236 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 237 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 238 |
+
*/
|
| 239 |
+
#define BIO_FLAGS_MEM_RDONLY 0x200
|
| 240 |
+
#define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 241 |
+
#define BIO_FLAGS_IN_EOF 0x800
|
| 242 |
+
|
| 243 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 244 |
+
|
| 245 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 246 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 247 |
+
|
| 248 |
+
int BIO_get_new_index(void);
|
| 249 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 250 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 251 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 252 |
+
|
| 253 |
+
#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 254 |
+
#define BIO_set_retry_special(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
#define BIO_set_retry_read(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
#define BIO_set_retry_write(b) \
|
| 259 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY))
|
| 260 |
+
|
| 261 |
+
/* These are normally used internally in BIOs */
|
| 262 |
+
#define BIO_clear_retry_flags(b) \
|
| 263 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
#define BIO_get_retry_flags(b) \
|
| 265 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 266 |
+
|
| 267 |
+
/* These should be used by the application to tell why we should retry */
|
| 268 |
+
#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 269 |
+
#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 270 |
+
#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 271 |
+
#define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 272 |
+
#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 276 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 277 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 278 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 279 |
+
* the code.
|
| 280 |
+
*/
|
| 281 |
+
/*
|
| 282 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 283 |
+
*/
|
| 284 |
+
#define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 285 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 286 |
+
#define BIO_RR_CONNECT 0x02
|
| 287 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 288 |
+
#define BIO_RR_ACCEPT 0x03
|
| 289 |
+
|
| 290 |
+
/* These are passed by the BIO callback */
|
| 291 |
+
#define BIO_CB_FREE 0x01
|
| 292 |
+
#define BIO_CB_READ 0x02
|
| 293 |
+
#define BIO_CB_WRITE 0x03
|
| 294 |
+
#define BIO_CB_PUTS 0x04
|
| 295 |
+
#define BIO_CB_GETS 0x05
|
| 296 |
+
#define BIO_CB_CTRL 0x06
|
| 297 |
+
#define BIO_CB_RECVMMSG 0x07
|
| 298 |
+
#define BIO_CB_SENDMMSG 0x08
|
| 299 |
+
|
| 300 |
+
/*
|
| 301 |
+
* The callback is called before and after the underling operation, The
|
| 302 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 303 |
+
*/
|
| 304 |
+
#define BIO_CB_RETURN 0x80
|
| 305 |
+
#define BIO_CB_return(a) ((a) | BIO_CB_RETURN)
|
| 306 |
+
#define BIO_cb_pre(a) (!((a) & BIO_CB_RETURN))
|
| 307 |
+
#define BIO_cb_post(a) ((a) & BIO_CB_RETURN)
|
| 308 |
+
|
| 309 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 310 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 311 |
+
long argl, long ret);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 313 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 314 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 315 |
+
const char *argp, int argi,
|
| 316 |
+
long argl, long ret);
|
| 317 |
+
#endif
|
| 318 |
+
|
| 319 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 320 |
+
size_t len, int argi,
|
| 321 |
+
long argl, int ret, size_t *processed);
|
| 322 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 323 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 324 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 325 |
+
int argi, long argl, int ret, size_t *processed);
|
| 326 |
+
|
| 327 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 328 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 329 |
+
|
| 330 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 331 |
+
|
| 332 |
+
const char *BIO_method_name(const BIO *b);
|
| 333 |
+
int BIO_method_type(const BIO *b);
|
| 334 |
+
|
| 335 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 336 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 337 |
+
|
| 338 |
+
/* clang-format off */
|
| 339 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 340 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 341 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 342 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 343 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 344 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 345 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 346 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 347 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 348 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 349 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 350 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 351 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 352 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 353 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 354 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk), ossl_check_BIO_freefunc_type(freefunc))
|
| 355 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 356 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 357 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 358 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 359 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 360 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 361 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 362 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 363 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 364 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 365 |
+
|
| 366 |
+
/* clang-format on */
|
| 367 |
+
|
| 368 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 369 |
+
typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen,
|
| 370 |
+
void *parg);
|
| 371 |
+
|
| 372 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn)(BIO *b,
|
| 373 |
+
void *context,
|
| 374 |
+
void *buf);
|
| 375 |
+
#ifndef OPENSSL_NO_SCTP
|
| 376 |
+
/* SCTP parameter structs */
|
| 377 |
+
struct bio_dgram_sctp_sndinfo {
|
| 378 |
+
uint16_t snd_sid;
|
| 379 |
+
uint16_t snd_flags;
|
| 380 |
+
uint32_t snd_ppid;
|
| 381 |
+
uint32_t snd_context;
|
| 382 |
+
};
|
| 383 |
+
|
| 384 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 385 |
+
uint16_t rcv_sid;
|
| 386 |
+
uint16_t rcv_ssn;
|
| 387 |
+
uint16_t rcv_flags;
|
| 388 |
+
uint32_t rcv_ppid;
|
| 389 |
+
uint32_t rcv_tsn;
|
| 390 |
+
uint32_t rcv_cumtsn;
|
| 391 |
+
uint32_t rcv_context;
|
| 392 |
+
};
|
| 393 |
+
|
| 394 |
+
struct bio_dgram_sctp_prinfo {
|
| 395 |
+
uint16_t pr_policy;
|
| 396 |
+
uint32_t pr_value;
|
| 397 |
+
};
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 401 |
+
typedef struct bio_msg_st {
|
| 402 |
+
void *data;
|
| 403 |
+
size_t data_len;
|
| 404 |
+
BIO_ADDR *peer, *local;
|
| 405 |
+
uint64_t flags;
|
| 406 |
+
} BIO_MSG;
|
| 407 |
+
|
| 408 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 409 |
+
BIO_MSG *msg;
|
| 410 |
+
size_t stride, num_msg;
|
| 411 |
+
uint64_t flags;
|
| 412 |
+
size_t *msgs_processed;
|
| 413 |
+
} BIO_MMSG_CB_ARGS;
|
| 414 |
+
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 416 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 417 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 418 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 419 |
+
|
| 420 |
+
typedef struct bio_poll_descriptor_st {
|
| 421 |
+
uint32_t type;
|
| 422 |
+
union {
|
| 423 |
+
int fd;
|
| 424 |
+
void *custom;
|
| 425 |
+
uintptr_t custom_ui;
|
| 426 |
+
SSL *ssl;
|
| 427 |
+
} value;
|
| 428 |
+
} BIO_POLL_DESCRIPTOR;
|
| 429 |
+
|
| 430 |
+
/*
|
| 431 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 432 |
+
*/
|
| 433 |
+
|
| 434 |
+
#define BIO_C_SET_CONNECT 100
|
| 435 |
+
#define BIO_C_DO_STATE_MACHINE 101
|
| 436 |
+
#define BIO_C_SET_NBIO 102
|
| 437 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 438 |
+
#define BIO_C_SET_FD 104
|
| 439 |
+
#define BIO_C_GET_FD 105
|
| 440 |
+
#define BIO_C_SET_FILE_PTR 106
|
| 441 |
+
#define BIO_C_GET_FILE_PTR 107
|
| 442 |
+
#define BIO_C_SET_FILENAME 108
|
| 443 |
+
#define BIO_C_SET_SSL 109
|
| 444 |
+
#define BIO_C_GET_SSL 110
|
| 445 |
+
#define BIO_C_SET_MD 111
|
| 446 |
+
#define BIO_C_GET_MD 112
|
| 447 |
+
#define BIO_C_GET_CIPHER_STATUS 113
|
| 448 |
+
#define BIO_C_SET_BUF_MEM 114
|
| 449 |
+
#define BIO_C_GET_BUF_MEM_PTR 115
|
| 450 |
+
#define BIO_C_GET_BUFF_NUM_LINES 116
|
| 451 |
+
#define BIO_C_SET_BUFF_SIZE 117
|
| 452 |
+
#define BIO_C_SET_ACCEPT 118
|
| 453 |
+
#define BIO_C_SSL_MODE 119
|
| 454 |
+
#define BIO_C_GET_MD_CTX 120
|
| 455 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 456 |
+
#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
|
| 457 |
+
#define BIO_C_GET_CONNECT 123
|
| 458 |
+
#define BIO_C_GET_ACCEPT 124
|
| 459 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 460 |
+
#define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 461 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 462 |
+
#define BIO_C_FILE_SEEK 128
|
| 463 |
+
#define BIO_C_GET_CIPHER_CTX 129
|
| 464 |
+
#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
|
| 465 |
+
* value */
|
| 466 |
+
#define BIO_C_SET_BIND_MODE 131
|
| 467 |
+
#define BIO_C_GET_BIND_MODE 132
|
| 468 |
+
#define BIO_C_FILE_TELL 133
|
| 469 |
+
#define BIO_C_GET_SOCKS 134
|
| 470 |
+
#define BIO_C_SET_SOCKS 135
|
| 471 |
+
|
| 472 |
+
#define BIO_C_SET_WRITE_BUF_SIZE 136 /* for BIO_s_bio */
|
| 473 |
+
#define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 474 |
+
#define BIO_C_MAKE_BIO_PAIR 138
|
| 475 |
+
#define BIO_C_DESTROY_BIO_PAIR 139
|
| 476 |
+
#define BIO_C_GET_WRITE_GUARANTEE 140
|
| 477 |
+
#define BIO_C_GET_READ_REQUEST 141
|
| 478 |
+
#define BIO_C_SHUTDOWN_WR 142
|
| 479 |
+
#define BIO_C_NREAD0 143
|
| 480 |
+
#define BIO_C_NREAD 144
|
| 481 |
+
#define BIO_C_NWRITE0 145
|
| 482 |
+
#define BIO_C_NWRITE 146
|
| 483 |
+
#define BIO_C_RESET_READ_REQUEST 147
|
| 484 |
+
#define BIO_C_SET_MD_CTX 148
|
| 485 |
+
|
| 486 |
+
#define BIO_C_SET_PREFIX 149
|
| 487 |
+
#define BIO_C_GET_PREFIX 150
|
| 488 |
+
#define BIO_C_SET_SUFFIX 151
|
| 489 |
+
#define BIO_C_GET_SUFFIX 152
|
| 490 |
+
|
| 491 |
+
#define BIO_C_SET_EX_ARG 153
|
| 492 |
+
#define BIO_C_GET_EX_ARG 154
|
| 493 |
+
|
| 494 |
+
#define BIO_C_SET_CONNECT_MODE 155
|
| 495 |
+
|
| 496 |
+
#define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 497 |
+
|
| 498 |
+
#define BIO_C_SET_SOCK_TYPE 157
|
| 499 |
+
#define BIO_C_GET_SOCK_TYPE 158
|
| 500 |
+
#define BIO_C_GET_DGRAM_BIO 159
|
| 501 |
+
|
| 502 |
+
#define BIO_set_app_data(s, arg) BIO_set_ex_data(s, 0, arg)
|
| 503 |
+
#define BIO_get_app_data(s) BIO_get_ex_data(s, 0)
|
| 504 |
+
|
| 505 |
+
#define BIO_set_nbio(b, n) BIO_ctrl(b, BIO_C_SET_NBIO, (n), NULL)
|
| 506 |
+
#define BIO_set_tfo(b, n) BIO_ctrl(b, BIO_C_SET_TFO, (n), NULL)
|
| 507 |
+
|
| 508 |
+
#ifndef OPENSSL_NO_SOCK
|
| 509 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 510 |
+
/* Note: the underlying operating system may not support some of them */
|
| 511 |
+
#define BIO_FAMILY_IPV4 4
|
| 512 |
+
#define BIO_FAMILY_IPV6 6
|
| 513 |
+
#define BIO_FAMILY_IPANY 256
|
| 514 |
+
|
| 515 |
+
/* BIO_s_connect() */
|
| 516 |
+
#define BIO_set_conn_hostname(b, name) BIO_ctrl(b, BIO_C_SET_CONNECT, 0, \
|
| 517 |
+
(char *)(name))
|
| 518 |
+
#define BIO_set_conn_port(b, port) BIO_ctrl(b, BIO_C_SET_CONNECT, 1, \
|
| 519 |
+
(char *)(port))
|
| 520 |
+
#define BIO_set_conn_address(b, addr) BIO_ctrl(b, BIO_C_SET_CONNECT, 2, \
|
| 521 |
+
(char *)(addr))
|
| 522 |
+
#define BIO_set_conn_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_CONNECT, 3, f)
|
| 523 |
+
#define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 0))
|
| 524 |
+
#define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 1))
|
| 525 |
+
#define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 2))
|
| 526 |
+
#define BIO_get_conn_ip_family(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 3, NULL)
|
| 527 |
+
#define BIO_get_conn_mode(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 4, NULL)
|
| 528 |
+
#define BIO_set_conn_mode(b, n) BIO_ctrl(b, BIO_C_SET_CONNECT_MODE, (n), NULL)
|
| 529 |
+
#define BIO_set_sock_type(b, t) BIO_ctrl(b, BIO_C_SET_SOCK_TYPE, (t), NULL)
|
| 530 |
+
#define BIO_get_sock_type(b) BIO_ctrl(b, BIO_C_GET_SOCK_TYPE, 0, NULL)
|
| 531 |
+
#define BIO_get0_dgram_bio(b, p) BIO_ctrl(b, BIO_C_GET_DGRAM_BIO, 0, (void *)(BIO **)(p))
|
| 532 |
+
|
| 533 |
+
/* BIO_s_accept() */
|
| 534 |
+
#define BIO_set_accept_name(b, name) BIO_ctrl(b, BIO_C_SET_ACCEPT, 0, \
|
| 535 |
+
(char *)(name))
|
| 536 |
+
#define BIO_set_accept_port(b, port) BIO_ctrl(b, BIO_C_SET_ACCEPT, 1, \
|
| 537 |
+
(char *)(port))
|
| 538 |
+
#define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 0))
|
| 539 |
+
#define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 1))
|
| 540 |
+
#define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 2))
|
| 541 |
+
#define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 3))
|
| 542 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 543 |
+
#define BIO_set_nbio_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 2, (n) ? (void *)"a" : NULL)
|
| 544 |
+
#define BIO_set_accept_bios(b, bio) BIO_ctrl(b, BIO_C_SET_ACCEPT, 3, \
|
| 545 |
+
(char *)(bio))
|
| 546 |
+
#define BIO_set_accept_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_ACCEPT, 4, f)
|
| 547 |
+
#define BIO_get_accept_ip_family(b) BIO_ctrl(b, BIO_C_GET_ACCEPT, 4, NULL)
|
| 548 |
+
#define BIO_set_tfo_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 5, (n) ? (void *)"a" : NULL)
|
| 549 |
+
|
| 550 |
+
/* Aliases kept for backward compatibility */
|
| 551 |
+
#define BIO_BIND_NORMAL 0
|
| 552 |
+
#define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 553 |
+
#define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 554 |
+
#define BIO_set_bind_mode(b, mode) BIO_ctrl(b, BIO_C_SET_BIND_MODE, mode, NULL)
|
| 555 |
+
#define BIO_get_bind_mode(b) BIO_ctrl(b, BIO_C_GET_BIND_MODE, 0, NULL)
|
| 556 |
+
#endif /* OPENSSL_NO_SOCK */
|
| 557 |
+
|
| 558 |
+
#define BIO_do_connect(b) BIO_do_handshake(b)
|
| 559 |
+
#define BIO_do_accept(b) BIO_do_handshake(b)
|
| 560 |
+
|
| 561 |
+
#define BIO_do_handshake(b) BIO_ctrl(b, BIO_C_DO_STATE_MACHINE, 0, NULL)
|
| 562 |
+
|
| 563 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 564 |
+
#define BIO_set_fd(b, fd, c) BIO_int_ctrl(b, BIO_C_SET_FD, c, fd)
|
| 565 |
+
#define BIO_get_fd(b, c) BIO_ctrl(b, BIO_C_GET_FD, 0, (char *)(c))
|
| 566 |
+
|
| 567 |
+
/* BIO_s_file() */
|
| 568 |
+
#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
|
| 569 |
+
#define BIO_get_fp(b, fpp) BIO_ctrl(b, BIO_C_GET_FILE_PTR, 0, (char *)(fpp))
|
| 570 |
+
|
| 571 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 572 |
+
#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
|
| 573 |
+
#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
|
| 574 |
+
|
| 575 |
+
/*
|
| 576 |
+
* name is cast to lose const, but might be better to route through a
|
| 577 |
+
* function so we can do it safely
|
| 578 |
+
*/
|
| 579 |
+
#ifdef CONST_STRICT
|
| 580 |
+
/*
|
| 581 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 582 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 583 |
+
*/
|
| 584 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 585 |
+
#else
|
| 586 |
+
#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE | BIO_FP_READ, (char *)(name))
|
| 588 |
+
#endif
|
| 589 |
+
#define BIO_write_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 590 |
+
BIO_CLOSE | BIO_FP_WRITE, name)
|
| 591 |
+
#define BIO_append_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 592 |
+
BIO_CLOSE | BIO_FP_APPEND, name)
|
| 593 |
+
#define BIO_rw_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 594 |
+
BIO_CLOSE | BIO_FP_READ | BIO_FP_WRITE, name)
|
| 595 |
+
|
| 596 |
+
/*
|
| 597 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 598 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 599 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 600 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 601 |
+
*/
|
| 602 |
+
#define BIO_set_ssl(b, ssl, c) BIO_ctrl(b, BIO_C_SET_SSL, c, (char *)(ssl))
|
| 603 |
+
#define BIO_get_ssl(b, sslp) BIO_ctrl(b, BIO_C_GET_SSL, 0, (char *)(sslp))
|
| 604 |
+
#define BIO_set_ssl_mode(b, client) BIO_ctrl(b, BIO_C_SSL_MODE, client, NULL)
|
| 605 |
+
#define BIO_set_ssl_renegotiate_bytes(b, num) \
|
| 606 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_BYTES, num, NULL)
|
| 607 |
+
#define BIO_get_num_renegotiates(b) \
|
| 608 |
+
BIO_ctrl(b, BIO_C_GET_SSL_NUM_RENEGOTIATES, 0, NULL)
|
| 609 |
+
#define BIO_set_ssl_renegotiate_timeout(b, seconds) \
|
| 610 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT, seconds, NULL)
|
| 611 |
+
|
| 612 |
+
/* defined in evp.h */
|
| 613 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 614 |
+
|
| 615 |
+
#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
|
| 616 |
+
#define BIO_set_mem_buf(b, bm, c) BIO_ctrl(b, BIO_C_SET_BUF_MEM, c, (char *)(bm))
|
| 617 |
+
#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
|
| 618 |
+
(char *)(pp))
|
| 619 |
+
#define BIO_set_mem_eof_return(b, v) \
|
| 620 |
+
BIO_ctrl(b, BIO_C_SET_BUF_MEM_EOF_RETURN, v, NULL)
|
| 621 |
+
|
| 622 |
+
/* For the BIO_f_buffer() type */
|
| 623 |
+
#define BIO_get_buffer_num_lines(b) BIO_ctrl(b, BIO_C_GET_BUFF_NUM_LINES, 0, NULL)
|
| 624 |
+
#define BIO_set_buffer_size(b, size) BIO_ctrl(b, BIO_C_SET_BUFF_SIZE, size, NULL)
|
| 625 |
+
#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
|
| 626 |
+
#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
|
| 627 |
+
#define BIO_set_buffer_read_data(b, buf, num) BIO_ctrl(b, BIO_C_SET_BUFF_READ_DATA, num, buf)
|
| 628 |
+
|
| 629 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 630 |
+
#define BIO_dup_state(b, ret) BIO_ctrl(b, BIO_CTRL_DUP, 0, (char *)(ret))
|
| 631 |
+
|
| 632 |
+
#define BIO_reset(b) (int)BIO_ctrl(b, BIO_CTRL_RESET, 0, NULL)
|
| 633 |
+
#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
|
| 634 |
+
#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
|
| 635 |
+
#define BIO_get_close(b) (int)BIO_ctrl(b, BIO_CTRL_GET_CLOSE, 0, NULL)
|
| 636 |
+
#define BIO_pending(b) (int)BIO_ctrl(b, BIO_CTRL_PENDING, 0, NULL)
|
| 637 |
+
#define BIO_wpending(b) (int)BIO_ctrl(b, BIO_CTRL_WPENDING, 0, NULL)
|
| 638 |
+
/* ...pending macros have inappropriate return type */
|
| 639 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 640 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 641 |
+
#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
|
| 642 |
+
#define BIO_get_info_callback(b, cbp) (int)BIO_ctrl(b, BIO_CTRL_GET_CALLBACK, 0, \
|
| 643 |
+
cbp)
|
| 644 |
+
#define BIO_set_info_callback(b, cb) (int)BIO_callback_ctrl(b, BIO_CTRL_SET_CALLBACK, cb)
|
| 645 |
+
|
| 646 |
+
/* For the BIO_f_buffer() type */
|
| 647 |
+
#define BIO_buffer_get_num_lines(b) BIO_ctrl(b, BIO_CTRL_GET, 0, NULL)
|
| 648 |
+
#define BIO_buffer_peek(b, s, l) BIO_ctrl(b, BIO_CTRL_PEEK, (l), (s))
|
| 649 |
+
|
| 650 |
+
/* For BIO_s_bio() */
|
| 651 |
+
#define BIO_set_write_buf_size(b, size) (int)BIO_ctrl(b, BIO_C_SET_WRITE_BUF_SIZE, size, NULL)
|
| 652 |
+
#define BIO_get_write_buf_size(b, size) (size_t)BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL)
|
| 653 |
+
#define BIO_make_bio_pair(b1, b2) (int)BIO_ctrl(b1, BIO_C_MAKE_BIO_PAIR, 0, b2)
|
| 654 |
+
#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b, BIO_C_DESTROY_BIO_PAIR, 0, NULL)
|
| 655 |
+
#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 656 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 657 |
+
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b, BIO_C_GET_WRITE_GUARANTEE, 0, NULL)
|
| 658 |
+
#define BIO_get_read_request(b) (int)BIO_ctrl(b, BIO_C_GET_READ_REQUEST, 0, NULL)
|
| 659 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 660 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 661 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 662 |
+
|
| 663 |
+
/* ctrl macros for dgram */
|
| 664 |
+
#define BIO_ctrl_dgram_connect(b, peer) \
|
| 665 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_CONNECT, 0, (char *)(peer))
|
| 666 |
+
#define BIO_ctrl_set_connected(b, peer) \
|
| 667 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 668 |
+
#define BIO_dgram_recv_timedout(b) \
|
| 669 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 670 |
+
#define BIO_dgram_send_timedout(b) \
|
| 671 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 672 |
+
#define BIO_dgram_get_peer(b, peer) \
|
| 673 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 674 |
+
#define BIO_dgram_set_peer(b, peer) \
|
| 675 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 676 |
+
#define BIO_dgram_detect_peer_addr(b, peer) \
|
| 677 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 678 |
+
#define BIO_dgram_get_mtu_overhead(b) \
|
| 679 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 680 |
+
#define BIO_dgram_get_local_addr_cap(b) \
|
| 681 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 682 |
+
#define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 683 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 684 |
+
#define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 685 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 686 |
+
#define BIO_dgram_get_effective_caps(b) \
|
| 687 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 688 |
+
#define BIO_dgram_get_caps(b) \
|
| 689 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 690 |
+
#define BIO_dgram_set_caps(b, caps) \
|
| 691 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 692 |
+
#define BIO_dgram_get_no_trunc(b) \
|
| 693 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 694 |
+
#define BIO_dgram_set_no_trunc(b, enable) \
|
| 695 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 696 |
+
#define BIO_dgram_get_mtu(b) \
|
| 697 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 698 |
+
#define BIO_dgram_set_mtu(b, mtu) \
|
| 699 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 700 |
+
#define BIO_dgram_set0_local_addr(b, addr) \
|
| 701 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 702 |
+
|
| 703 |
+
/* ctrl macros for BIO_f_prefix */
|
| 704 |
+
#define BIO_set_prefix(b, p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 705 |
+
#define BIO_set_indent(b, i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 706 |
+
#define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 707 |
+
|
| 708 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 709 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 710 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 711 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 712 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 713 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 714 |
+
|
| 715 |
+
/* For BIO_f_asn1() */
|
| 716 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 717 |
+
asn1_ps_func *prefix_free);
|
| 718 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 719 |
+
asn1_ps_func **pprefix_free);
|
| 720 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 721 |
+
asn1_ps_func *suffix_free);
|
| 722 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 723 |
+
asn1_ps_func **psuffix_free);
|
| 724 |
+
|
| 725 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 726 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 727 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 728 |
+
#ifndef OPENSSL_NO_STDIO
|
| 729 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 730 |
+
#endif
|
| 731 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 732 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 733 |
+
int BIO_free(BIO *a);
|
| 734 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 735 |
+
void *BIO_get_data(BIO *a);
|
| 736 |
+
void BIO_set_init(BIO *a, int init);
|
| 737 |
+
int BIO_get_init(BIO *a);
|
| 738 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 739 |
+
int BIO_get_shutdown(BIO *a);
|
| 740 |
+
void BIO_vfree(BIO *a);
|
| 741 |
+
int BIO_up_ref(BIO *a);
|
| 742 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 743 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 744 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 745 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 746 |
+
size_t *msgs_processed);
|
| 747 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 748 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 749 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 750 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 751 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 752 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 753 |
+
size_t *msgs_processed);
|
| 754 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 755 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 756 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 757 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 758 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 759 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 760 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 761 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 762 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 763 |
+
BIO *BIO_pop(BIO *b);
|
| 764 |
+
void BIO_free_all(BIO *a);
|
| 765 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 766 |
+
BIO *BIO_next(BIO *b);
|
| 767 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 768 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 769 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 770 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 771 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 772 |
+
|
| 773 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 774 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 775 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 776 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 777 |
+
|
| 778 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 779 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 780 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 781 |
+
#endif
|
| 782 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 783 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 784 |
+
#ifndef OPENSSL_NO_SOCK
|
| 785 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 786 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 788 |
+
#endif
|
| 789 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 790 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 791 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 792 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 796 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 797 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 798 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 800 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 801 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 802 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 803 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 804 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 805 |
+
#ifndef OPENSSL_NO_SCTP
|
| 806 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 807 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 808 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 809 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 810 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 811 |
+
void *context);
|
| 812 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 813 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 814 |
+
#endif
|
| 815 |
+
#endif
|
| 816 |
+
|
| 817 |
+
#ifndef OPENSSL_NO_SOCK
|
| 818 |
+
int BIO_sock_should_retry(int i);
|
| 819 |
+
int BIO_sock_non_fatal_error(int error);
|
| 820 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 821 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 822 |
+
#endif
|
| 823 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 824 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 825 |
+
|
| 826 |
+
int BIO_fd_should_retry(int i);
|
| 827 |
+
int BIO_fd_non_fatal_error(int error);
|
| 828 |
+
int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 829 |
+
void *u, const void *s, int len);
|
| 830 |
+
int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 831 |
+
void *u, const void *s, int len, int indent);
|
| 832 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 833 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 834 |
+
#ifndef OPENSSL_NO_STDIO
|
| 835 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 836 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 837 |
+
#endif
|
| 838 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 839 |
+
int datalen);
|
| 840 |
+
|
| 841 |
+
#ifndef OPENSSL_NO_SOCK
|
| 842 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 843 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 844 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 845 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 846 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 847 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 848 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 849 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 850 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 851 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 852 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 853 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 854 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 855 |
+
|
| 856 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 857 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 858 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 859 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 860 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 861 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 862 |
+
|
| 863 |
+
enum BIO_hostserv_priorities {
|
| 864 |
+
BIO_PARSE_PRIO_HOST,
|
| 865 |
+
BIO_PARSE_PRIO_SERV
|
| 866 |
+
};
|
| 867 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 868 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 869 |
+
enum BIO_lookup_type {
|
| 870 |
+
BIO_LOOKUP_CLIENT,
|
| 871 |
+
BIO_LOOKUP_SERVER
|
| 872 |
+
};
|
| 873 |
+
int BIO_lookup(const char *host, const char *service,
|
| 874 |
+
enum BIO_lookup_type lookup_type,
|
| 875 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 876 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 877 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 878 |
+
BIO_ADDRINFO **res);
|
| 879 |
+
int BIO_sock_error(int sock);
|
| 880 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 881 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 882 |
+
int BIO_sock_init(void);
|
| 883 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 884 |
+
#define BIO_sock_cleanup() \
|
| 885 |
+
while (0) \
|
| 886 |
+
continue
|
| 887 |
+
#endif
|
| 888 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 889 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 890 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 891 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 892 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 893 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 894 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 895 |
+
#endif
|
| 896 |
+
|
| 897 |
+
union BIO_sock_info_u {
|
| 898 |
+
BIO_ADDR *addr;
|
| 899 |
+
};
|
| 900 |
+
enum BIO_sock_info_type {
|
| 901 |
+
BIO_SOCK_INFO_ADDRESS
|
| 902 |
+
};
|
| 903 |
+
int BIO_sock_info(int sock,
|
| 904 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 905 |
+
|
| 906 |
+
#define BIO_SOCK_REUSEADDR 0x01
|
| 907 |
+
#define BIO_SOCK_V6_ONLY 0x02
|
| 908 |
+
#define BIO_SOCK_KEEPALIVE 0x04
|
| 909 |
+
#define BIO_SOCK_NONBLOCK 0x08
|
| 910 |
+
#define BIO_SOCK_NODELAY 0x10
|
| 911 |
+
#define BIO_SOCK_TFO 0x20
|
| 912 |
+
|
| 913 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 914 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 915 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 916 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 917 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 918 |
+
int BIO_closesocket(int sock);
|
| 919 |
+
|
| 920 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 921 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 922 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 923 |
+
#endif /* OPENSSL_NO_SOCK*/
|
| 924 |
+
|
| 925 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 926 |
+
|
| 927 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 928 |
+
BIO **bio2, size_t writebuf2);
|
| 929 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 930 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 931 |
+
BIO **bio2, size_t writebuf2);
|
| 932 |
+
#endif
|
| 933 |
+
|
| 934 |
+
/*
|
| 935 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 936 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 937 |
+
* value.
|
| 938 |
+
*/
|
| 939 |
+
|
| 940 |
+
void BIO_copy_next_retry(BIO *b);
|
| 941 |
+
|
| 942 |
+
/*
|
| 943 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 944 |
+
*/
|
| 945 |
+
|
| 946 |
+
#define ossl_bio__attr__(x)
|
| 947 |
+
#if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 948 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 949 |
+
&& !defined(__APPLE__)
|
| 950 |
+
/*
|
| 951 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 952 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 953 |
+
*/
|
| 954 |
+
#if __STDC_VERSION__ >= 199901L
|
| 955 |
+
#undef ossl_bio__attr__
|
| 956 |
+
#define ossl_bio__attr__ __attribute__
|
| 957 |
+
#if __GNUC__ * 10 + __GNUC_MINOR__ >= 44
|
| 958 |
+
#define ossl_bio__printf__ __gnu_printf__
|
| 959 |
+
#else
|
| 960 |
+
#define ossl_bio__printf__ __printf__
|
| 961 |
+
#endif
|
| 962 |
+
#endif
|
| 963 |
+
#endif
|
| 964 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 965 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 966 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 967 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 968 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 969 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 970 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 971 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 972 |
+
#undef ossl_bio__attr__
|
| 973 |
+
#undef ossl_bio__printf__
|
| 974 |
+
|
| 975 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 976 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 977 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 978 |
+
int (*write)(BIO *, const char *, int));
|
| 979 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 980 |
+
int (*bwrite)(BIO *, const char *, size_t, size_t *));
|
| 981 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 982 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 983 |
+
uint64_t, size_t *));
|
| 984 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 985 |
+
int (*read)(BIO *, char *, int));
|
| 986 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 987 |
+
int (*bread)(BIO *, char *, size_t, size_t *));
|
| 988 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 989 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 990 |
+
uint64_t, size_t *));
|
| 991 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 992 |
+
int (*puts)(BIO *, const char *));
|
| 993 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 994 |
+
int (*ossl_gets)(BIO *, char *, int));
|
| 995 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 996 |
+
long (*ctrl)(BIO *, int, long, void *));
|
| 997 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *));
|
| 998 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *));
|
| 999 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 1000 |
+
long (*callback_ctrl)(BIO *, int,
|
| 1001 |
+
BIO_info_cb *));
|
| 1002 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 1003 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1004 |
+
int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom))(BIO *, char *,
|
| 1012 |
+
size_t, size_t *);
|
| 1013 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1014 |
+
size_t, size_t,
|
| 1015 |
+
uint64_t, size_t *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *);
|
| 1017 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1018 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1019 |
+
long, void *);
|
| 1020 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion))(BIO *);
|
| 1021 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *);
|
| 1022 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1023 |
+
BIO_info_cb *);
|
| 1024 |
+
#endif
|
| 1025 |
+
#ifdef __cplusplus
|
| 1026 |
+
}
|
| 1027 |
+
#endif
|
| 1028 |
+
#endif
|
data/miniconda3/include/openssl/bioerr.h
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BIOERR_H
|
| 12 |
+
#define OPENSSL_BIOERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BIO reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define BIO_R_ACCEPT_ERROR 100
|
| 23 |
+
#define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141
|
| 24 |
+
#define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129
|
| 25 |
+
#define BIO_R_BAD_FOPEN_MODE 101
|
| 26 |
+
#define BIO_R_BROKEN_PIPE 124
|
| 27 |
+
#define BIO_R_CONNECT_ERROR 103
|
| 28 |
+
#define BIO_R_CONNECT_TIMEOUT 147
|
| 29 |
+
#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
|
| 30 |
+
#define BIO_R_GETSOCKNAME_ERROR 132
|
| 31 |
+
#define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133
|
| 32 |
+
#define BIO_R_GETTING_SOCKTYPE 134
|
| 33 |
+
#define BIO_R_INVALID_ARGUMENT 125
|
| 34 |
+
#define BIO_R_INVALID_SOCKET 135
|
| 35 |
+
#define BIO_R_IN_USE 123
|
| 36 |
+
#define BIO_R_LENGTH_TOO_LONG 102
|
| 37 |
+
#define BIO_R_LISTEN_V6_ONLY 136
|
| 38 |
+
#define BIO_R_LOCAL_ADDR_NOT_AVAILABLE 111
|
| 39 |
+
#define BIO_R_LOOKUP_RETURNED_NOTHING 142
|
| 40 |
+
#define BIO_R_MALFORMED_HOST_OR_SERVICE 130
|
| 41 |
+
#define BIO_R_NBIO_CONNECT_ERROR 110
|
| 42 |
+
#define BIO_R_NON_FATAL 112
|
| 43 |
+
#define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143
|
| 44 |
+
#define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144
|
| 45 |
+
#define BIO_R_NO_PORT_DEFINED 113
|
| 46 |
+
#define BIO_R_NO_SUCH_FILE 128
|
| 47 |
+
#define BIO_R_NULL_PARAMETER 115 /* unused */
|
| 48 |
+
#define BIO_R_TFO_DISABLED 106
|
| 49 |
+
#define BIO_R_TFO_NO_KERNEL_SUPPORT 108
|
| 50 |
+
#define BIO_R_TRANSFER_ERROR 104
|
| 51 |
+
#define BIO_R_TRANSFER_TIMEOUT 105
|
| 52 |
+
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
|
| 53 |
+
#define BIO_R_UNABLE_TO_CREATE_SOCKET 118
|
| 54 |
+
#define BIO_R_UNABLE_TO_KEEPALIVE 137
|
| 55 |
+
#define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
|
| 56 |
+
#define BIO_R_UNABLE_TO_NODELAY 138
|
| 57 |
+
#define BIO_R_UNABLE_TO_REUSEADDR 139
|
| 58 |
+
#define BIO_R_UNABLE_TO_TFO 109
|
| 59 |
+
#define BIO_R_UNAVAILABLE_IP_FAMILY 145
|
| 60 |
+
#define BIO_R_UNINITIALIZED 120
|
| 61 |
+
#define BIO_R_UNKNOWN_INFO_TYPE 140
|
| 62 |
+
#define BIO_R_UNSUPPORTED_IP_FAMILY 146
|
| 63 |
+
#define BIO_R_UNSUPPORTED_METHOD 121
|
| 64 |
+
#define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131
|
| 65 |
+
#define BIO_R_WRITE_TO_READ_ONLY_BIO 126
|
| 66 |
+
#define BIO_R_WSASTARTUP 122
|
| 67 |
+
#define BIO_R_PORT_MISMATCH 150
|
| 68 |
+
#define BIO_R_PEER_ADDR_NOT_AVAILABLE 151
|
| 69 |
+
|
| 70 |
+
#endif
|
data/miniconda3/include/openssl/blowfish.h
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BLOWFISH_H
|
| 11 |
+
#define OPENSSL_BLOWFISH_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BLOWFISH_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_BF
|
| 22 |
+
#include <openssl/e_os2.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define BF_BLOCK 8
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define BF_ENCRYPT 1
|
| 32 |
+
#define BF_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*-
|
| 35 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 36 |
+
* ! BF_LONG has to be at least 32 bits wide. !
|
| 37 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 38 |
+
*/
|
| 39 |
+
#define BF_LONG unsigned int
|
| 40 |
+
|
| 41 |
+
#define BF_ROUNDS 16
|
| 42 |
+
|
| 43 |
+
typedef struct bf_key_st {
|
| 44 |
+
BF_LONG P[BF_ROUNDS + 2];
|
| 45 |
+
BF_LONG S[4 * 256];
|
| 46 |
+
} BF_KEY;
|
| 47 |
+
|
| 48 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 49 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len,
|
| 51 |
+
const unsigned char *data);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
| 53 |
+
OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
| 54 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
|
| 55 |
+
unsigned char *out, const BF_KEY *key,
|
| 56 |
+
int enc);
|
| 57 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in,
|
| 58 |
+
unsigned char *out, long length,
|
| 59 |
+
const BF_KEY *schedule,
|
| 60 |
+
unsigned char *ivec, int enc);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
long length, const BF_KEY *schedule,
|
| 64 |
+
unsigned char *ivec, int *num,
|
| 65 |
+
int enc);
|
| 66 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in,
|
| 67 |
+
unsigned char *out,
|
| 68 |
+
long length, const BF_KEY *schedule,
|
| 69 |
+
unsigned char *ivec, int *num);
|
| 70 |
+
OSSL_DEPRECATEDIN_3_0 const char *BF_options(void);
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifdef __cplusplus
|
| 74 |
+
}
|
| 75 |
+
#endif
|
| 76 |
+
#endif
|
| 77 |
+
|
| 78 |
+
#endif
|
data/miniconda3/include/openssl/buffer.h
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BUFFER_H
|
| 11 |
+
#define OPENSSL_BUFFER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BUFFER_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/types.h>
|
| 20 |
+
#ifndef OPENSSL_CRYPTO_H
|
| 21 |
+
#include <openssl/crypto.h>
|
| 22 |
+
#endif
|
| 23 |
+
#include <openssl/buffererr.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
#include <stddef.h>
|
| 30 |
+
#include <sys/types.h>
|
| 31 |
+
|
| 32 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 33 |
+
#define BUF_strdup(s) OPENSSL_strdup(s)
|
| 34 |
+
#define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
| 35 |
+
#define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
| 36 |
+
#define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
| 37 |
+
#define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
| 38 |
+
#define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
struct buf_mem_st {
|
| 42 |
+
size_t length; /* current number of bytes */
|
| 43 |
+
char *data;
|
| 44 |
+
size_t max; /* size of buffer */
|
| 45 |
+
unsigned long flags;
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
#define BUF_MEM_FLAG_SECURE 0x01
|
| 49 |
+
|
| 50 |
+
BUF_MEM *BUF_MEM_new(void);
|
| 51 |
+
BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
|
| 52 |
+
void BUF_MEM_free(BUF_MEM *a);
|
| 53 |
+
size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
|
| 54 |
+
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
|
| 55 |
+
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
|
| 56 |
+
|
| 57 |
+
#ifdef __cplusplus
|
| 58 |
+
}
|
| 59 |
+
#endif
|
| 60 |
+
#endif
|
data/miniconda3/include/openssl/buffererr.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BUFFERERR_H
|
| 12 |
+
#define OPENSSL_BUFFERERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BUF reason codes.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#endif
|
data/miniconda3/include/openssl/byteorder.h
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BYTEORDER_H
|
| 11 |
+
#define OPENSSL_BYTEORDER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/e_os2.h>
|
| 15 |
+
#include <string.h>
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* "Modern" compilers do a decent job of optimising these functions to just a
|
| 19 |
+
* couple of instruction ([swap +] store, or load [+ swap]) when either no
|
| 20 |
+
* swapping is required, or a suitable swap instruction is available.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
| 24 |
+
#include <stdlib.h>
|
| 25 |
+
#pragma intrinsic(_byteswap_ushort)
|
| 26 |
+
#pragma intrinsic(_byteswap_ulong)
|
| 27 |
+
#pragma intrinsic(_byteswap_uint64)
|
| 28 |
+
#define OSSL_HTOBE16(x) _byteswap_ushort(x)
|
| 29 |
+
#define OSSL_HTOBE32(x) _byteswap_ulong(x)
|
| 30 |
+
#define OSSL_HTOBE64(x) _byteswap_uint64(x)
|
| 31 |
+
#define OSSL_BE16TOH(x) _byteswap_ushort(x)
|
| 32 |
+
#define OSSL_BE32TOH(x) _byteswap_ulong(x)
|
| 33 |
+
#define OSSL_BE64TOH(x) _byteswap_uint64(x)
|
| 34 |
+
#define OSSL_HTOLE16(x) (x)
|
| 35 |
+
#define OSSL_HTOLE32(x) (x)
|
| 36 |
+
#define OSSL_HTOLE64(x) (x)
|
| 37 |
+
#define OSSL_LE16TOH(x) (x)
|
| 38 |
+
#define OSSL_LE32TOH(x) (x)
|
| 39 |
+
#define OSSL_LE64TOH(x) (x)
|
| 40 |
+
|
| 41 |
+
#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
| 42 |
+
#if (__GLIBC_PREREQ(2, 19)) && defined(_DEFAULT_SOURCE)
|
| 43 |
+
#include <endian.h>
|
| 44 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 45 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 46 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 47 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 48 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 49 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 50 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 51 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 52 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 53 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 54 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 55 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
| 59 |
+
#if defined(__OpenBSD__)
|
| 60 |
+
#include <sys/types.h>
|
| 61 |
+
#else
|
| 62 |
+
#include <sys/endian.h>
|
| 63 |
+
#endif
|
| 64 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 65 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 66 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 67 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 68 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 69 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 70 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 71 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 72 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 73 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 74 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 75 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 76 |
+
|
| 77 |
+
#elif defined(__APPLE__)
|
| 78 |
+
#include <libkern/OSByteOrder.h>
|
| 79 |
+
#define OSSL_HTOBE16(x) OSSwapHostToBigInt16(x)
|
| 80 |
+
#define OSSL_HTOBE32(x) OSSwapHostToBigInt32(x)
|
| 81 |
+
#define OSSL_HTOBE64(x) OSSwapHostToBigInt64(x)
|
| 82 |
+
#define OSSL_BE16TOH(x) OSSwapBigToHostInt16(x)
|
| 83 |
+
#define OSSL_BE32TOH(x) OSSwapBigToHostInt32(x)
|
| 84 |
+
#define OSSL_BE64TOH(x) OSSwapBigToHostInt64(x)
|
| 85 |
+
#define OSSL_HTOLE16(x) OSSwapHostToLittleInt16(x)
|
| 86 |
+
#define OSSL_HTOLE32(x) OSSwapHostToLittleInt32(x)
|
| 87 |
+
#define OSSL_HTOLE64(x) OSSwapHostToLittleInt64(x)
|
| 88 |
+
#define OSSL_LE16TOH(x) OSSwapLittleToHostInt16(x)
|
| 89 |
+
#define OSSL_LE32TOH(x) OSSwapLittleToHostInt32(x)
|
| 90 |
+
#define OSSL_LE64TOH(x) OSSwapLittleToHostInt64(x)
|
| 91 |
+
|
| 92 |
+
#endif
|
| 93 |
+
|
| 94 |
+
static ossl_inline ossl_unused unsigned char *
|
| 95 |
+
OPENSSL_store_u16_le(unsigned char *out, uint16_t val)
|
| 96 |
+
{
|
| 97 |
+
#ifdef OSSL_HTOLE16
|
| 98 |
+
uint16_t t = OSSL_HTOLE16(val);
|
| 99 |
+
|
| 100 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 101 |
+
return out + 2;
|
| 102 |
+
#else
|
| 103 |
+
*out++ = (val & 0xff);
|
| 104 |
+
*out++ = (val >> 8) & 0xff;
|
| 105 |
+
return out;
|
| 106 |
+
#endif
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
static ossl_inline ossl_unused unsigned char *
|
| 110 |
+
OPENSSL_store_u16_be(unsigned char *out, uint16_t val)
|
| 111 |
+
{
|
| 112 |
+
#ifdef OSSL_HTOBE16
|
| 113 |
+
uint16_t t = OSSL_HTOBE16(val);
|
| 114 |
+
|
| 115 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 116 |
+
return out + 2;
|
| 117 |
+
#else
|
| 118 |
+
*out++ = (val >> 8) & 0xff;
|
| 119 |
+
*out++ = (val & 0xff);
|
| 120 |
+
return out;
|
| 121 |
+
#endif
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
static ossl_inline ossl_unused unsigned char *
|
| 125 |
+
OPENSSL_store_u32_le(unsigned char *out, uint32_t val)
|
| 126 |
+
{
|
| 127 |
+
#ifdef OSSL_HTOLE32
|
| 128 |
+
uint32_t t = OSSL_HTOLE32(val);
|
| 129 |
+
|
| 130 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 131 |
+
return out + 4;
|
| 132 |
+
#else
|
| 133 |
+
*out++ = (val & 0xff);
|
| 134 |
+
*out++ = (val >> 8) & 0xff;
|
| 135 |
+
*out++ = (val >> 16) & 0xff;
|
| 136 |
+
*out++ = (val >> 24) & 0xff;
|
| 137 |
+
return out;
|
| 138 |
+
#endif
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
static ossl_inline ossl_unused unsigned char *
|
| 142 |
+
OPENSSL_store_u32_be(unsigned char *out, uint32_t val)
|
| 143 |
+
{
|
| 144 |
+
#ifdef OSSL_HTOBE32
|
| 145 |
+
uint32_t t = OSSL_HTOBE32(val);
|
| 146 |
+
|
| 147 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 148 |
+
return out + 4;
|
| 149 |
+
#else
|
| 150 |
+
*out++ = (val >> 24) & 0xff;
|
| 151 |
+
*out++ = (val >> 16) & 0xff;
|
| 152 |
+
*out++ = (val >> 8) & 0xff;
|
| 153 |
+
*out++ = (val & 0xff);
|
| 154 |
+
return out;
|
| 155 |
+
#endif
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
static ossl_inline ossl_unused unsigned char *
|
| 159 |
+
OPENSSL_store_u64_le(unsigned char *out, uint64_t val)
|
| 160 |
+
{
|
| 161 |
+
#ifdef OSSL_HTOLE64
|
| 162 |
+
uint64_t t = OSSL_HTOLE64(val);
|
| 163 |
+
|
| 164 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 165 |
+
return out + 8;
|
| 166 |
+
#else
|
| 167 |
+
*out++ = (val & 0xff);
|
| 168 |
+
*out++ = (val >> 8) & 0xff;
|
| 169 |
+
*out++ = (val >> 16) & 0xff;
|
| 170 |
+
*out++ = (val >> 24) & 0xff;
|
| 171 |
+
*out++ = (val >> 32) & 0xff;
|
| 172 |
+
*out++ = (val >> 40) & 0xff;
|
| 173 |
+
*out++ = (val >> 48) & 0xff;
|
| 174 |
+
*out++ = (val >> 56) & 0xff;
|
| 175 |
+
return out;
|
| 176 |
+
#endif
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
static ossl_inline ossl_unused unsigned char *
|
| 180 |
+
OPENSSL_store_u64_be(unsigned char *out, uint64_t val)
|
| 181 |
+
{
|
| 182 |
+
#ifdef OSSL_HTOLE64
|
| 183 |
+
uint64_t t = OSSL_HTOBE64(val);
|
| 184 |
+
|
| 185 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 186 |
+
return out + 8;
|
| 187 |
+
#else
|
| 188 |
+
*out++ = (val >> 56) & 0xff;
|
| 189 |
+
*out++ = (val >> 48) & 0xff;
|
| 190 |
+
*out++ = (val >> 40) & 0xff;
|
| 191 |
+
*out++ = (val >> 32) & 0xff;
|
| 192 |
+
*out++ = (val >> 24) & 0xff;
|
| 193 |
+
*out++ = (val >> 16) & 0xff;
|
| 194 |
+
*out++ = (val >> 8) & 0xff;
|
| 195 |
+
*out++ = (val & 0xff);
|
| 196 |
+
return out;
|
| 197 |
+
#endif
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 201 |
+
OPENSSL_load_u16_le(uint16_t *val, const unsigned char *in)
|
| 202 |
+
{
|
| 203 |
+
#ifdef OSSL_LE16TOH
|
| 204 |
+
uint16_t t;
|
| 205 |
+
|
| 206 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 207 |
+
*val = OSSL_LE16TOH(t);
|
| 208 |
+
return in + 2;
|
| 209 |
+
#else
|
| 210 |
+
uint16_t b0 = *in++;
|
| 211 |
+
uint16_t b1 = *in++;
|
| 212 |
+
|
| 213 |
+
*val = b0 | (b1 << 8);
|
| 214 |
+
return in;
|
| 215 |
+
#endif
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 219 |
+
OPENSSL_load_u16_be(uint16_t *val, const unsigned char *in)
|
| 220 |
+
{
|
| 221 |
+
#ifdef OSSL_LE16TOH
|
| 222 |
+
uint16_t t;
|
| 223 |
+
|
| 224 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 225 |
+
*val = OSSL_BE16TOH(t);
|
| 226 |
+
return in + 2;
|
| 227 |
+
#else
|
| 228 |
+
uint16_t b1 = *in++;
|
| 229 |
+
uint16_t b0 = *in++;
|
| 230 |
+
|
| 231 |
+
*val = b0 | (b1 << 8);
|
| 232 |
+
return in;
|
| 233 |
+
#endif
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 237 |
+
OPENSSL_load_u32_le(uint32_t *val, const unsigned char *in)
|
| 238 |
+
{
|
| 239 |
+
#ifdef OSSL_LE32TOH
|
| 240 |
+
uint32_t t;
|
| 241 |
+
|
| 242 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 243 |
+
*val = OSSL_LE32TOH(t);
|
| 244 |
+
return in + 4;
|
| 245 |
+
#else
|
| 246 |
+
uint32_t b0 = *in++;
|
| 247 |
+
uint32_t b1 = *in++;
|
| 248 |
+
uint32_t b2 = *in++;
|
| 249 |
+
uint32_t b3 = *in++;
|
| 250 |
+
|
| 251 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 252 |
+
return in;
|
| 253 |
+
#endif
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 257 |
+
OPENSSL_load_u32_be(uint32_t *val, const unsigned char *in)
|
| 258 |
+
{
|
| 259 |
+
#ifdef OSSL_LE32TOH
|
| 260 |
+
uint32_t t;
|
| 261 |
+
|
| 262 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 263 |
+
*val = OSSL_BE32TOH(t);
|
| 264 |
+
return in + 4;
|
| 265 |
+
#else
|
| 266 |
+
uint32_t b3 = *in++;
|
| 267 |
+
uint32_t b2 = *in++;
|
| 268 |
+
uint32_t b1 = *in++;
|
| 269 |
+
uint32_t b0 = *in++;
|
| 270 |
+
|
| 271 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 272 |
+
return in;
|
| 273 |
+
#endif
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 277 |
+
OPENSSL_load_u64_le(uint64_t *val, const unsigned char *in)
|
| 278 |
+
{
|
| 279 |
+
#ifdef OSSL_LE64TOH
|
| 280 |
+
uint64_t t;
|
| 281 |
+
|
| 282 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 283 |
+
*val = OSSL_LE64TOH(t);
|
| 284 |
+
return in + 8;
|
| 285 |
+
#else
|
| 286 |
+
uint64_t b0 = *in++;
|
| 287 |
+
uint64_t b1 = *in++;
|
| 288 |
+
uint64_t b2 = *in++;
|
| 289 |
+
uint64_t b3 = *in++;
|
| 290 |
+
uint64_t b4 = *in++;
|
| 291 |
+
uint64_t b5 = *in++;
|
| 292 |
+
uint64_t b6 = *in++;
|
| 293 |
+
uint64_t b7 = *in++;
|
| 294 |
+
|
| 295 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 296 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 297 |
+
return in;
|
| 298 |
+
#endif
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 302 |
+
OPENSSL_load_u64_be(uint64_t *val, const unsigned char *in)
|
| 303 |
+
{
|
| 304 |
+
#ifdef OSSL_LE64TOH
|
| 305 |
+
uint64_t t;
|
| 306 |
+
|
| 307 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 308 |
+
*val = OSSL_BE64TOH(t);
|
| 309 |
+
return in + 8;
|
| 310 |
+
#else
|
| 311 |
+
uint64_t b7 = *in++;
|
| 312 |
+
uint64_t b6 = *in++;
|
| 313 |
+
uint64_t b5 = *in++;
|
| 314 |
+
uint64_t b4 = *in++;
|
| 315 |
+
uint64_t b3 = *in++;
|
| 316 |
+
uint64_t b2 = *in++;
|
| 317 |
+
uint64_t b1 = *in++;
|
| 318 |
+
uint64_t b0 = *in++;
|
| 319 |
+
|
| 320 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 321 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 322 |
+
return in;
|
| 323 |
+
#endif
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
#undef OSSL_HTOBE16
|
| 327 |
+
#undef OSSL_HTOBE32
|
| 328 |
+
#undef OSSL_HTOBE64
|
| 329 |
+
#undef OSSL_BE16TOH
|
| 330 |
+
#undef OSSL_BE32TOH
|
| 331 |
+
#undef OSSL_BE64TOH
|
| 332 |
+
#undef OSSL_HTOLE16
|
| 333 |
+
#undef OSSL_HTOLE32
|
| 334 |
+
#undef OSSL_HTOLE64
|
| 335 |
+
#undef OSSL_LE16TOH
|
| 336 |
+
#undef OSSL_LE32TOH
|
| 337 |
+
#undef OSSL_LE64TOH
|
| 338 |
+
|
| 339 |
+
#endif
|
data/miniconda3/include/openssl/camellia.h
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CAMELLIA_H
|
| 11 |
+
#define OPENSSL_CAMELLIA_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAMELLIA_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAMELLIA
|
| 22 |
+
#include <stddef.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define CAMELLIA_BLOCK_SIZE 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAMELLIA_ENCRYPT 1
|
| 32 |
+
#define CAMELLIA_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Because array size can't be a const in C, the following two are macros.
|
| 36 |
+
* Both sizes are in bytes.
|
| 37 |
+
*/
|
| 38 |
+
|
| 39 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 40 |
+
|
| 41 |
+
#define CAMELLIA_TABLE_BYTE_LEN 272
|
| 42 |
+
#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
| 43 |
+
|
| 44 |
+
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
|
| 45 |
+
* with WORD */
|
| 46 |
+
|
| 47 |
+
struct camellia_key_st {
|
| 48 |
+
union {
|
| 49 |
+
double d; /* ensures 64-bit align */
|
| 50 |
+
KEY_TABLE_TYPE rd_key;
|
| 51 |
+
} u;
|
| 52 |
+
int grand_rounds;
|
| 53 |
+
};
|
| 54 |
+
typedef struct camellia_key_st CAMELLIA_KEY;
|
| 55 |
+
|
| 56 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 57 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey,
|
| 59 |
+
const int bits,
|
| 60 |
+
CAMELLIA_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
const CAMELLIA_KEY *key);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in,
|
| 65 |
+
unsigned char *out,
|
| 66 |
+
const CAMELLIA_KEY *key);
|
| 67 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in,
|
| 68 |
+
unsigned char *out,
|
| 69 |
+
const CAMELLIA_KEY *key,
|
| 70 |
+
const int enc);
|
| 71 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in,
|
| 72 |
+
unsigned char *out,
|
| 73 |
+
size_t length,
|
| 74 |
+
const CAMELLIA_KEY *key,
|
| 75 |
+
unsigned char *ivec,
|
| 76 |
+
const int enc);
|
| 77 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in,
|
| 78 |
+
unsigned char *out,
|
| 79 |
+
size_t length,
|
| 80 |
+
const CAMELLIA_KEY *key,
|
| 81 |
+
unsigned char *ivec,
|
| 82 |
+
int *num,
|
| 83 |
+
const int enc);
|
| 84 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in,
|
| 85 |
+
unsigned char *out,
|
| 86 |
+
size_t length,
|
| 87 |
+
const CAMELLIA_KEY *key,
|
| 88 |
+
unsigned char *ivec,
|
| 89 |
+
int *num,
|
| 90 |
+
const int enc);
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in,
|
| 92 |
+
unsigned char *out,
|
| 93 |
+
size_t length,
|
| 94 |
+
const CAMELLIA_KEY *key,
|
| 95 |
+
unsigned char *ivec,
|
| 96 |
+
int *num,
|
| 97 |
+
const int enc);
|
| 98 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in,
|
| 99 |
+
unsigned char *out,
|
| 100 |
+
size_t length,
|
| 101 |
+
const CAMELLIA_KEY *key,
|
| 102 |
+
unsigned char *ivec,
|
| 103 |
+
int *num);
|
| 104 |
+
OSSL_DEPRECATEDIN_3_0
|
| 105 |
+
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
| 106 |
+
size_t length, const CAMELLIA_KEY *key,
|
| 107 |
+
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
| 108 |
+
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
| 109 |
+
unsigned int *num);
|
| 110 |
+
#endif
|
| 111 |
+
|
| 112 |
+
#ifdef __cplusplus
|
| 113 |
+
}
|
| 114 |
+
#endif
|
| 115 |
+
#endif
|
| 116 |
+
|
| 117 |
+
#endif
|
data/miniconda3/include/openssl/cast.h
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CAST_H
|
| 11 |
+
#define OPENSSL_CAST_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAST_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAST
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define CAST_BLOCK 8
|
| 27 |
+
#define CAST_KEY_LENGTH 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAST_ENCRYPT 1
|
| 32 |
+
#define CAST_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
#define CAST_LONG unsigned int
|
| 35 |
+
|
| 36 |
+
typedef struct cast_key_st {
|
| 37 |
+
CAST_LONG data[32];
|
| 38 |
+
int short_key; /* Use reduced rounds for short key */
|
| 39 |
+
} CAST_KEY;
|
| 40 |
+
|
| 41 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 42 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 43 |
+
OSSL_DEPRECATEDIN_3_0
|
| 44 |
+
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
| 45 |
+
OSSL_DEPRECATEDIN_3_0
|
| 46 |
+
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 47 |
+
const CAST_KEY *key, int enc);
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0
|
| 49 |
+
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0
|
| 51 |
+
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 54 |
+
long length, const CAST_KEY *ks, unsigned char *iv,
|
| 55 |
+
int enc);
|
| 56 |
+
OSSL_DEPRECATEDIN_3_0
|
| 57 |
+
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 58 |
+
long length, const CAST_KEY *schedule,
|
| 59 |
+
unsigned char *ivec, int *num, int enc);
|
| 60 |
+
OSSL_DEPRECATEDIN_3_0
|
| 61 |
+
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 62 |
+
long length, const CAST_KEY *schedule,
|
| 63 |
+
unsigned char *ivec, int *num);
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#ifdef __cplusplus
|
| 67 |
+
}
|
| 68 |
+
#endif
|
| 69 |
+
#endif
|
| 70 |
+
|
| 71 |
+
#endif
|
data/miniconda3/include/openssl/cmp_util.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright Nokia 2007-2019
|
| 4 |
+
* Copyright Siemens AG 2015-2019
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_CMP_UTIL_H
|
| 13 |
+
#define OPENSSL_CMP_UTIL_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/opensslconf.h>
|
| 17 |
+
#ifndef OPENSSL_NO_CMP
|
| 18 |
+
|
| 19 |
+
#include <openssl/macros.h>
|
| 20 |
+
#include <openssl/trace.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
int OSSL_CMP_log_open(void);
|
| 27 |
+
void OSSL_CMP_log_close(void);
|
| 28 |
+
#define OSSL_CMP_LOG_PREFIX "CMP "
|
| 29 |
+
|
| 30 |
+
/*
|
| 31 |
+
* generalized logging/error callback mirroring the severity levels of syslog.h
|
| 32 |
+
*/
|
| 33 |
+
typedef int OSSL_CMP_severity;
|
| 34 |
+
#define OSSL_CMP_LOG_EMERG 0
|
| 35 |
+
#define OSSL_CMP_LOG_ALERT 1
|
| 36 |
+
#define OSSL_CMP_LOG_CRIT 2
|
| 37 |
+
#define OSSL_CMP_LOG_ERR 3
|
| 38 |
+
#define OSSL_CMP_LOG_WARNING 4
|
| 39 |
+
#define OSSL_CMP_LOG_NOTICE 5
|
| 40 |
+
#define OSSL_CMP_LOG_INFO 6
|
| 41 |
+
#define OSSL_CMP_LOG_DEBUG 7
|
| 42 |
+
#define OSSL_CMP_LOG_TRACE 8
|
| 43 |
+
#define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE
|
| 44 |
+
typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
|
| 45 |
+
OSSL_CMP_severity level, const char *msg);
|
| 46 |
+
|
| 47 |
+
int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
|
| 48 |
+
int line, OSSL_CMP_severity level, const char *msg);
|
| 49 |
+
/* use of the logging callback for outputting error queue */
|
| 50 |
+
void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
|
| 51 |
+
|
| 52 |
+
#ifdef __cplusplus
|
| 53 |
+
}
|
| 54 |
+
#endif
|
| 55 |
+
#endif /* !defined(OPENSSL_NO_CMP) */
|
| 56 |
+
#endif /* !defined(OPENSSL_CMP_UTIL_H) */
|
data/miniconda3/include/openssl/cms.h
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cms.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMS_H
|
| 18 |
+
#define OPENSSL_CMS_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CMS_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/opensslconf.h>
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_CMS
|
| 29 |
+
#include <openssl/x509.h>
|
| 30 |
+
#include <openssl/x509v3.h>
|
| 31 |
+
#include <openssl/cmserr.h>
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
| 37 |
+
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
| 38 |
+
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
| 39 |
+
typedef struct CMS_SignedData_st CMS_SignedData;
|
| 40 |
+
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
| 41 |
+
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
| 42 |
+
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
| 43 |
+
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
|
| 44 |
+
typedef struct CMS_Receipt_st CMS_Receipt;
|
| 45 |
+
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
| 46 |
+
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
| 47 |
+
|
| 48 |
+
/* clang-format off */
|
| 49 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
| 50 |
+
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 51 |
+
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
| 52 |
+
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 53 |
+
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
|
| 54 |
+
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
|
| 55 |
+
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
| 56 |
+
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 57 |
+
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 58 |
+
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
| 59 |
+
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 60 |
+
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 61 |
+
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 62 |
+
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 63 |
+
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 64 |
+
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
| 65 |
+
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
| 66 |
+
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 67 |
+
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 68 |
+
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 69 |
+
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
| 70 |
+
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 71 |
+
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 72 |
+
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
| 73 |
+
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
| 74 |
+
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 75 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
| 76 |
+
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 77 |
+
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
| 78 |
+
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 79 |
+
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
|
| 80 |
+
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
|
| 81 |
+
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
| 82 |
+
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 83 |
+
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 84 |
+
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
| 85 |
+
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 86 |
+
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 87 |
+
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 88 |
+
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 89 |
+
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 90 |
+
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
| 91 |
+
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
| 92 |
+
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 93 |
+
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 94 |
+
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 95 |
+
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
| 96 |
+
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 97 |
+
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 98 |
+
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 99 |
+
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
| 100 |
+
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 101 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
| 102 |
+
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 103 |
+
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
| 104 |
+
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 105 |
+
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
|
| 106 |
+
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
|
| 107 |
+
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
| 108 |
+
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 109 |
+
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 110 |
+
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
| 111 |
+
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 112 |
+
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 113 |
+
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 114 |
+
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 115 |
+
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 116 |
+
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
| 117 |
+
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
| 118 |
+
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 119 |
+
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 120 |
+
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 121 |
+
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
| 122 |
+
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 123 |
+
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 124 |
+
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
| 125 |
+
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
| 126 |
+
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 127 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
| 128 |
+
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 129 |
+
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
| 130 |
+
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 131 |
+
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
|
| 132 |
+
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
|
| 133 |
+
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
| 134 |
+
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 135 |
+
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 136 |
+
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
| 137 |
+
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 138 |
+
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 139 |
+
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 140 |
+
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 141 |
+
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 142 |
+
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
| 143 |
+
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
| 144 |
+
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 145 |
+
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 146 |
+
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 147 |
+
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
| 148 |
+
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 149 |
+
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 150 |
+
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 151 |
+
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
| 152 |
+
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 153 |
+
|
| 154 |
+
/* clang-format on */
|
| 155 |
+
|
| 156 |
+
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
| 157 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
| 158 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
| 159 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
| 160 |
+
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
| 161 |
+
|
| 162 |
+
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
| 163 |
+
|
| 164 |
+
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 165 |
+
|
| 166 |
+
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
| 167 |
+
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
| 168 |
+
|
| 169 |
+
#define CMS_RECIPINFO_NONE -1
|
| 170 |
+
#define CMS_RECIPINFO_TRANS 0
|
| 171 |
+
#define CMS_RECIPINFO_AGREE 1
|
| 172 |
+
#define CMS_RECIPINFO_KEK 2
|
| 173 |
+
#define CMS_RECIPINFO_PASS 3
|
| 174 |
+
#define CMS_RECIPINFO_OTHER 4
|
| 175 |
+
#define CMS_RECIPINFO_KEM 5
|
| 176 |
+
|
| 177 |
+
/* S/MIME related flags */
|
| 178 |
+
|
| 179 |
+
#define CMS_TEXT 0x1
|
| 180 |
+
#define CMS_NOCERTS 0x2
|
| 181 |
+
#define CMS_NO_CONTENT_VERIFY 0x4
|
| 182 |
+
#define CMS_NO_ATTR_VERIFY 0x8
|
| 183 |
+
#define CMS_NOSIGS \
|
| 184 |
+
(CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
|
| 185 |
+
#define CMS_NOINTERN 0x10
|
| 186 |
+
#define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
| 187 |
+
#define CMS_NOVERIFY 0x20
|
| 188 |
+
#define CMS_DETACHED 0x40
|
| 189 |
+
#define CMS_BINARY 0x80
|
| 190 |
+
#define CMS_NOATTR 0x100
|
| 191 |
+
#define CMS_NOSMIMECAP 0x200
|
| 192 |
+
#define CMS_NOOLDMIMETYPE 0x400
|
| 193 |
+
#define CMS_CRLFEOL 0x800
|
| 194 |
+
#define CMS_STREAM 0x1000
|
| 195 |
+
#define CMS_NOCRL 0x2000
|
| 196 |
+
#define CMS_PARTIAL 0x4000
|
| 197 |
+
#define CMS_REUSE_DIGEST 0x8000
|
| 198 |
+
#define CMS_USE_KEYID 0x10000
|
| 199 |
+
#define CMS_DEBUG_DECRYPT 0x20000
|
| 200 |
+
#define CMS_KEY_PARAM 0x40000
|
| 201 |
+
#define CMS_ASCIICRLF 0x80000
|
| 202 |
+
#define CMS_CADES 0x100000
|
| 203 |
+
#define CMS_USE_ORIGINATOR_KEYID 0x200000
|
| 204 |
+
#define CMS_NO_SIGNING_TIME 0x400000
|
| 205 |
+
|
| 206 |
+
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
| 207 |
+
|
| 208 |
+
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
| 209 |
+
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
| 210 |
+
|
| 211 |
+
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
| 212 |
+
int CMS_is_detached(CMS_ContentInfo *cms);
|
| 213 |
+
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
| 214 |
+
|
| 215 |
+
#ifdef OPENSSL_PEM_H
|
| 216 |
+
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
| 217 |
+
#endif
|
| 218 |
+
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
| 219 |
+
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
| 220 |
+
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
| 221 |
+
|
| 222 |
+
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
| 223 |
+
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
| 224 |
+
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
| 225 |
+
int flags);
|
| 226 |
+
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
| 227 |
+
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
| 228 |
+
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
| 229 |
+
|
| 230 |
+
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
| 231 |
+
unsigned int flags);
|
| 232 |
+
int CMS_final_digest(CMS_ContentInfo *cms,
|
| 233 |
+
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
| 234 |
+
unsigned int flags);
|
| 235 |
+
|
| 236 |
+
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
| 237 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 238 |
+
unsigned int flags);
|
| 239 |
+
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
| 240 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 241 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 242 |
+
const char *propq);
|
| 243 |
+
|
| 244 |
+
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
| 245 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 246 |
+
STACK_OF(X509) *certs, unsigned int flags);
|
| 247 |
+
|
| 248 |
+
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
| 249 |
+
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
| 250 |
+
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
| 251 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 252 |
+
|
| 253 |
+
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 254 |
+
unsigned int flags);
|
| 255 |
+
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
| 256 |
+
unsigned int flags);
|
| 257 |
+
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
| 258 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 259 |
+
const char *propq);
|
| 260 |
+
|
| 261 |
+
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
| 262 |
+
const unsigned char *key, size_t keylen,
|
| 263 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 264 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
| 265 |
+
const unsigned char *key,
|
| 266 |
+
size_t keylen, unsigned int flags);
|
| 267 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
| 268 |
+
const unsigned char *key,
|
| 269 |
+
size_t keylen, unsigned int flags,
|
| 270 |
+
OSSL_LIB_CTX *libctx,
|
| 271 |
+
const char *propq);
|
| 272 |
+
|
| 273 |
+
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
| 274 |
+
const unsigned char *key, size_t keylen);
|
| 275 |
+
|
| 276 |
+
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 277 |
+
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
| 278 |
+
|
| 279 |
+
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
| 280 |
+
STACK_OF(X509) *certs,
|
| 281 |
+
X509_STORE *store, unsigned int flags);
|
| 282 |
+
|
| 283 |
+
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
| 284 |
+
|
| 285 |
+
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
| 286 |
+
const EVP_CIPHER *cipher, unsigned int flags);
|
| 287 |
+
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 288 |
+
const EVP_CIPHER *cipher, unsigned int flags,
|
| 289 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 290 |
+
|
| 291 |
+
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
| 292 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 293 |
+
|
| 294 |
+
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
| 295 |
+
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
| 296 |
+
X509 *cert, X509 *peer);
|
| 297 |
+
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
| 298 |
+
unsigned char *key, size_t keylen,
|
| 299 |
+
const unsigned char *id, size_t idlen);
|
| 300 |
+
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
| 301 |
+
unsigned char *pass, ossl_ssize_t passlen);
|
| 302 |
+
|
| 303 |
+
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
| 304 |
+
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
| 305 |
+
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
| 306 |
+
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
| 307 |
+
CMS_ContentInfo *
|
| 308 |
+
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
| 309 |
+
const char *propq);
|
| 310 |
+
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
| 311 |
+
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
| 312 |
+
OSSL_LIB_CTX *libctx,
|
| 313 |
+
const char *propq);
|
| 314 |
+
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
| 315 |
+
EVP_PKEY *pkey, X509 *cert,
|
| 316 |
+
ASN1_OCTET_STRING *secret, unsigned int flags,
|
| 317 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 318 |
+
|
| 319 |
+
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
| 320 |
+
X509 *recip, unsigned int flags);
|
| 321 |
+
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
| 322 |
+
EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
|
| 323 |
+
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
| 324 |
+
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 325 |
+
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
| 326 |
+
EVP_PKEY **pk, X509 **recip,
|
| 327 |
+
X509_ALGOR **palg);
|
| 328 |
+
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
| 329 |
+
ASN1_OCTET_STRING **keyid,
|
| 330 |
+
X509_NAME **issuer,
|
| 331 |
+
ASN1_INTEGER **sno);
|
| 332 |
+
|
| 333 |
+
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
| 334 |
+
unsigned char *key, size_t keylen,
|
| 335 |
+
unsigned char *id, size_t idlen,
|
| 336 |
+
ASN1_GENERALIZEDTIME *date,
|
| 337 |
+
ASN1_OBJECT *otherTypeId,
|
| 338 |
+
ASN1_TYPE *otherType);
|
| 339 |
+
|
| 340 |
+
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
| 341 |
+
X509_ALGOR **palg,
|
| 342 |
+
ASN1_OCTET_STRING **pid,
|
| 343 |
+
ASN1_GENERALIZEDTIME **pdate,
|
| 344 |
+
ASN1_OBJECT **potherid,
|
| 345 |
+
ASN1_TYPE **pothertype);
|
| 346 |
+
|
| 347 |
+
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
| 348 |
+
unsigned char *key, size_t keylen);
|
| 349 |
+
|
| 350 |
+
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
| 351 |
+
const unsigned char *id, size_t idlen);
|
| 352 |
+
|
| 353 |
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
| 354 |
+
unsigned char *pass,
|
| 355 |
+
ossl_ssize_t passlen);
|
| 356 |
+
|
| 357 |
+
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
| 358 |
+
int iter, int wrap_nid,
|
| 359 |
+
int pbe_nid,
|
| 360 |
+
unsigned char *pass,
|
| 361 |
+
ossl_ssize_t passlen,
|
| 362 |
+
const EVP_CIPHER *kekciph);
|
| 363 |
+
|
| 364 |
+
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 365 |
+
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 366 |
+
|
| 367 |
+
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 368 |
+
unsigned int flags);
|
| 369 |
+
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
| 370 |
+
|
| 371 |
+
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
| 372 |
+
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
| 373 |
+
|
| 374 |
+
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
|
| 375 |
+
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 376 |
+
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 377 |
+
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
|
| 378 |
+
|
| 379 |
+
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
|
| 380 |
+
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 381 |
+
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 382 |
+
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
| 383 |
+
|
| 384 |
+
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
| 385 |
+
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
| 386 |
+
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
| 387 |
+
unsigned int flags);
|
| 388 |
+
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
| 389 |
+
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
| 390 |
+
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
| 391 |
+
|
| 392 |
+
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
| 393 |
+
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
| 394 |
+
ASN1_OCTET_STRING **keyid,
|
| 395 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 396 |
+
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
| 397 |
+
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 398 |
+
unsigned int flags);
|
| 399 |
+
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
| 400 |
+
X509 **signer, X509_ALGOR **pdig,
|
| 401 |
+
X509_ALGOR **psig);
|
| 402 |
+
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
| 403 |
+
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
| 404 |
+
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
| 405 |
+
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
| 406 |
+
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
| 407 |
+
STACK_OF(X509) *scerts, X509_STORE *store,
|
| 408 |
+
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
| 409 |
+
unsigned int flags,
|
| 410 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 411 |
+
|
| 412 |
+
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
| 413 |
+
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
| 414 |
+
int algnid, int keysize);
|
| 415 |
+
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
| 416 |
+
|
| 417 |
+
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
| 418 |
+
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 419 |
+
int lastpos);
|
| 420 |
+
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
| 421 |
+
int lastpos);
|
| 422 |
+
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
| 423 |
+
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
| 424 |
+
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 425 |
+
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 426 |
+
const ASN1_OBJECT *obj, int type,
|
| 427 |
+
const void *bytes, int len);
|
| 428 |
+
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 429 |
+
int nid, int type,
|
| 430 |
+
const void *bytes, int len);
|
| 431 |
+
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 432 |
+
const char *attrname, int type,
|
| 433 |
+
const void *bytes, int len);
|
| 434 |
+
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
| 435 |
+
const ASN1_OBJECT *oid,
|
| 436 |
+
int lastpos, int type);
|
| 437 |
+
|
| 438 |
+
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
| 439 |
+
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 440 |
+
int lastpos);
|
| 441 |
+
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
| 442 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 443 |
+
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
| 444 |
+
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
| 445 |
+
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 446 |
+
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 447 |
+
const ASN1_OBJECT *obj, int type,
|
| 448 |
+
const void *bytes, int len);
|
| 449 |
+
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 450 |
+
int nid, int type,
|
| 451 |
+
const void *bytes, int len);
|
| 452 |
+
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 453 |
+
const char *attrname, int type,
|
| 454 |
+
const void *bytes, int len);
|
| 455 |
+
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
| 456 |
+
int lastpos, int type);
|
| 457 |
+
|
| 458 |
+
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
| 459 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
| 460 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 461 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 462 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
| 463 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
| 464 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 465 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 466 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
| 467 |
+
OSSL_LIB_CTX *libctx);
|
| 468 |
+
|
| 469 |
+
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
| 470 |
+
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
| 471 |
+
ASN1_STRING **pcid,
|
| 472 |
+
int *pallorfirst,
|
| 473 |
+
STACK_OF(GENERAL_NAMES) **plist,
|
| 474 |
+
STACK_OF(GENERAL_NAMES) **prto);
|
| 475 |
+
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
| 476 |
+
X509_ALGOR **palg,
|
| 477 |
+
ASN1_OCTET_STRING **pukm);
|
| 478 |
+
STACK_OF(CMS_RecipientEncryptedKey)
|
| 479 |
+
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
| 480 |
+
|
| 481 |
+
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
| 482 |
+
X509_ALGOR **pubalg,
|
| 483 |
+
ASN1_BIT_STRING **pubkey,
|
| 484 |
+
ASN1_OCTET_STRING **keyid,
|
| 485 |
+
X509_NAME **issuer,
|
| 486 |
+
ASN1_INTEGER **sno);
|
| 487 |
+
|
| 488 |
+
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 489 |
+
|
| 490 |
+
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
| 491 |
+
ASN1_OCTET_STRING **keyid,
|
| 492 |
+
ASN1_GENERALIZEDTIME **tm,
|
| 493 |
+
CMS_OtherKeyAttribute **other,
|
| 494 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 495 |
+
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
| 496 |
+
X509 *cert);
|
| 497 |
+
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 498 |
+
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
| 499 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
| 500 |
+
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
| 501 |
+
CMS_RecipientInfo *ri,
|
| 502 |
+
CMS_RecipientEncryptedKey *rek);
|
| 503 |
+
|
| 504 |
+
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
| 505 |
+
ASN1_OCTET_STRING *ukm, int keylen);
|
| 506 |
+
|
| 507 |
+
int CMS_RecipientInfo_kemri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 508 |
+
int CMS_RecipientInfo_kemri_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 509 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kemri_get0_ctx(CMS_RecipientInfo *ri);
|
| 510 |
+
X509_ALGOR *CMS_RecipientInfo_kemri_get0_kdf_alg(CMS_RecipientInfo *ri);
|
| 511 |
+
int CMS_RecipientInfo_kemri_set_ukm(CMS_RecipientInfo *ri,
|
| 512 |
+
const unsigned char *ukm,
|
| 513 |
+
int ukmLength);
|
| 514 |
+
|
| 515 |
+
/* Backward compatibility for spelling errors. */
|
| 516 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
| 517 |
+
#define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
| 518 |
+
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
| 519 |
+
|
| 520 |
+
#ifdef __cplusplus
|
| 521 |
+
}
|
| 522 |
+
#endif
|
| 523 |
+
#endif
|
| 524 |
+
#endif
|
data/miniconda3/include/openssl/cmserr.h
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CMSERR_H
|
| 12 |
+
#define OPENSSL_CMSERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMS
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CMS reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CMS_R_ADD_SIGNER_ERROR 99
|
| 25 |
+
#define CMS_R_ATTRIBUTE_ERROR 161
|
| 26 |
+
#define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
|
| 27 |
+
#define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
|
| 28 |
+
#define CMS_R_CERTIFICATE_VERIFY_ERROR 100
|
| 29 |
+
#define CMS_R_CIPHER_AEAD_IN_ENVELOPED_DATA 200
|
| 30 |
+
#define CMS_R_CIPHER_AEAD_SET_TAG_ERROR 184
|
| 31 |
+
#define CMS_R_CIPHER_GET_TAG 185
|
| 32 |
+
#define CMS_R_CIPHER_INITIALISATION_ERROR 101
|
| 33 |
+
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
|
| 34 |
+
#define CMS_R_CMS_DATAFINAL_ERROR 103
|
| 35 |
+
#define CMS_R_CMS_LIB 104
|
| 36 |
+
#define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
|
| 37 |
+
#define CMS_R_CONTENT_NOT_FOUND 105
|
| 38 |
+
#define CMS_R_CONTENT_TYPE_MISMATCH 171
|
| 39 |
+
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
|
| 40 |
+
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
|
| 41 |
+
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
|
| 42 |
+
#define CMS_R_CONTENT_VERIFY_ERROR 109
|
| 43 |
+
#define CMS_R_CTRL_ERROR 110
|
| 44 |
+
#define CMS_R_CTRL_FAILURE 111
|
| 45 |
+
#define CMS_R_DECODE_ERROR 187
|
| 46 |
+
#define CMS_R_DECRYPT_ERROR 112
|
| 47 |
+
#define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
|
| 48 |
+
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
|
| 49 |
+
#define CMS_R_ERROR_SETTING_KEY 115
|
| 50 |
+
#define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
|
| 51 |
+
#define CMS_R_ERROR_UNSUPPORTED_STATIC_KEY_AGREEMENT 196
|
| 52 |
+
#define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR 183
|
| 53 |
+
#define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
|
| 54 |
+
#define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
|
| 55 |
+
#define CMS_R_INVALID_KEY_LENGTH 118
|
| 56 |
+
#define CMS_R_INVALID_LABEL 190
|
| 57 |
+
#define CMS_R_INVALID_OAEP_PARAMETERS 191
|
| 58 |
+
#define CMS_R_KDF_PARAMETER_ERROR 186
|
| 59 |
+
#define CMS_R_MD_BIO_INIT_ERROR 119
|
| 60 |
+
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
|
| 61 |
+
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
|
| 62 |
+
#define CMS_R_MSGSIGDIGEST_ERROR 172
|
| 63 |
+
#define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
|
| 64 |
+
#define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
|
| 65 |
+
#define CMS_R_NEED_ONE_SIGNER 164
|
| 66 |
+
#define CMS_R_NOT_A_SIGNED_RECEIPT 165
|
| 67 |
+
#define CMS_R_NOT_ENCRYPTED_DATA 122
|
| 68 |
+
#define CMS_R_NOT_KEK 123
|
| 69 |
+
#define CMS_R_NOT_KEM 197
|
| 70 |
+
#define CMS_R_NOT_KEY_AGREEMENT 181
|
| 71 |
+
#define CMS_R_NOT_KEY_TRANSPORT 124
|
| 72 |
+
#define CMS_R_NOT_PWRI 177
|
| 73 |
+
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
|
| 74 |
+
#define CMS_R_NO_CIPHER 126
|
| 75 |
+
#define CMS_R_NO_CONTENT 127
|
| 76 |
+
#define CMS_R_NO_CONTENT_TYPE 173
|
| 77 |
+
#define CMS_R_NO_DEFAULT_DIGEST 128
|
| 78 |
+
#define CMS_R_NO_DIGEST_SET 129
|
| 79 |
+
#define CMS_R_NO_KEY 130
|
| 80 |
+
#define CMS_R_NO_KEY_OR_CERT 174
|
| 81 |
+
#define CMS_R_NO_MATCHING_DIGEST 131
|
| 82 |
+
#define CMS_R_NO_MATCHING_RECIPIENT 132
|
| 83 |
+
#define CMS_R_NO_MATCHING_SIGNATURE 166
|
| 84 |
+
#define CMS_R_NO_MSGSIGDIGEST 167
|
| 85 |
+
#define CMS_R_NO_PASSWORD 178
|
| 86 |
+
#define CMS_R_NO_PRIVATE_KEY 133
|
| 87 |
+
#define CMS_R_NO_PUBLIC_KEY 134
|
| 88 |
+
#define CMS_R_NO_RECEIPT_REQUEST 168
|
| 89 |
+
#define CMS_R_NO_SIGNERS 135
|
| 90 |
+
#define CMS_R_OPERATION_UNSUPPORTED 182
|
| 91 |
+
#define CMS_R_PEER_KEY_ERROR 188
|
| 92 |
+
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
|
| 93 |
+
#define CMS_R_RECEIPT_DECODE_ERROR 169
|
| 94 |
+
#define CMS_R_RECIPIENT_ERROR 137
|
| 95 |
+
#define CMS_R_SHARED_INFO_ERROR 189
|
| 96 |
+
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
|
| 97 |
+
#define CMS_R_SIGNFINAL_ERROR 139
|
| 98 |
+
#define CMS_R_SMIME_TEXT_ERROR 140
|
| 99 |
+
#define CMS_R_STORE_INIT_ERROR 141
|
| 100 |
+
#define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
|
| 101 |
+
#define CMS_R_TYPE_NOT_DATA 143
|
| 102 |
+
#define CMS_R_TYPE_NOT_DIGESTED_DATA 144
|
| 103 |
+
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
|
| 104 |
+
#define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
|
| 105 |
+
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
|
| 106 |
+
#define CMS_R_UNKNOWN_CIPHER 148
|
| 107 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149
|
| 108 |
+
#define CMS_R_UNKNOWN_ID 150
|
| 109 |
+
#define CMS_R_UNKNOWN_KDF_ALGORITHM 198
|
| 110 |
+
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
|
| 111 |
+
#define CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM 194
|
| 112 |
+
#define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
|
| 113 |
+
#define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE 192
|
| 114 |
+
#define CMS_R_UNSUPPORTED_KDF_ALGORITHM 199
|
| 115 |
+
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
|
| 116 |
+
#define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
|
| 117 |
+
#define CMS_R_UNSUPPORTED_LABEL_SOURCE 193
|
| 118 |
+
#define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155
|
| 119 |
+
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
|
| 120 |
+
#define CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM 195
|
| 121 |
+
#define CMS_R_UNSUPPORTED_TYPE 156
|
| 122 |
+
#define CMS_R_UNWRAP_ERROR 157
|
| 123 |
+
#define CMS_R_UNWRAP_FAILURE 180
|
| 124 |
+
#define CMS_R_VERIFICATION_FAILURE 158
|
| 125 |
+
#define CMS_R_WRAP_ERROR 159
|
| 126 |
+
|
| 127 |
+
#endif
|
| 128 |
+
#endif
|
data/miniconda3/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
/* clang-format off */
|
| 11 |
+
|
| 12 |
+
/* clang-format on */
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_COMP_H
|
| 15 |
+
#define OPENSSL_COMP_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#include <openssl/macros.h>
|
| 19 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
#define HEADER_COMP_H
|
| 21 |
+
#endif
|
| 22 |
+
|
| 23 |
+
#include <openssl/opensslconf.h>
|
| 24 |
+
|
| 25 |
+
#include <openssl/crypto.h>
|
| 26 |
+
#include <openssl/comperr.h>
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
#ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX *comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
#define COMP_zlib_cleanup() \
|
| 54 |
+
while (0) \
|
| 55 |
+
continue
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#ifdef OPENSSL_BIO_H
|
| 59 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 60 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 61 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 67 |
+
|
| 68 |
+
/* clang-format off */
|
| 69 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 70 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 71 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 72 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 73 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 74 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 75 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 76 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 77 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 78 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 79 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 80 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 81 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 82 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 83 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 84 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 85 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 86 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 87 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 88 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 89 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 90 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 91 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 92 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 93 |
+
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
| 94 |
+
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 95 |
+
|
| 96 |
+
/* clang-format on */
|
| 97 |
+
|
| 98 |
+
#ifdef __cplusplus
|
| 99 |
+
}
|
| 100 |
+
#endif
|
| 101 |
+
#endif
|
data/miniconda3/include/openssl/conf.h
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/conf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CONF_H
|
| 18 |
+
#define OPENSSL_CONF_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CONF_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/bio.h>
|
| 27 |
+
#include <openssl/lhash.h>
|
| 28 |
+
#include <openssl/safestack.h>
|
| 29 |
+
#include <openssl/e_os2.h>
|
| 30 |
+
#include <openssl/types.h>
|
| 31 |
+
#include <openssl/conferr.h>
|
| 32 |
+
#ifndef OPENSSL_NO_STDIO
|
| 33 |
+
#include <stdio.h>
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
typedef struct {
|
| 41 |
+
char *section;
|
| 42 |
+
char *name;
|
| 43 |
+
char *value;
|
| 44 |
+
} CONF_VALUE;
|
| 45 |
+
|
| 46 |
+
/* clang-format off */
|
| 47 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
| 48 |
+
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 49 |
+
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
| 50 |
+
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 51 |
+
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
| 52 |
+
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
| 53 |
+
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
| 54 |
+
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
| 55 |
+
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
| 56 |
+
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
| 57 |
+
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
| 58 |
+
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 59 |
+
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 60 |
+
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 61 |
+
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 62 |
+
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
| 63 |
+
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
| 64 |
+
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
| 65 |
+
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 66 |
+
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 67 |
+
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
| 68 |
+
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
| 69 |
+
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 70 |
+
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
| 71 |
+
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
| 72 |
+
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 73 |
+
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
| 74 |
+
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
| 75 |
+
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
| 76 |
+
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
| 77 |
+
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
| 78 |
+
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 79 |
+
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 80 |
+
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
| 81 |
+
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
| 82 |
+
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 83 |
+
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 84 |
+
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 85 |
+
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
| 86 |
+
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
| 87 |
+
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
| 88 |
+
|
| 89 |
+
/* clang-format on */
|
| 90 |
+
|
| 91 |
+
struct conf_st;
|
| 92 |
+
struct conf_method_st;
|
| 93 |
+
typedef struct conf_method_st CONF_METHOD;
|
| 94 |
+
|
| 95 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 96 |
+
#include <openssl/conftypes.h>
|
| 97 |
+
#endif
|
| 98 |
+
|
| 99 |
+
/* Module definitions */
|
| 100 |
+
typedef struct conf_imodule_st CONF_IMODULE;
|
| 101 |
+
typedef struct conf_module_st CONF_MODULE;
|
| 102 |
+
|
| 103 |
+
STACK_OF(CONF_MODULE);
|
| 104 |
+
STACK_OF(CONF_IMODULE);
|
| 105 |
+
|
| 106 |
+
/* DSO module function typedefs */
|
| 107 |
+
typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
|
| 108 |
+
typedef void conf_finish_func(CONF_IMODULE *md);
|
| 109 |
+
|
| 110 |
+
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
| 111 |
+
#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
| 112 |
+
#define CONF_MFLAGS_SILENT 0x4
|
| 113 |
+
#define CONF_MFLAGS_NO_DSO 0x8
|
| 114 |
+
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
| 115 |
+
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
| 116 |
+
|
| 117 |
+
int CONF_set_default_method(CONF_METHOD *meth);
|
| 118 |
+
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
| 119 |
+
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
| 120 |
+
long *eline);
|
| 121 |
+
#ifndef OPENSSL_NO_STDIO
|
| 122 |
+
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
| 123 |
+
long *eline);
|
| 124 |
+
#endif
|
| 125 |
+
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
| 126 |
+
long *eline);
|
| 127 |
+
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
| 128 |
+
const char *section);
|
| 129 |
+
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 130 |
+
const char *name);
|
| 131 |
+
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 132 |
+
const char *name);
|
| 133 |
+
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
| 134 |
+
#ifndef OPENSSL_NO_STDIO
|
| 135 |
+
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
| 136 |
+
#endif
|
| 137 |
+
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
| 138 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 139 |
+
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
| 140 |
+
#endif
|
| 141 |
+
|
| 142 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 143 |
+
#define OPENSSL_no_config() \
|
| 144 |
+
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
| 145 |
+
#endif
|
| 146 |
+
|
| 147 |
+
/*
|
| 148 |
+
* New conf code. The semantics are different from the functions above. If
|
| 149 |
+
* that wasn't the case, the above functions would have been replaced
|
| 150 |
+
*/
|
| 151 |
+
|
| 152 |
+
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
| 153 |
+
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
| 154 |
+
CONF *NCONF_new(CONF_METHOD *meth);
|
| 155 |
+
CONF_METHOD *NCONF_default(void);
|
| 156 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 157 |
+
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
| 158 |
+
#endif
|
| 159 |
+
void NCONF_free(CONF *conf);
|
| 160 |
+
void NCONF_free_data(CONF *conf);
|
| 161 |
+
|
| 162 |
+
int NCONF_load(CONF *conf, const char *file, long *eline);
|
| 163 |
+
#ifndef OPENSSL_NO_STDIO
|
| 164 |
+
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
| 165 |
+
#endif
|
| 166 |
+
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
| 167 |
+
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
| 168 |
+
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
| 169 |
+
const char *section);
|
| 170 |
+
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
| 171 |
+
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
| 172 |
+
long *result);
|
| 173 |
+
#ifndef OPENSSL_NO_STDIO
|
| 174 |
+
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
| 175 |
+
#endif
|
| 176 |
+
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
| 177 |
+
|
| 178 |
+
#define NCONF_get_number(c, g, n, r) NCONF_get_number_e(c, g, n, r)
|
| 179 |
+
|
| 180 |
+
/* Module functions */
|
| 181 |
+
|
| 182 |
+
int CONF_modules_load(const CONF *cnf, const char *appname,
|
| 183 |
+
unsigned long flags);
|
| 184 |
+
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
| 185 |
+
const char *appname, unsigned long flags);
|
| 186 |
+
int CONF_modules_load_file(const char *filename, const char *appname,
|
| 187 |
+
unsigned long flags);
|
| 188 |
+
void CONF_modules_unload(int all);
|
| 189 |
+
void CONF_modules_finish(void);
|
| 190 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 191 |
+
#define CONF_modules_free() \
|
| 192 |
+
while (0) \
|
| 193 |
+
continue
|
| 194 |
+
#endif
|
| 195 |
+
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
| 196 |
+
conf_finish_func *ffunc);
|
| 197 |
+
|
| 198 |
+
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
| 199 |
+
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
| 200 |
+
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
| 201 |
+
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
| 202 |
+
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
| 203 |
+
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
| 204 |
+
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
| 205 |
+
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
| 206 |
+
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
| 207 |
+
|
| 208 |
+
char *CONF_get1_default_config_file(void);
|
| 209 |
+
|
| 210 |
+
int CONF_parse_list(const char *list, int sep, int nospc,
|
| 211 |
+
int (*list_cb)(const char *elem, int len, void *usr),
|
| 212 |
+
void *arg);
|
| 213 |
+
|
| 214 |
+
void OPENSSL_load_builtin_modules(void);
|
| 215 |
+
|
| 216 |
+
#ifdef __cplusplus
|
| 217 |
+
}
|
| 218 |
+
#endif
|
| 219 |
+
#endif
|
data/miniconda3/include/openssl/conf_api.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CONF_API_H
|
| 11 |
+
#define OPENSSL_CONF_API_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CONF_API_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/lhash.h>
|
| 20 |
+
#include <openssl/conf.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/* Up until OpenSSL 0.9.5a, this was new_section */
|
| 27 |
+
CONF_VALUE *_CONF_new_section(CONF *conf, const char *section);
|
| 28 |
+
/* Up until OpenSSL 0.9.5a, this was get_section */
|
| 29 |
+
CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);
|
| 30 |
+
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
|
| 31 |
+
STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
|
| 32 |
+
const char *section);
|
| 33 |
+
|
| 34 |
+
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
|
| 35 |
+
char *_CONF_get_string(const CONF *conf, const char *section,
|
| 36 |
+
const char *name);
|
| 37 |
+
long _CONF_get_number(const CONF *conf, const char *section,
|
| 38 |
+
const char *name);
|
| 39 |
+
|
| 40 |
+
int _CONF_new_data(CONF *conf);
|
| 41 |
+
void _CONF_free_data(CONF *conf);
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
}
|
| 45 |
+
#endif
|
| 46 |
+
#endif
|
data/miniconda3/include/openssl/conferr.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CONFERR_H
|
| 12 |
+
#define OPENSSL_CONFERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* CONF reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define CONF_R_ERROR_LOADING_DSO 110
|
| 23 |
+
#define CONF_R_INVALID_PRAGMA 122
|
| 24 |
+
#define CONF_R_LIST_CANNOT_BE_NULL 115
|
| 25 |
+
#define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123
|
| 26 |
+
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
| 27 |
+
#define CONF_R_MISSING_EQUAL_SIGN 101
|
| 28 |
+
#define CONF_R_MISSING_INIT_FUNCTION 112
|
| 29 |
+
#define CONF_R_MODULE_INITIALIZATION_ERROR 109
|
| 30 |
+
#define CONF_R_NO_CLOSE_BRACE 102
|
| 31 |
+
#define CONF_R_NO_CONF 105
|
| 32 |
+
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
| 33 |
+
#define CONF_R_NO_SECTION 107
|
| 34 |
+
#define CONF_R_NO_SUCH_FILE 114
|
| 35 |
+
#define CONF_R_NO_VALUE 108
|
| 36 |
+
#define CONF_R_NUMBER_TOO_LARGE 121
|
| 37 |
+
#define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124
|
| 38 |
+
#define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111
|
| 39 |
+
#define CONF_R_RECURSIVE_SECTION_REFERENCE 126
|
| 40 |
+
#define CONF_R_RELATIVE_PATH 125
|
| 41 |
+
#define CONF_R_SSL_COMMAND_SECTION_EMPTY 117
|
| 42 |
+
#define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118
|
| 43 |
+
#define CONF_R_SSL_SECTION_EMPTY 119
|
| 44 |
+
#define CONF_R_SSL_SECTION_NOT_FOUND 120
|
| 45 |
+
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
| 46 |
+
#define CONF_R_UNKNOWN_MODULE_NAME 113
|
| 47 |
+
#define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
|
| 48 |
+
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
| 49 |
+
|
| 50 |
+
#endif
|
data/miniconda3/include/openssl/configuration.h
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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-Makefile.tmpl
|
| 4 |
+
* via Makefile.in
|
| 5 |
+
*
|
| 6 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONFIGURATION_H
|
| 15 |
+
#define OPENSSL_CONFIGURATION_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
#ifdef OPENSSL_ALGORITHM_DEFINES
|
| 23 |
+
#error OPENSSL_ALGORITHM_DEFINES no longer supported
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* OpenSSL was configured with the following options:
|
| 28 |
+
*/
|
| 29 |
+
|
| 30 |
+
/* clang-format off */
|
| 31 |
+
# define OPENSSL_CONFIGURED_API 30600
|
| 32 |
+
# ifndef OPENSSL_RAND_SEED_OS
|
| 33 |
+
# define OPENSSL_RAND_SEED_OS
|
| 34 |
+
# endif
|
| 35 |
+
# ifndef OPENSSL_THREADS
|
| 36 |
+
# define OPENSSL_THREADS
|
| 37 |
+
# endif
|
| 38 |
+
# ifndef OPENSSL_NO_ACVP_TESTS
|
| 39 |
+
# define OPENSSL_NO_ACVP_TESTS
|
| 40 |
+
# endif
|
| 41 |
+
# ifndef OPENSSL_NO_ALLOCFAIL_TESTS
|
| 42 |
+
# define OPENSSL_NO_ALLOCFAIL_TESTS
|
| 43 |
+
# endif
|
| 44 |
+
# ifndef OPENSSL_NO_ASAN
|
| 45 |
+
# define OPENSSL_NO_ASAN
|
| 46 |
+
# endif
|
| 47 |
+
# ifndef OPENSSL_NO_BROTLI
|
| 48 |
+
# define OPENSSL_NO_BROTLI
|
| 49 |
+
# endif
|
| 50 |
+
# ifndef OPENSSL_NO_BROTLI_DYNAMIC
|
| 51 |
+
# define OPENSSL_NO_BROTLI_DYNAMIC
|
| 52 |
+
# endif
|
| 53 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
| 54 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG
|
| 55 |
+
# endif
|
| 56 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 57 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 58 |
+
# endif
|
| 59 |
+
# ifndef OPENSSL_NO_DEMOS
|
| 60 |
+
# define OPENSSL_NO_DEMOS
|
| 61 |
+
# endif
|
| 62 |
+
# ifndef OPENSSL_NO_DEVCRYPTOENG
|
| 63 |
+
# define OPENSSL_NO_DEVCRYPTOENG
|
| 64 |
+
# endif
|
| 65 |
+
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 66 |
+
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 67 |
+
# endif
|
| 68 |
+
# ifndef OPENSSL_NO_EGD
|
| 69 |
+
# define OPENSSL_NO_EGD
|
| 70 |
+
# endif
|
| 71 |
+
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
| 72 |
+
# define OPENSSL_NO_EXTERNAL_TESTS
|
| 73 |
+
# endif
|
| 74 |
+
# ifndef OPENSSL_NO_FIPS_JITTER
|
| 75 |
+
# define OPENSSL_NO_FIPS_JITTER
|
| 76 |
+
# endif
|
| 77 |
+
# ifndef OPENSSL_NO_FIPS_POST
|
| 78 |
+
# define OPENSSL_NO_FIPS_POST
|
| 79 |
+
# endif
|
| 80 |
+
# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 81 |
+
# define OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 82 |
+
# endif
|
| 83 |
+
# ifndef OPENSSL_NO_FUZZ_AFL
|
| 84 |
+
# define OPENSSL_NO_FUZZ_AFL
|
| 85 |
+
# endif
|
| 86 |
+
# ifndef OPENSSL_NO_FUZZ_LIBFUZZER
|
| 87 |
+
# define OPENSSL_NO_FUZZ_LIBFUZZER
|
| 88 |
+
# endif
|
| 89 |
+
# ifndef OPENSSL_NO_H3DEMO
|
| 90 |
+
# define OPENSSL_NO_H3DEMO
|
| 91 |
+
# endif
|
| 92 |
+
# ifndef OPENSSL_NO_HQINTEROP
|
| 93 |
+
# define OPENSSL_NO_HQINTEROP
|
| 94 |
+
# endif
|
| 95 |
+
# ifndef OPENSSL_NO_JITTER
|
| 96 |
+
# define OPENSSL_NO_JITTER
|
| 97 |
+
# endif
|
| 98 |
+
# ifndef OPENSSL_NO_KTLS
|
| 99 |
+
# define OPENSSL_NO_KTLS
|
| 100 |
+
# endif
|
| 101 |
+
# ifndef OPENSSL_NO_LMS
|
| 102 |
+
# define OPENSSL_NO_LMS
|
| 103 |
+
# endif
|
| 104 |
+
# ifndef OPENSSL_NO_LOADERENG
|
| 105 |
+
# define OPENSSL_NO_LOADERENG
|
| 106 |
+
# endif
|
| 107 |
+
# ifndef OPENSSL_NO_MD2
|
| 108 |
+
# define OPENSSL_NO_MD2
|
| 109 |
+
# endif
|
| 110 |
+
# ifndef OPENSSL_NO_MSAN
|
| 111 |
+
# define OPENSSL_NO_MSAN
|
| 112 |
+
# endif
|
| 113 |
+
# ifndef OPENSSL_NO_PIE
|
| 114 |
+
# define OPENSSL_NO_PIE
|
| 115 |
+
# endif
|
| 116 |
+
# ifndef OPENSSL_NO_RC5
|
| 117 |
+
# define OPENSSL_NO_RC5
|
| 118 |
+
# endif
|
| 119 |
+
# ifndef OPENSSL_NO_SCTP
|
| 120 |
+
# define OPENSSL_NO_SCTP
|
| 121 |
+
# endif
|
| 122 |
+
# ifndef OPENSSL_NO_SSL3
|
| 123 |
+
# define OPENSSL_NO_SSL3
|
| 124 |
+
# endif
|
| 125 |
+
# ifndef OPENSSL_NO_SSL3_METHOD
|
| 126 |
+
# define OPENSSL_NO_SSL3_METHOD
|
| 127 |
+
# endif
|
| 128 |
+
# ifndef OPENSSL_NO_SSLKEYLOG
|
| 129 |
+
# define OPENSSL_NO_SSLKEYLOG
|
| 130 |
+
# endif
|
| 131 |
+
# ifndef OPENSSL_NO_TFO
|
| 132 |
+
# define OPENSSL_NO_TFO
|
| 133 |
+
# endif
|
| 134 |
+
# ifndef OPENSSL_NO_TRACE
|
| 135 |
+
# define OPENSSL_NO_TRACE
|
| 136 |
+
# endif
|
| 137 |
+
# ifndef OPENSSL_NO_UBSAN
|
| 138 |
+
# define OPENSSL_NO_UBSAN
|
| 139 |
+
# endif
|
| 140 |
+
# ifndef OPENSSL_NO_UNIT_TEST
|
| 141 |
+
# define OPENSSL_NO_UNIT_TEST
|
| 142 |
+
# endif
|
| 143 |
+
# ifndef OPENSSL_NO_UPLINK
|
| 144 |
+
# define OPENSSL_NO_UPLINK
|
| 145 |
+
# endif
|
| 146 |
+
# ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 147 |
+
# define OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 148 |
+
# endif
|
| 149 |
+
# ifndef OPENSSL_NO_WINSTORE
|
| 150 |
+
# define OPENSSL_NO_WINSTORE
|
| 151 |
+
# endif
|
| 152 |
+
# ifndef OPENSSL_NO_ZLIB
|
| 153 |
+
# define OPENSSL_NO_ZLIB
|
| 154 |
+
# endif
|
| 155 |
+
# ifndef OPENSSL_NO_ZLIB_DYNAMIC
|
| 156 |
+
# define OPENSSL_NO_ZLIB_DYNAMIC
|
| 157 |
+
# endif
|
| 158 |
+
# ifndef OPENSSL_NO_ZSTD
|
| 159 |
+
# define OPENSSL_NO_ZSTD
|
| 160 |
+
# endif
|
| 161 |
+
# ifndef OPENSSL_NO_ZSTD_DYNAMIC
|
| 162 |
+
# define OPENSSL_NO_ZSTD_DYNAMIC
|
| 163 |
+
# endif
|
| 164 |
+
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
| 165 |
+
# define OPENSSL_NO_DYNAMIC_ENGINE
|
| 166 |
+
# endif
|
| 167 |
+
|
| 168 |
+
/* clang-format on */
|
| 169 |
+
|
| 170 |
+
/* Generate 80386 code? */
|
| 171 |
+
/* clang-format off */
|
| 172 |
+
# undef I386_ONLY
|
| 173 |
+
/* clang-format on */
|
| 174 |
+
|
| 175 |
+
/*
|
| 176 |
+
* The following are cipher-specific, but are part of the public API.
|
| 177 |
+
*/
|
| 178 |
+
#if !defined(OPENSSL_SYS_UEFI)
|
| 179 |
+
/* clang-format off */
|
| 180 |
+
# undef BN_LLONG
|
| 181 |
+
/* clang-format on */
|
| 182 |
+
/* Only one for the following should be defined */
|
| 183 |
+
/* clang-format off */
|
| 184 |
+
# define SIXTY_FOUR_BIT_LONG
|
| 185 |
+
/* clang-format on */
|
| 186 |
+
/* clang-format off */
|
| 187 |
+
# undef SIXTY_FOUR_BIT
|
| 188 |
+
/* clang-format on */
|
| 189 |
+
/* clang-format off */
|
| 190 |
+
# undef THIRTY_TWO_BIT
|
| 191 |
+
/* clang-format on */
|
| 192 |
+
#endif
|
| 193 |
+
|
| 194 |
+
/* clang-format off */
|
| 195 |
+
# define RC4_INT unsigned int
|
| 196 |
+
/* clang-format on */
|
| 197 |
+
|
| 198 |
+
#if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
| 199 |
+
#define OPENSSL_NO_COMP_ALG
|
| 200 |
+
#else
|
| 201 |
+
#undef OPENSSL_NO_COMP_ALG
|
| 202 |
+
#endif
|
| 203 |
+
|
| 204 |
+
#ifdef __cplusplus
|
| 205 |
+
}
|
| 206 |
+
#endif
|
| 207 |
+
|
| 208 |
+
#endif /* OPENSSL_CONFIGURATION_H */
|
data/miniconda3/include/openssl/core_dispatch.h
ADDED
|
@@ -0,0 +1,1061 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CORE_NUMBERS_H
|
| 11 |
+
#define OPENSSL_CORE_NUMBERS_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <stdarg.h>
|
| 15 |
+
#include <openssl/core.h>
|
| 16 |
+
#include <openssl/indicator.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* Generic function pointer for provider method arrays, or other contexts where
|
| 24 |
+
* functions of various signatures must occupy a common slot in an array of
|
| 25 |
+
* structures.
|
| 26 |
+
*/
|
| 27 |
+
typedef void (*OSSL_FUNC)(void);
|
| 28 |
+
|
| 29 |
+
/*-
|
| 30 |
+
* Identities
|
| 31 |
+
* ----------
|
| 32 |
+
*
|
| 33 |
+
* All series start with 1, to allow 0 to be an array terminator.
|
| 34 |
+
* For any FUNC identity, we also provide a function signature typedef
|
| 35 |
+
* and a static inline function to extract a function pointer from a
|
| 36 |
+
* OSSL_DISPATCH element in a type safe manner.
|
| 37 |
+
*
|
| 38 |
+
* Names:
|
| 39 |
+
* for any function base name 'foo' (uppercase form 'FOO'), we will have
|
| 40 |
+
* the following:
|
| 41 |
+
* - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
|
| 42 |
+
* thereof (to be specified further down)
|
| 43 |
+
* - a function signature typedef with the name OSSL_FUNC_'foo'_fn
|
| 44 |
+
* - a function pointer extractor function with the name OSSL_FUNC_'foo'
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Helper macro to create the function signature typedef and the extractor
|
| 49 |
+
* |type| is the return-type of the function, |name| is the name of the
|
| 50 |
+
* function to fetch, and |args| is a parenthesized list of parameters
|
| 51 |
+
* for the function (that is, it is |name|'s function signature).
|
| 52 |
+
* Note: This is considered a "reserved" internal macro. Applications should
|
| 53 |
+
* not use this or assume its existence.
|
| 54 |
+
*/
|
| 55 |
+
#define OSSL_CORE_MAKE_FUNC(type, name, args) \
|
| 56 |
+
typedef type(OSSL_FUNC_##name##_fn) args; \
|
| 57 |
+
static ossl_unused ossl_inline \
|
| 58 |
+
OSSL_FUNC_##name##_fn * \
|
| 59 |
+
OSSL_FUNC_##name(const OSSL_DISPATCH *opf) \
|
| 60 |
+
{ \
|
| 61 |
+
return (OSSL_FUNC_##name##_fn *)opf->function; \
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* Core function identities, for the two OSSL_DISPATCH tables being passed
|
| 66 |
+
* in the OSSL_provider_init call.
|
| 67 |
+
*
|
| 68 |
+
* 0 serves as a marker for the end of the OSSL_DISPATCH array, and must
|
| 69 |
+
* therefore NEVER be used as a function identity.
|
| 70 |
+
*/
|
| 71 |
+
/* Functions provided by the Core to the provider, reserved numbers 1-1023 */
|
| 72 |
+
#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
|
| 73 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 74 |
+
core_gettable_params, (const OSSL_CORE_HANDLE *prov))
|
| 75 |
+
#define OSSL_FUNC_CORE_GET_PARAMS 2
|
| 76 |
+
OSSL_CORE_MAKE_FUNC(int, core_get_params, (const OSSL_CORE_HANDLE *prov, OSSL_PARAM params[]))
|
| 77 |
+
#define OSSL_FUNC_CORE_THREAD_START 3
|
| 78 |
+
OSSL_CORE_MAKE_FUNC(int, core_thread_start, (const OSSL_CORE_HANDLE *prov, OSSL_thread_stop_handler_fn handfn, void *arg))
|
| 79 |
+
#define OSSL_FUNC_CORE_GET_LIBCTX 4
|
| 80 |
+
OSSL_CORE_MAKE_FUNC(OPENSSL_CORE_CTX *, core_get_libctx,
|
| 81 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 82 |
+
#define OSSL_FUNC_CORE_NEW_ERROR 5
|
| 83 |
+
OSSL_CORE_MAKE_FUNC(void, core_new_error, (const OSSL_CORE_HANDLE *prov))
|
| 84 |
+
#define OSSL_FUNC_CORE_SET_ERROR_DEBUG 6
|
| 85 |
+
OSSL_CORE_MAKE_FUNC(void, core_set_error_debug,
|
| 86 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 87 |
+
const char *file, int line, const char *func))
|
| 88 |
+
#define OSSL_FUNC_CORE_VSET_ERROR 7
|
| 89 |
+
OSSL_CORE_MAKE_FUNC(void, core_vset_error,
|
| 90 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 91 |
+
uint32_t reason, const char *fmt, va_list args))
|
| 92 |
+
#define OSSL_FUNC_CORE_SET_ERROR_MARK 8
|
| 93 |
+
OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_CORE_HANDLE *prov))
|
| 94 |
+
#define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK 9
|
| 95 |
+
OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
|
| 96 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 97 |
+
#define OSSL_FUNC_CORE_POP_ERROR_TO_MARK 10
|
| 98 |
+
OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 99 |
+
|
| 100 |
+
/* Functions to access the OBJ database */
|
| 101 |
+
|
| 102 |
+
#define OSSL_FUNC_CORE_OBJ_ADD_SIGID 11
|
| 103 |
+
#define OSSL_FUNC_CORE_OBJ_CREATE 12
|
| 104 |
+
|
| 105 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_add_sigid,
|
| 106 |
+
(const OSSL_CORE_HANDLE *prov, const char *sign_name,
|
| 107 |
+
const char *digest_name, const char *pkey_name))
|
| 108 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_create,
|
| 109 |
+
(const OSSL_CORE_HANDLE *prov, const char *oid,
|
| 110 |
+
const char *sn, const char *ln))
|
| 111 |
+
|
| 112 |
+
/* Memory allocation, freeing, clearing. */
|
| 113 |
+
#define OSSL_FUNC_CRYPTO_MALLOC 20
|
| 114 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 115 |
+
CRYPTO_malloc, (size_t num, const char *file, int line))
|
| 116 |
+
#define OSSL_FUNC_CRYPTO_ZALLOC 21
|
| 117 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 118 |
+
CRYPTO_zalloc, (size_t num, const char *file, int line))
|
| 119 |
+
#define OSSL_FUNC_CRYPTO_FREE 22
|
| 120 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 121 |
+
CRYPTO_free, (void *ptr, const char *file, int line))
|
| 122 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_FREE 23
|
| 123 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 124 |
+
CRYPTO_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 125 |
+
#define OSSL_FUNC_CRYPTO_REALLOC 24
|
| 126 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 127 |
+
CRYPTO_realloc, (void *addr, size_t num, const char *file, int line))
|
| 128 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_REALLOC 25
|
| 129 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 130 |
+
CRYPTO_clear_realloc, (void *addr, size_t old_num, size_t num, const char *file, int line))
|
| 131 |
+
#define OSSL_FUNC_CRYPTO_SECURE_MALLOC 26
|
| 132 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 133 |
+
CRYPTO_secure_malloc, (size_t num, const char *file, int line))
|
| 134 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ZALLOC 27
|
| 135 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 136 |
+
CRYPTO_secure_zalloc, (size_t num, const char *file, int line))
|
| 137 |
+
#define OSSL_FUNC_CRYPTO_SECURE_FREE 28
|
| 138 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 139 |
+
CRYPTO_secure_free, (void *ptr, const char *file, int line))
|
| 140 |
+
#define OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE 29
|
| 141 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 142 |
+
CRYPTO_secure_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 143 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ALLOCATED 30
|
| 144 |
+
OSSL_CORE_MAKE_FUNC(int,
|
| 145 |
+
CRYPTO_secure_allocated, (const void *ptr))
|
| 146 |
+
#define OSSL_FUNC_OPENSSL_CLEANSE 31
|
| 147 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 148 |
+
OPENSSL_cleanse, (void *ptr, size_t len))
|
| 149 |
+
|
| 150 |
+
/* Bio functions provided by the core */
|
| 151 |
+
#define OSSL_FUNC_BIO_NEW_FILE 40
|
| 152 |
+
#define OSSL_FUNC_BIO_NEW_MEMBUF 41
|
| 153 |
+
#define OSSL_FUNC_BIO_READ_EX 42
|
| 154 |
+
#define OSSL_FUNC_BIO_WRITE_EX 43
|
| 155 |
+
#define OSSL_FUNC_BIO_UP_REF 44
|
| 156 |
+
#define OSSL_FUNC_BIO_FREE 45
|
| 157 |
+
#define OSSL_FUNC_BIO_VPRINTF 46
|
| 158 |
+
#define OSSL_FUNC_BIO_VSNPRINTF 47
|
| 159 |
+
#define OSSL_FUNC_BIO_PUTS 48
|
| 160 |
+
#define OSSL_FUNC_BIO_GETS 49
|
| 161 |
+
#define OSSL_FUNC_BIO_CTRL 50
|
| 162 |
+
|
| 163 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_file, (const char *filename, const char *mode))
|
| 164 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_membuf, (const void *buf, int len))
|
| 165 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (OSSL_CORE_BIO *bio, void *data, size_t data_len, size_t *bytes_read))
|
| 166 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_write_ex, (OSSL_CORE_BIO *bio, const void *data, size_t data_len, size_t *written))
|
| 167 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_gets, (OSSL_CORE_BIO *bio, char *buf, int size))
|
| 168 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_puts, (OSSL_CORE_BIO *bio, const char *str))
|
| 169 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_up_ref, (OSSL_CORE_BIO *bio))
|
| 170 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_free, (OSSL_CORE_BIO *bio))
|
| 171 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (OSSL_CORE_BIO *bio, const char *format, va_list args))
|
| 172 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
|
| 173 |
+
(char *buf, size_t n, const char *fmt, va_list args))
|
| 174 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_ctrl, (OSSL_CORE_BIO *bio, int cmd, long num, void *ptr))
|
| 175 |
+
|
| 176 |
+
/* New seeding functions prototypes with the 101-104 series */
|
| 177 |
+
#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
|
| 178 |
+
#define OSSL_FUNC_CLEANUP_USER_NONCE 97
|
| 179 |
+
#define OSSL_FUNC_GET_USER_ENTROPY 98
|
| 180 |
+
#define OSSL_FUNC_GET_USER_NONCE 99
|
| 181 |
+
|
| 182 |
+
#define OSSL_FUNC_INDICATOR_CB 95
|
| 183 |
+
OSSL_CORE_MAKE_FUNC(void, indicator_cb, (OPENSSL_CORE_CTX *ctx, OSSL_INDICATOR_CALLBACK **cb))
|
| 184 |
+
#define OSSL_FUNC_SELF_TEST_CB 100
|
| 185 |
+
OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb, void **cbarg))
|
| 186 |
+
|
| 187 |
+
/* Functions to get seed material from the operating system */
|
| 188 |
+
#define OSSL_FUNC_GET_ENTROPY 101
|
| 189 |
+
#define OSSL_FUNC_CLEANUP_ENTROPY 102
|
| 190 |
+
#define OSSL_FUNC_GET_NONCE 103
|
| 191 |
+
#define OSSL_FUNC_CLEANUP_NONCE 104
|
| 192 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 193 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 194 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 195 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 196 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 197 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 198 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 199 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 200 |
+
|
| 201 |
+
/* Functions to access the core's providers */
|
| 202 |
+
#define OSSL_FUNC_PROVIDER_REGISTER_CHILD_CB 105
|
| 203 |
+
#define OSSL_FUNC_PROVIDER_DEREGISTER_CHILD_CB 106
|
| 204 |
+
#define OSSL_FUNC_PROVIDER_NAME 107
|
| 205 |
+
#define OSSL_FUNC_PROVIDER_GET0_PROVIDER_CTX 108
|
| 206 |
+
#define OSSL_FUNC_PROVIDER_GET0_DISPATCH 109
|
| 207 |
+
#define OSSL_FUNC_PROVIDER_UP_REF 110
|
| 208 |
+
#define OSSL_FUNC_PROVIDER_FREE 111
|
| 209 |
+
|
| 210 |
+
OSSL_CORE_MAKE_FUNC(int, provider_register_child_cb,
|
| 211 |
+
(const OSSL_CORE_HANDLE *handle,
|
| 212 |
+
int (*create_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 213 |
+
int (*remove_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 214 |
+
int (*global_props_cb)(const char *props, void *cbdata),
|
| 215 |
+
void *cbdata))
|
| 216 |
+
OSSL_CORE_MAKE_FUNC(void, provider_deregister_child_cb,
|
| 217 |
+
(const OSSL_CORE_HANDLE *handle))
|
| 218 |
+
OSSL_CORE_MAKE_FUNC(const char *, provider_name,
|
| 219 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 220 |
+
OSSL_CORE_MAKE_FUNC(void *, provider_get0_provider_ctx,
|
| 221 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 222 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_DISPATCH *, provider_get0_dispatch,
|
| 223 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 224 |
+
OSSL_CORE_MAKE_FUNC(int, provider_up_ref,
|
| 225 |
+
(const OSSL_CORE_HANDLE *prov, int activate))
|
| 226 |
+
OSSL_CORE_MAKE_FUNC(int, provider_free,
|
| 227 |
+
(const OSSL_CORE_HANDLE *prov, int deactivate))
|
| 228 |
+
|
| 229 |
+
/* Additional error functions provided by the core */
|
| 230 |
+
#define OSSL_FUNC_CORE_COUNT_TO_MARK 120
|
| 231 |
+
OSSL_CORE_MAKE_FUNC(int, core_count_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 232 |
+
|
| 233 |
+
/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
|
| 234 |
+
#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
|
| 235 |
+
OSSL_CORE_MAKE_FUNC(void, provider_teardown, (void *provctx))
|
| 236 |
+
#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
|
| 237 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 238 |
+
provider_gettable_params, (void *provctx))
|
| 239 |
+
#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
|
| 240 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_params, (void *provctx, OSSL_PARAM params[]))
|
| 241 |
+
#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
|
| 242 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *, provider_query_operation,
|
| 243 |
+
(void *provctx, int operation_id, int *no_store))
|
| 244 |
+
#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
|
| 245 |
+
OSSL_CORE_MAKE_FUNC(void, provider_unquery_operation,
|
| 246 |
+
(void *provctx, int operation_id, const OSSL_ALGORITHM *))
|
| 247 |
+
#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
|
| 248 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *, provider_get_reason_strings,
|
| 249 |
+
(void *provctx))
|
| 250 |
+
#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
|
| 251 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_capabilities, (void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg))
|
| 252 |
+
#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
|
| 253 |
+
OSSL_CORE_MAKE_FUNC(int, provider_self_test, (void *provctx))
|
| 254 |
+
#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
|
| 255 |
+
OSSL_CORE_MAKE_FUNC(int, provider_random_bytes, (void *provctx, int which, void *buf, size_t n, unsigned int strength))
|
| 256 |
+
|
| 257 |
+
/* Libssl related functions */
|
| 258 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_SEND 2001
|
| 259 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_send,
|
| 260 |
+
(SSL *s, const unsigned char *buf, size_t buf_len,
|
| 261 |
+
size_t *consumed, void *arg))
|
| 262 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RECV_RCD 2002
|
| 263 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_recv_rcd,
|
| 264 |
+
(SSL *s, const unsigned char **buf, size_t *bytes_read,
|
| 265 |
+
void *arg))
|
| 266 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RELEASE_RCD 2003
|
| 267 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_release_rcd,
|
| 268 |
+
(SSL *s, size_t bytes_read, void *arg))
|
| 269 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_YIELD_SECRET 2004
|
| 270 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_yield_secret,
|
| 271 |
+
(SSL *s, uint32_t prot_level, int direction,
|
| 272 |
+
const unsigned char *secret, size_t secret_len, void *arg))
|
| 273 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_GOT_TRANSPORT_PARAMS 2005
|
| 274 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_got_transport_params,
|
| 275 |
+
(SSL *s, const unsigned char *params, size_t params_len,
|
| 276 |
+
void *arg))
|
| 277 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_ALERT 2006
|
| 278 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_alert,
|
| 279 |
+
(SSL *s, unsigned char alert_code, void *arg))
|
| 280 |
+
|
| 281 |
+
/* Operations */
|
| 282 |
+
|
| 283 |
+
#define OSSL_OP_DIGEST 1
|
| 284 |
+
#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
|
| 285 |
+
#define OSSL_OP_MAC 3
|
| 286 |
+
#define OSSL_OP_KDF 4
|
| 287 |
+
#define OSSL_OP_RAND 5
|
| 288 |
+
#define OSSL_OP_KEYMGMT 10
|
| 289 |
+
#define OSSL_OP_KEYEXCH 11
|
| 290 |
+
#define OSSL_OP_SIGNATURE 12
|
| 291 |
+
#define OSSL_OP_ASYM_CIPHER 13
|
| 292 |
+
#define OSSL_OP_KEM 14
|
| 293 |
+
#define OSSL_OP_SKEYMGMT 15
|
| 294 |
+
/* New section for non-EVP operations */
|
| 295 |
+
#define OSSL_OP_ENCODER 20
|
| 296 |
+
#define OSSL_OP_DECODER 21
|
| 297 |
+
#define OSSL_OP_STORE 22
|
| 298 |
+
/* Highest known operation number */
|
| 299 |
+
#define OSSL_OP__HIGHEST 22
|
| 300 |
+
|
| 301 |
+
/* Digests */
|
| 302 |
+
|
| 303 |
+
#define OSSL_FUNC_DIGEST_NEWCTX 1
|
| 304 |
+
#define OSSL_FUNC_DIGEST_INIT 2
|
| 305 |
+
#define OSSL_FUNC_DIGEST_UPDATE 3
|
| 306 |
+
#define OSSL_FUNC_DIGEST_FINAL 4
|
| 307 |
+
#define OSSL_FUNC_DIGEST_DIGEST 5
|
| 308 |
+
#define OSSL_FUNC_DIGEST_FREECTX 6
|
| 309 |
+
#define OSSL_FUNC_DIGEST_DUPCTX 7
|
| 310 |
+
#define OSSL_FUNC_DIGEST_GET_PARAMS 8
|
| 311 |
+
#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
|
| 312 |
+
#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
|
| 313 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
|
| 314 |
+
#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
|
| 315 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
|
| 316 |
+
#define OSSL_FUNC_DIGEST_SQUEEZE 14
|
| 317 |
+
#define OSSL_FUNC_DIGEST_COPYCTX 15
|
| 318 |
+
|
| 319 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_newctx, (void *provctx))
|
| 320 |
+
OSSL_CORE_MAKE_FUNC(int, digest_init, (void *dctx, const OSSL_PARAM params[]))
|
| 321 |
+
OSSL_CORE_MAKE_FUNC(int, digest_update,
|
| 322 |
+
(void *dctx, const unsigned char *in, size_t inl))
|
| 323 |
+
OSSL_CORE_MAKE_FUNC(int, digest_final,
|
| 324 |
+
(void *dctx,
|
| 325 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 326 |
+
OSSL_CORE_MAKE_FUNC(int, digest_squeeze,
|
| 327 |
+
(void *dctx,
|
| 328 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 329 |
+
OSSL_CORE_MAKE_FUNC(int, digest_digest,
|
| 330 |
+
(void *provctx, const unsigned char *in, size_t inl,
|
| 331 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 332 |
+
|
| 333 |
+
OSSL_CORE_MAKE_FUNC(void, digest_freectx, (void *dctx))
|
| 334 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_dupctx, (void *dctx))
|
| 335 |
+
OSSL_CORE_MAKE_FUNC(void, digest_copyctx, (void *outctx, void *inctx))
|
| 336 |
+
|
| 337 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_params, (OSSL_PARAM params[]))
|
| 338 |
+
OSSL_CORE_MAKE_FUNC(int, digest_set_ctx_params,
|
| 339 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 340 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_ctx_params,
|
| 341 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 342 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params,
|
| 343 |
+
(void *provctx))
|
| 344 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params,
|
| 345 |
+
(void *dctx, void *provctx))
|
| 346 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params,
|
| 347 |
+
(void *dctx, void *provctx))
|
| 348 |
+
|
| 349 |
+
/* Symmetric Ciphers */
|
| 350 |
+
|
| 351 |
+
#define OSSL_FUNC_CIPHER_NEWCTX 1
|
| 352 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
|
| 353 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
|
| 354 |
+
#define OSSL_FUNC_CIPHER_UPDATE 4
|
| 355 |
+
#define OSSL_FUNC_CIPHER_FINAL 5
|
| 356 |
+
#define OSSL_FUNC_CIPHER_CIPHER 6
|
| 357 |
+
#define OSSL_FUNC_CIPHER_FREECTX 7
|
| 358 |
+
#define OSSL_FUNC_CIPHER_DUPCTX 8
|
| 359 |
+
#define OSSL_FUNC_CIPHER_GET_PARAMS 9
|
| 360 |
+
#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
|
| 361 |
+
#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
|
| 362 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
|
| 363 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
|
| 364 |
+
#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
|
| 365 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
|
| 366 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
|
| 367 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
|
| 368 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
|
| 369 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
|
| 370 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
|
| 371 |
+
|
| 372 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_newctx, (void *provctx))
|
| 373 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 374 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 375 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_update,
|
| 376 |
+
(void *cctx,
|
| 377 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 378 |
+
const unsigned char *in, size_t inl))
|
| 379 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_final,
|
| 380 |
+
(void *cctx,
|
| 381 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 382 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_cipher,
|
| 383 |
+
(void *cctx,
|
| 384 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 385 |
+
const unsigned char *in, size_t inl))
|
| 386 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_encrypt_init,
|
| 387 |
+
(void *cctx,
|
| 388 |
+
const unsigned char *key, size_t keylen,
|
| 389 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 390 |
+
const OSSL_PARAM params[]))
|
| 391 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_decrypt_init,
|
| 392 |
+
(void *cctx,
|
| 393 |
+
const unsigned char *key, size_t keylen,
|
| 394 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 395 |
+
const OSSL_PARAM params[]))
|
| 396 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_update,
|
| 397 |
+
(void *cctx, size_t numpipes,
|
| 398 |
+
unsigned char **out, size_t *outl, const size_t *outsize,
|
| 399 |
+
const unsigned char **in, const size_t *inl))
|
| 400 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_final,
|
| 401 |
+
(void *cctx, size_t numpipes,
|
| 402 |
+
unsigned char **out, size_t *outl, const size_t *outsize))
|
| 403 |
+
OSSL_CORE_MAKE_FUNC(void, cipher_freectx, (void *cctx))
|
| 404 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_dupctx, (void *cctx))
|
| 405 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_params, (OSSL_PARAM params[]))
|
| 406 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_ctx_params, (void *cctx, OSSL_PARAM params[]))
|
| 407 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_set_ctx_params, (void *cctx, const OSSL_PARAM params[]))
|
| 408 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params,
|
| 409 |
+
(void *provctx))
|
| 410 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params,
|
| 411 |
+
(void *cctx, void *provctx))
|
| 412 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params,
|
| 413 |
+
(void *cctx, void *provctx))
|
| 414 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 415 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 416 |
+
|
| 417 |
+
/* MACs */
|
| 418 |
+
|
| 419 |
+
#define OSSL_FUNC_MAC_NEWCTX 1
|
| 420 |
+
#define OSSL_FUNC_MAC_DUPCTX 2
|
| 421 |
+
#define OSSL_FUNC_MAC_FREECTX 3
|
| 422 |
+
#define OSSL_FUNC_MAC_INIT 4
|
| 423 |
+
#define OSSL_FUNC_MAC_UPDATE 5
|
| 424 |
+
#define OSSL_FUNC_MAC_FINAL 6
|
| 425 |
+
#define OSSL_FUNC_MAC_GET_PARAMS 7
|
| 426 |
+
#define OSSL_FUNC_MAC_GET_CTX_PARAMS 8
|
| 427 |
+
#define OSSL_FUNC_MAC_SET_CTX_PARAMS 9
|
| 428 |
+
#define OSSL_FUNC_MAC_GETTABLE_PARAMS 10
|
| 429 |
+
#define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS 11
|
| 430 |
+
#define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS 12
|
| 431 |
+
#define OSSL_FUNC_MAC_INIT_SKEY 13
|
| 432 |
+
|
| 433 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_newctx, (void *provctx))
|
| 434 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_dupctx, (void *src))
|
| 435 |
+
OSSL_CORE_MAKE_FUNC(void, mac_freectx, (void *mctx))
|
| 436 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init, (void *mctx, const unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 437 |
+
OSSL_CORE_MAKE_FUNC(int, mac_update,
|
| 438 |
+
(void *mctx, const unsigned char *in, size_t inl))
|
| 439 |
+
OSSL_CORE_MAKE_FUNC(int, mac_final,
|
| 440 |
+
(void *mctx,
|
| 441 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 442 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void *provctx))
|
| 443 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params,
|
| 444 |
+
(void *mctx, void *provctx))
|
| 445 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params,
|
| 446 |
+
(void *mctx, void *provctx))
|
| 447 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_params, (OSSL_PARAM params[]))
|
| 448 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_ctx_params,
|
| 449 |
+
(void *mctx, OSSL_PARAM params[]))
|
| 450 |
+
OSSL_CORE_MAKE_FUNC(int, mac_set_ctx_params,
|
| 451 |
+
(void *mctx, const OSSL_PARAM params[]))
|
| 452 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init_skey, (void *mctx, void *key, const OSSL_PARAM params[]))
|
| 453 |
+
|
| 454 |
+
/*-
|
| 455 |
+
* Symmetric key management
|
| 456 |
+
*
|
| 457 |
+
* The Key Management takes care of provider side of symmetric key objects, and
|
| 458 |
+
* includes essentially everything that manipulates the keys themselves and
|
| 459 |
+
* their parameters.
|
| 460 |
+
*
|
| 461 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 462 |
+
* to contain parameters if the key has any, and the secret key.
|
| 463 |
+
*
|
| 464 |
+
* Key objects are created with OSSL_FUNC_skeymgmt_import() (there is no
|
| 465 |
+
* dedicated memory allocation function), exported with
|
| 466 |
+
* OSSL_FUNC_skeymgmt_export() and destroyed with OSSL_FUNC_keymgmt_free().
|
| 467 |
+
*
|
| 468 |
+
*/
|
| 469 |
+
|
| 470 |
+
/* Key data subset selection - individual bits */
|
| 471 |
+
#define OSSL_SKEYMGMT_SELECT_PARAMETERS 0x01
|
| 472 |
+
#define OSSL_SKEYMGMT_SELECT_SECRET_KEY 0x02
|
| 473 |
+
|
| 474 |
+
/* Key data subset selection - combinations */
|
| 475 |
+
#define OSSL_SKEYMGMT_SELECT_ALL \
|
| 476 |
+
(OSSL_SKEYMGMT_SELECT_PARAMETERS | OSSL_SKEYMGMT_SELECT_SECRET_KEY)
|
| 477 |
+
|
| 478 |
+
#define OSSL_FUNC_SKEYMGMT_FREE 1
|
| 479 |
+
#define OSSL_FUNC_SKEYMGMT_IMPORT 2
|
| 480 |
+
#define OSSL_FUNC_SKEYMGMT_EXPORT 3
|
| 481 |
+
#define OSSL_FUNC_SKEYMGMT_GENERATE 4
|
| 482 |
+
#define OSSL_FUNC_SKEYMGMT_GET_KEY_ID 5
|
| 483 |
+
#define OSSL_FUNC_SKEYMGMT_IMP_SETTABLE_PARAMS 6
|
| 484 |
+
#define OSSL_FUNC_SKEYMGMT_GEN_SETTABLE_PARAMS 7
|
| 485 |
+
|
| 486 |
+
OSSL_CORE_MAKE_FUNC(void, skeymgmt_free, (void *keydata))
|
| 487 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 488 |
+
skeymgmt_imp_settable_params, (void *provctx))
|
| 489 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_import, (void *provctx, int selection, const OSSL_PARAM params[]))
|
| 490 |
+
OSSL_CORE_MAKE_FUNC(int, skeymgmt_export,
|
| 491 |
+
(void *keydata, int selection,
|
| 492 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 493 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 494 |
+
skeymgmt_gen_settable_params, (void *provctx))
|
| 495 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_generate, (void *provctx, const OSSL_PARAM params[]))
|
| 496 |
+
OSSL_CORE_MAKE_FUNC(const char *, skeymgmt_get_key_id, (void *keydata))
|
| 497 |
+
|
| 498 |
+
/* KDFs and PRFs */
|
| 499 |
+
|
| 500 |
+
#define OSSL_FUNC_KDF_NEWCTX 1
|
| 501 |
+
#define OSSL_FUNC_KDF_DUPCTX 2
|
| 502 |
+
#define OSSL_FUNC_KDF_FREECTX 3
|
| 503 |
+
#define OSSL_FUNC_KDF_RESET 4
|
| 504 |
+
#define OSSL_FUNC_KDF_DERIVE 5
|
| 505 |
+
#define OSSL_FUNC_KDF_GETTABLE_PARAMS 6
|
| 506 |
+
#define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS 7
|
| 507 |
+
#define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS 8
|
| 508 |
+
#define OSSL_FUNC_KDF_GET_PARAMS 9
|
| 509 |
+
#define OSSL_FUNC_KDF_GET_CTX_PARAMS 10
|
| 510 |
+
#define OSSL_FUNC_KDF_SET_CTX_PARAMS 11
|
| 511 |
+
#define OSSL_FUNC_KDF_SET_SKEY 12
|
| 512 |
+
#define OSSL_FUNC_KDF_DERIVE_SKEY 13
|
| 513 |
+
|
| 514 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_newctx, (void *provctx))
|
| 515 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_dupctx, (void *src))
|
| 516 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_freectx, (void *kctx))
|
| 517 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
|
| 518 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_derive, (void *kctx, unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 519 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void *provctx))
|
| 520 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params,
|
| 521 |
+
(void *kctx, void *provctx))
|
| 522 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params,
|
| 523 |
+
(void *kctx, void *provctx))
|
| 524 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_params, (OSSL_PARAM params[]))
|
| 525 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_ctx_params,
|
| 526 |
+
(void *kctx, OSSL_PARAM params[]))
|
| 527 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_set_ctx_params,
|
| 528 |
+
(void *kctx, const OSSL_PARAM params[]))
|
| 529 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_set_skey,
|
| 530 |
+
(void *kctx, void *skeydata, const char *paramname))
|
| 531 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_derive_skey, (void *ctx, const char *key_type, void *provctx, OSSL_FUNC_skeymgmt_import_fn *import, size_t keylen, const OSSL_PARAM params[]))
|
| 532 |
+
|
| 533 |
+
/* RAND */
|
| 534 |
+
|
| 535 |
+
#define OSSL_FUNC_RAND_NEWCTX 1
|
| 536 |
+
#define OSSL_FUNC_RAND_FREECTX 2
|
| 537 |
+
#define OSSL_FUNC_RAND_INSTANTIATE 3
|
| 538 |
+
#define OSSL_FUNC_RAND_UNINSTANTIATE 4
|
| 539 |
+
#define OSSL_FUNC_RAND_GENERATE 5
|
| 540 |
+
#define OSSL_FUNC_RAND_RESEED 6
|
| 541 |
+
#define OSSL_FUNC_RAND_NONCE 7
|
| 542 |
+
#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
|
| 543 |
+
#define OSSL_FUNC_RAND_LOCK 9
|
| 544 |
+
#define OSSL_FUNC_RAND_UNLOCK 10
|
| 545 |
+
#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
|
| 546 |
+
#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
|
| 547 |
+
#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
|
| 548 |
+
#define OSSL_FUNC_RAND_GET_PARAMS 14
|
| 549 |
+
#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
|
| 550 |
+
#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
|
| 551 |
+
#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
|
| 552 |
+
#define OSSL_FUNC_RAND_GET_SEED 18
|
| 553 |
+
#define OSSL_FUNC_RAND_CLEAR_SEED 19
|
| 554 |
+
|
| 555 |
+
OSSL_CORE_MAKE_FUNC(void *, rand_newctx,
|
| 556 |
+
(void *provctx, void *parent,
|
| 557 |
+
const OSSL_DISPATCH *parent_calls))
|
| 558 |
+
OSSL_CORE_MAKE_FUNC(void, rand_freectx, (void *vctx))
|
| 559 |
+
OSSL_CORE_MAKE_FUNC(int, rand_instantiate,
|
| 560 |
+
(void *vdrbg, unsigned int strength,
|
| 561 |
+
int prediction_resistance,
|
| 562 |
+
const unsigned char *pstr, size_t pstr_len,
|
| 563 |
+
const OSSL_PARAM params[]))
|
| 564 |
+
OSSL_CORE_MAKE_FUNC(int, rand_uninstantiate, (void *vdrbg))
|
| 565 |
+
OSSL_CORE_MAKE_FUNC(int, rand_generate,
|
| 566 |
+
(void *vctx, unsigned char *out, size_t outlen,
|
| 567 |
+
unsigned int strength, int prediction_resistance,
|
| 568 |
+
const unsigned char *addin, size_t addin_len))
|
| 569 |
+
OSSL_CORE_MAKE_FUNC(int, rand_reseed,
|
| 570 |
+
(void *vctx, int prediction_resistance,
|
| 571 |
+
const unsigned char *ent, size_t ent_len,
|
| 572 |
+
const unsigned char *addin, size_t addin_len))
|
| 573 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_nonce,
|
| 574 |
+
(void *vctx, unsigned char *out, unsigned int strength,
|
| 575 |
+
size_t min_noncelen, size_t max_noncelen))
|
| 576 |
+
OSSL_CORE_MAKE_FUNC(int, rand_enable_locking, (void *vctx))
|
| 577 |
+
OSSL_CORE_MAKE_FUNC(int, rand_lock, (void *vctx))
|
| 578 |
+
OSSL_CORE_MAKE_FUNC(void, rand_unlock, (void *vctx))
|
| 579 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_params, (void *provctx))
|
| 580 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_ctx_params,
|
| 581 |
+
(void *vctx, void *provctx))
|
| 582 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_settable_ctx_params,
|
| 583 |
+
(void *vctx, void *provctx))
|
| 584 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_params, (OSSL_PARAM params[]))
|
| 585 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_ctx_params,
|
| 586 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 587 |
+
OSSL_CORE_MAKE_FUNC(int, rand_set_ctx_params,
|
| 588 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 589 |
+
OSSL_CORE_MAKE_FUNC(void, rand_set_callbacks,
|
| 590 |
+
(void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
|
| 591 |
+
OSSL_CALLBACK *cleanup_entropy,
|
| 592 |
+
OSSL_INOUT_CALLBACK *get_nonce,
|
| 593 |
+
OSSL_CALLBACK *cleanup_nonce, void *arg))
|
| 594 |
+
OSSL_CORE_MAKE_FUNC(int, rand_verify_zeroization,
|
| 595 |
+
(void *vctx))
|
| 596 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_get_seed,
|
| 597 |
+
(void *vctx, unsigned char **buffer,
|
| 598 |
+
int entropy, size_t min_len, size_t max_len,
|
| 599 |
+
int prediction_resistance,
|
| 600 |
+
const unsigned char *adin, size_t adin_len))
|
| 601 |
+
OSSL_CORE_MAKE_FUNC(void, rand_clear_seed,
|
| 602 |
+
(void *vctx, unsigned char *buffer, size_t b_len))
|
| 603 |
+
|
| 604 |
+
/*-
|
| 605 |
+
* Key management
|
| 606 |
+
*
|
| 607 |
+
* The Key Management takes care of provider side key objects, and includes
|
| 608 |
+
* all current functionality to create them, destroy them, set parameters
|
| 609 |
+
* and key material, etc, essentially everything that manipulates the keys
|
| 610 |
+
* themselves and their parameters.
|
| 611 |
+
*
|
| 612 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 613 |
+
* to contain parameters if the key has any, the public key and the private
|
| 614 |
+
* key. All parts are optional, but their presence determines what can be
|
| 615 |
+
* done with the key object in terms of encryption, signature, and so on.
|
| 616 |
+
* The assumption from libcrypto is that the key object contains any of the
|
| 617 |
+
* following data combinations:
|
| 618 |
+
*
|
| 619 |
+
* - parameters only
|
| 620 |
+
* - public key only
|
| 621 |
+
* - public key + private key
|
| 622 |
+
* - parameters + public key
|
| 623 |
+
* - parameters + public key + private key
|
| 624 |
+
*
|
| 625 |
+
* What "parameters", "public key" and "private key" means in detail is left
|
| 626 |
+
* to the implementation. In the case of DH and DSA, they would typically
|
| 627 |
+
* include domain parameters, while for certain variants of RSA, they would
|
| 628 |
+
* typically include PSS or OAEP parameters.
|
| 629 |
+
*
|
| 630 |
+
* Key objects are created with OSSL_FUNC_keymgmt_new() and destroyed with
|
| 631 |
+
* OSSL_FUNC_keymgmt_free(). Key objects can have data filled in with
|
| 632 |
+
* OSSL_FUNC_keymgmt_import().
|
| 633 |
+
*
|
| 634 |
+
* Three functions are made available to check what selection of data is
|
| 635 |
+
* present in a key object: OSSL_FUNC_keymgmt_has_parameters(),
|
| 636 |
+
* OSSL_FUNC_keymgmt_has_public_key(), and OSSL_FUNC_keymgmt_has_private_key(),
|
| 637 |
+
*/
|
| 638 |
+
|
| 639 |
+
/* Key data subset selection - individual bits */
|
| 640 |
+
#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
|
| 641 |
+
#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
|
| 642 |
+
#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
|
| 643 |
+
#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
|
| 644 |
+
|
| 645 |
+
/* Key data subset selection - combinations */
|
| 646 |
+
#define OSSL_KEYMGMT_SELECT_ALL_PARAMETERS \
|
| 647 |
+
(OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
|
| 648 |
+
| OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
|
| 649 |
+
#define OSSL_KEYMGMT_SELECT_KEYPAIR \
|
| 650 |
+
(OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
|
| 651 |
+
#define OSSL_KEYMGMT_SELECT_ALL \
|
| 652 |
+
(OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
|
| 653 |
+
|
| 654 |
+
#define OSSL_KEYMGMT_VALIDATE_FULL_CHECK 0
|
| 655 |
+
#define OSSL_KEYMGMT_VALIDATE_QUICK_CHECK 1
|
| 656 |
+
|
| 657 |
+
/* Basic key object creation */
|
| 658 |
+
#define OSSL_FUNC_KEYMGMT_NEW 1
|
| 659 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_new, (void *provctx))
|
| 660 |
+
|
| 661 |
+
/* Generation, a more complex constructor */
|
| 662 |
+
#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
|
| 663 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
|
| 664 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
|
| 665 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
|
| 666 |
+
#define OSSL_FUNC_KEYMGMT_GEN 6
|
| 667 |
+
#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
|
| 668 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
|
| 669 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
|
| 670 |
+
|
| 671 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen_init,
|
| 672 |
+
(void *provctx, int selection, const OSSL_PARAM params[]))
|
| 673 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_template,
|
| 674 |
+
(void *genctx, void *templ))
|
| 675 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_params,
|
| 676 |
+
(void *genctx, const OSSL_PARAM params[]))
|
| 677 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 678 |
+
keymgmt_gen_settable_params,
|
| 679 |
+
(void *genctx, void *provctx))
|
| 680 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_get_params,
|
| 681 |
+
(void *genctx, OSSL_PARAM params[]))
|
| 682 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gen_gettable_params,
|
| 683 |
+
(void *genctx, void *provctx))
|
| 684 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen,
|
| 685 |
+
(void *genctx, OSSL_CALLBACK *cb, void *cbarg))
|
| 686 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_gen_cleanup, (void *genctx))
|
| 687 |
+
|
| 688 |
+
/* Key loading by object reference */
|
| 689 |
+
#define OSSL_FUNC_KEYMGMT_LOAD 8
|
| 690 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_load,
|
| 691 |
+
(const void *reference, size_t reference_sz))
|
| 692 |
+
|
| 693 |
+
/* Basic key object destruction */
|
| 694 |
+
#define OSSL_FUNC_KEYMGMT_FREE 10
|
| 695 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_free, (void *keydata))
|
| 696 |
+
|
| 697 |
+
/* Key object information, with discovery */
|
| 698 |
+
#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
|
| 699 |
+
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
|
| 700 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_get_params,
|
| 701 |
+
(void *keydata, OSSL_PARAM params[]))
|
| 702 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gettable_params,
|
| 703 |
+
(void *provctx))
|
| 704 |
+
|
| 705 |
+
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
|
| 706 |
+
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
|
| 707 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_set_params,
|
| 708 |
+
(void *keydata, const OSSL_PARAM params[]))
|
| 709 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_settable_params,
|
| 710 |
+
(void *provctx))
|
| 711 |
+
|
| 712 |
+
/* Key checks - discovery of supported operations */
|
| 713 |
+
#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
|
| 714 |
+
OSSL_CORE_MAKE_FUNC(const char *, keymgmt_query_operation_name,
|
| 715 |
+
(int operation_id))
|
| 716 |
+
|
| 717 |
+
/* Key checks - key data content checks */
|
| 718 |
+
#define OSSL_FUNC_KEYMGMT_HAS 21
|
| 719 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_has, (const void *keydata, int selection))
|
| 720 |
+
|
| 721 |
+
/* Key checks - validation */
|
| 722 |
+
#define OSSL_FUNC_KEYMGMT_VALIDATE 22
|
| 723 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_validate, (const void *keydata, int selection, int checktype))
|
| 724 |
+
|
| 725 |
+
/* Key checks - matching */
|
| 726 |
+
#define OSSL_FUNC_KEYMGMT_MATCH 23
|
| 727 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_match,
|
| 728 |
+
(const void *keydata1, const void *keydata2,
|
| 729 |
+
int selection))
|
| 730 |
+
|
| 731 |
+
/* Import and export functions, with discovery */
|
| 732 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT 40
|
| 733 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
|
| 734 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT 42
|
| 735 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
|
| 736 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_import,
|
| 737 |
+
(void *keydata, int selection, const OSSL_PARAM params[]))
|
| 738 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types,
|
| 739 |
+
(int selection))
|
| 740 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_export,
|
| 741 |
+
(void *keydata, int selection,
|
| 742 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 743 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types,
|
| 744 |
+
(int selection))
|
| 745 |
+
|
| 746 |
+
/* Dup function, constructor */
|
| 747 |
+
#define OSSL_FUNC_KEYMGMT_DUP 44
|
| 748 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_dup,
|
| 749 |
+
(const void *keydata_from, int selection))
|
| 750 |
+
|
| 751 |
+
/* Extended import and export functions */
|
| 752 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
|
| 753 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
|
| 754 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types_ex,
|
| 755 |
+
(void *provctx, int selection))
|
| 756 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types_ex,
|
| 757 |
+
(void *provctx, int selection))
|
| 758 |
+
|
| 759 |
+
/* Key Exchange */
|
| 760 |
+
|
| 761 |
+
#define OSSL_FUNC_KEYEXCH_NEWCTX 1
|
| 762 |
+
#define OSSL_FUNC_KEYEXCH_INIT 2
|
| 763 |
+
#define OSSL_FUNC_KEYEXCH_DERIVE 3
|
| 764 |
+
#define OSSL_FUNC_KEYEXCH_SET_PEER 4
|
| 765 |
+
#define OSSL_FUNC_KEYEXCH_FREECTX 5
|
| 766 |
+
#define OSSL_FUNC_KEYEXCH_DUPCTX 6
|
| 767 |
+
#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
|
| 768 |
+
#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
|
| 769 |
+
#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
|
| 770 |
+
#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
|
| 771 |
+
#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
|
| 772 |
+
|
| 773 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_newctx, (void *provctx))
|
| 774 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 775 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_derive, (void *ctx, unsigned char *secret, size_t *secretlen, size_t outlen))
|
| 776 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_peer, (void *ctx, void *provkey))
|
| 777 |
+
OSSL_CORE_MAKE_FUNC(void, keyexch_freectx, (void *ctx))
|
| 778 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_dupctx, (void *ctx))
|
| 779 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_ctx_params, (void *ctx, const OSSL_PARAM params[]))
|
| 780 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_settable_ctx_params,
|
| 781 |
+
(void *ctx, void *provctx))
|
| 782 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 783 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_gettable_ctx_params,
|
| 784 |
+
(void *ctx, void *provctx))
|
| 785 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_derive_skey, (void *ctx, const char *key_type, void *provctx, OSSL_FUNC_skeymgmt_import_fn *import, size_t keylen, const OSSL_PARAM params[]))
|
| 786 |
+
|
| 787 |
+
/* Signature */
|
| 788 |
+
|
| 789 |
+
#define OSSL_FUNC_SIGNATURE_NEWCTX 1
|
| 790 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
|
| 791 |
+
#define OSSL_FUNC_SIGNATURE_SIGN 3
|
| 792 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
|
| 793 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY 5
|
| 794 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
|
| 795 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
|
| 796 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
|
| 797 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
|
| 798 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
|
| 799 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
|
| 800 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
|
| 801 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
|
| 802 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
|
| 803 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
|
| 804 |
+
#define OSSL_FUNC_SIGNATURE_FREECTX 16
|
| 805 |
+
#define OSSL_FUNC_SIGNATURE_DUPCTX 17
|
| 806 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
|
| 807 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
|
| 808 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
|
| 809 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
|
| 810 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
|
| 811 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
|
| 812 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
|
| 813 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
|
| 814 |
+
#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
|
| 815 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
|
| 816 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
|
| 817 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
|
| 818 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
|
| 819 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
|
| 820 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
|
| 821 |
+
|
| 822 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_newctx, (void *provctx, const char *propq))
|
| 823 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 824 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign, (void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 825 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_init,
|
| 826 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 827 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_update,
|
| 828 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 829 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_final,
|
| 830 |
+
(void *ctx, unsigned char *sig,
|
| 831 |
+
size_t *siglen, size_t sigsize))
|
| 832 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 833 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify, (void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen))
|
| 834 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_init,
|
| 835 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 836 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_update,
|
| 837 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 838 |
+
/*
|
| 839 |
+
* signature_verify_final requires that the signature to be verified against
|
| 840 |
+
* is specified via an OSSL_PARAM.
|
| 841 |
+
*/
|
| 842 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_final, (void *ctx))
|
| 843 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover_init,
|
| 844 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 845 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover,
|
| 846 |
+
(void *ctx, unsigned char *rout, size_t *routlen,
|
| 847 |
+
size_t routsize, const unsigned char *sig, size_t siglen))
|
| 848 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_init,
|
| 849 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 850 |
+
const OSSL_PARAM params[]))
|
| 851 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_update,
|
| 852 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 853 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_final,
|
| 854 |
+
(void *ctx, unsigned char *sig, size_t *siglen,
|
| 855 |
+
size_t sigsize))
|
| 856 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign,
|
| 857 |
+
(void *ctx, unsigned char *sigret, size_t *siglen,
|
| 858 |
+
size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 859 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_init,
|
| 860 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 861 |
+
const OSSL_PARAM params[]))
|
| 862 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_update,
|
| 863 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 864 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_final,
|
| 865 |
+
(void *ctx, const unsigned char *sig, size_t siglen))
|
| 866 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify,
|
| 867 |
+
(void *ctx, const unsigned char *sig, size_t siglen,
|
| 868 |
+
const unsigned char *tbs, size_t tbslen))
|
| 869 |
+
OSSL_CORE_MAKE_FUNC(void, signature_freectx, (void *ctx))
|
| 870 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_dupctx, (void *ctx))
|
| 871 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_params,
|
| 872 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 873 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_params,
|
| 874 |
+
(void *ctx, void *provctx))
|
| 875 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_params,
|
| 876 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 877 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_params,
|
| 878 |
+
(void *ctx, void *provctx))
|
| 879 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_md_params,
|
| 880 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 881 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_md_params,
|
| 882 |
+
(void *ctx))
|
| 883 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_md_params,
|
| 884 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 885 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_md_params,
|
| 886 |
+
(void *ctx))
|
| 887 |
+
OSSL_CORE_MAKE_FUNC(const char **, signature_query_key_types, (void))
|
| 888 |
+
|
| 889 |
+
/* Asymmetric Ciphers */
|
| 890 |
+
|
| 891 |
+
#define OSSL_FUNC_ASYM_CIPHER_NEWCTX 1
|
| 892 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT 2
|
| 893 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT 3
|
| 894 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT 4
|
| 895 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT 5
|
| 896 |
+
#define OSSL_FUNC_ASYM_CIPHER_FREECTX 6
|
| 897 |
+
#define OSSL_FUNC_ASYM_CIPHER_DUPCTX 7
|
| 898 |
+
#define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS 8
|
| 899 |
+
#define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS 9
|
| 900 |
+
#define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS 10
|
| 901 |
+
#define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS 11
|
| 902 |
+
|
| 903 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_newctx, (void *provctx))
|
| 904 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 905 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 906 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 907 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 908 |
+
OSSL_CORE_MAKE_FUNC(void, asym_cipher_freectx, (void *ctx))
|
| 909 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_dupctx, (void *ctx))
|
| 910 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_get_ctx_params,
|
| 911 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 912 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_gettable_ctx_params,
|
| 913 |
+
(void *ctx, void *provctx))
|
| 914 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_set_ctx_params,
|
| 915 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 916 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_settable_ctx_params,
|
| 917 |
+
(void *ctx, void *provctx))
|
| 918 |
+
|
| 919 |
+
/* Asymmetric Key encapsulation */
|
| 920 |
+
#define OSSL_FUNC_KEM_NEWCTX 1
|
| 921 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE_INIT 2
|
| 922 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE 3
|
| 923 |
+
#define OSSL_FUNC_KEM_DECAPSULATE_INIT 4
|
| 924 |
+
#define OSSL_FUNC_KEM_DECAPSULATE 5
|
| 925 |
+
#define OSSL_FUNC_KEM_FREECTX 6
|
| 926 |
+
#define OSSL_FUNC_KEM_DUPCTX 7
|
| 927 |
+
#define OSSL_FUNC_KEM_GET_CTX_PARAMS 8
|
| 928 |
+
#define OSSL_FUNC_KEM_GETTABLE_CTX_PARAMS 9
|
| 929 |
+
#define OSSL_FUNC_KEM_SET_CTX_PARAMS 10
|
| 930 |
+
#define OSSL_FUNC_KEM_SETTABLE_CTX_PARAMS 11
|
| 931 |
+
#define OSSL_FUNC_KEM_AUTH_ENCAPSULATE_INIT 12
|
| 932 |
+
#define OSSL_FUNC_KEM_AUTH_DECAPSULATE_INIT 13
|
| 933 |
+
|
| 934 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_newctx, (void *provctx))
|
| 935 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 936 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_encapsulate_init, (void *ctx, void *provkey, void *authprivkey, const OSSL_PARAM params[]))
|
| 937 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate, (void *ctx, unsigned char *out, size_t *outlen, unsigned char *secret, size_t *secretlen))
|
| 938 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 939 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_decapsulate_init, (void *ctx, void *provkey, void *authpubkey, const OSSL_PARAM params[]))
|
| 940 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate, (void *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen))
|
| 941 |
+
OSSL_CORE_MAKE_FUNC(void, kem_freectx, (void *ctx))
|
| 942 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_dupctx, (void *ctx))
|
| 943 |
+
OSSL_CORE_MAKE_FUNC(int, kem_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 944 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_gettable_ctx_params,
|
| 945 |
+
(void *ctx, void *provctx))
|
| 946 |
+
OSSL_CORE_MAKE_FUNC(int, kem_set_ctx_params,
|
| 947 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 948 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_settable_ctx_params,
|
| 949 |
+
(void *ctx, void *provctx))
|
| 950 |
+
|
| 951 |
+
/* Encoders and decoders */
|
| 952 |
+
#define OSSL_FUNC_ENCODER_NEWCTX 1
|
| 953 |
+
#define OSSL_FUNC_ENCODER_FREECTX 2
|
| 954 |
+
#define OSSL_FUNC_ENCODER_GET_PARAMS 3
|
| 955 |
+
#define OSSL_FUNC_ENCODER_GETTABLE_PARAMS 4
|
| 956 |
+
#define OSSL_FUNC_ENCODER_SET_CTX_PARAMS 5
|
| 957 |
+
#define OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS 6
|
| 958 |
+
#define OSSL_FUNC_ENCODER_DOES_SELECTION 10
|
| 959 |
+
#define OSSL_FUNC_ENCODER_ENCODE 11
|
| 960 |
+
#define OSSL_FUNC_ENCODER_IMPORT_OBJECT 20
|
| 961 |
+
#define OSSL_FUNC_ENCODER_FREE_OBJECT 21
|
| 962 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_newctx, (void *provctx))
|
| 963 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_freectx, (void *ctx))
|
| 964 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_get_params, (OSSL_PARAM params[]))
|
| 965 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_gettable_params,
|
| 966 |
+
(void *provctx))
|
| 967 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_set_ctx_params,
|
| 968 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 969 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_settable_ctx_params,
|
| 970 |
+
(void *provctx))
|
| 971 |
+
|
| 972 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_does_selection,
|
| 973 |
+
(void *provctx, int selection))
|
| 974 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_encode,
|
| 975 |
+
(void *ctx, OSSL_CORE_BIO *out,
|
| 976 |
+
const void *obj_raw, const OSSL_PARAM obj_abstract[],
|
| 977 |
+
int selection,
|
| 978 |
+
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
|
| 979 |
+
|
| 980 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_import_object,
|
| 981 |
+
(void *ctx, int selection, const OSSL_PARAM params[]))
|
| 982 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_free_object, (void *obj))
|
| 983 |
+
|
| 984 |
+
#define OSSL_FUNC_DECODER_NEWCTX 1
|
| 985 |
+
#define OSSL_FUNC_DECODER_FREECTX 2
|
| 986 |
+
#define OSSL_FUNC_DECODER_GET_PARAMS 3
|
| 987 |
+
#define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
|
| 988 |
+
#define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
|
| 989 |
+
#define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
|
| 990 |
+
#define OSSL_FUNC_DECODER_DOES_SELECTION 10
|
| 991 |
+
#define OSSL_FUNC_DECODER_DECODE 11
|
| 992 |
+
#define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
|
| 993 |
+
OSSL_CORE_MAKE_FUNC(void *, decoder_newctx, (void *provctx))
|
| 994 |
+
OSSL_CORE_MAKE_FUNC(void, decoder_freectx, (void *ctx))
|
| 995 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_get_params, (OSSL_PARAM params[]))
|
| 996 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_gettable_params,
|
| 997 |
+
(void *provctx))
|
| 998 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_set_ctx_params,
|
| 999 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 1000 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_settable_ctx_params,
|
| 1001 |
+
(void *provctx))
|
| 1002 |
+
|
| 1003 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_does_selection,
|
| 1004 |
+
(void *provctx, int selection))
|
| 1005 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_decode,
|
| 1006 |
+
(void *ctx, OSSL_CORE_BIO *in, int selection,
|
| 1007 |
+
OSSL_CALLBACK *data_cb, void *data_cbarg,
|
| 1008 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1009 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_export_object,
|
| 1010 |
+
(void *ctx, const void *objref, size_t objref_sz,
|
| 1011 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1012 |
+
|
| 1013 |
+
/*-
|
| 1014 |
+
* Store
|
| 1015 |
+
*
|
| 1016 |
+
* Objects are scanned by using the 'open', 'load', 'eof' and 'close'
|
| 1017 |
+
* functions, which implement an OSSL_STORE loader.
|
| 1018 |
+
*
|
| 1019 |
+
* store_load() works in a way that's very similar to the decoders, in
|
| 1020 |
+
* that they pass an abstract object through a callback, either as a DER
|
| 1021 |
+
* octet string or as an object reference, which libcrypto will have to
|
| 1022 |
+
* deal with.
|
| 1023 |
+
*/
|
| 1024 |
+
|
| 1025 |
+
#define OSSL_FUNC_STORE_OPEN 1
|
| 1026 |
+
#define OSSL_FUNC_STORE_ATTACH 2
|
| 1027 |
+
#define OSSL_FUNC_STORE_SETTABLE_CTX_PARAMS 3
|
| 1028 |
+
#define OSSL_FUNC_STORE_SET_CTX_PARAMS 4
|
| 1029 |
+
#define OSSL_FUNC_STORE_LOAD 5
|
| 1030 |
+
#define OSSL_FUNC_STORE_EOF 6
|
| 1031 |
+
#define OSSL_FUNC_STORE_CLOSE 7
|
| 1032 |
+
#define OSSL_FUNC_STORE_EXPORT_OBJECT 8
|
| 1033 |
+
#define OSSL_FUNC_STORE_DELETE 9
|
| 1034 |
+
#define OSSL_FUNC_STORE_OPEN_EX 10
|
| 1035 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open, (void *provctx, const char *uri))
|
| 1036 |
+
OSSL_CORE_MAKE_FUNC(void *, store_attach, (void *provctx, OSSL_CORE_BIO *in))
|
| 1037 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, store_settable_ctx_params,
|
| 1038 |
+
(void *provctx))
|
| 1039 |
+
OSSL_CORE_MAKE_FUNC(int, store_set_ctx_params,
|
| 1040 |
+
(void *loaderctx, const OSSL_PARAM params[]))
|
| 1041 |
+
OSSL_CORE_MAKE_FUNC(int, store_load,
|
| 1042 |
+
(void *loaderctx,
|
| 1043 |
+
OSSL_CALLBACK *object_cb, void *object_cbarg,
|
| 1044 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1045 |
+
OSSL_CORE_MAKE_FUNC(int, store_eof, (void *loaderctx))
|
| 1046 |
+
OSSL_CORE_MAKE_FUNC(int, store_close, (void *loaderctx))
|
| 1047 |
+
OSSL_CORE_MAKE_FUNC(int, store_export_object,
|
| 1048 |
+
(void *loaderctx, const void *objref, size_t objref_sz,
|
| 1049 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1050 |
+
OSSL_CORE_MAKE_FUNC(int, store_delete,
|
| 1051 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1052 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1053 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open_ex,
|
| 1054 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1055 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1056 |
+
|
| 1057 |
+
#ifdef __cplusplus
|
| 1058 |
+
}
|
| 1059 |
+
#endif
|
| 1060 |
+
|
| 1061 |
+
#endif
|
data/miniconda3/include/openssl/core_object.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CORE_OBJECT_H
|
| 11 |
+
#define OPENSSL_CORE_OBJECT_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#ifdef __cplusplus
|
| 15 |
+
extern "C" {
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
/*-
|
| 19 |
+
* Known object types
|
| 20 |
+
*
|
| 21 |
+
* These numbers are used as values for the OSSL_PARAM parameter
|
| 22 |
+
* OSSL_OBJECT_PARAM_TYPE.
|
| 23 |
+
*
|
| 24 |
+
* For most of these types, there's a corresponding libcrypto object type.
|
| 25 |
+
* The corresponding type is indicated with a comment after the number.
|
| 26 |
+
*/
|
| 27 |
+
#define OSSL_OBJECT_UNKNOWN 0
|
| 28 |
+
#define OSSL_OBJECT_NAME 1 /* char * */
|
| 29 |
+
#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
|
| 30 |
+
#define OSSL_OBJECT_CERT 3 /* X509 * */
|
| 31 |
+
#define OSSL_OBJECT_CRL 4 /* X509_CRL * */
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* The rest of the associated OSSL_PARAM elements is described in core_names.h
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
#ifdef __cplusplus
|
| 38 |
+
}
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#endif
|