Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- llava_next/include/fakemysql.h +335 -0
- llava_next/include/itclInt.h +854 -0
- llava_next/include/sqlite3.h +0 -0
- llava_next/include/tclOOIntDecls.h +166 -0
- llava_next/include/term.h +893 -0
- llava_next/include/tkMacOSXFont.h +32 -0
- llava_next/include/tkMenubutton.h +216 -0
- llava_next/include/tkUuid.h +3 -0
- llava_next/share/info/history.info +1426 -0
- llava_next/share/info/libgomp.info +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/stablehlo/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/stablehlo/__pycache__/quantization_config_pb2.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/stablehlo/__pycache__/quantization_options_pb2.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm.py +393 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_statistics_pb2.py +32 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/pywrap_calibration.pyi +32 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/exported_model_pb2.py +33 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/quantization_options_pb2.py +65 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2tensorrt/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2tensorrt/_pywrap_py_utils.pyi +19 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/__pycache__/tf2xla_pb2.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/ops/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/ops/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/ops/gen_xla_ops.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/python/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/python/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/python/__pycache__/xla.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/python/xla.py +726 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/tf2xla/tf2xla_pb2.py +36 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/__pycache__/xla_data_pb2.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/service/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/service/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/service/__pycache__/hlo_pb2.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/service/hlo_pb2.py +104 -0
- videochat2/lib/python3.10/site-packages/tensorflow/compiler/xla/xla_data_pb2.py +136 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/rpc/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/rpc/__pycache__/__init__.cpython-310.pyc +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/rpc/kernels/__init__.py +0 -0
- videochat2/lib/python3.10/site-packages/tensorflow/distribute/experimental/rpc/kernels/__pycache__/__init__.cpython-310.pyc +0 -0
llava_next/include/fakemysql.h
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* fakemysql.h --
|
| 3 |
+
*
|
| 4 |
+
* Fake definitions of the MySQL API sufficient to build tdbc::mysql
|
| 5 |
+
* without having an MySQL installation on the build system. This file
|
| 6 |
+
* comprises only data type, constant and function definitions.
|
| 7 |
+
*
|
| 8 |
+
* The programmers of this file believe that it contains material not
|
| 9 |
+
* subject to copyright under the doctrines of scenes a faire and
|
| 10 |
+
* of merger of idea and expression. Accordingly, this file is in the
|
| 11 |
+
* public domain.
|
| 12 |
+
*
|
| 13 |
+
*-----------------------------------------------------------------------------
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
#ifndef FAKEMYSQL_H_INCLUDED
|
| 17 |
+
#define FAKEMYSQL_H_INCLUDED
|
| 18 |
+
|
| 19 |
+
#include <stddef.h>
|
| 20 |
+
|
| 21 |
+
#ifndef MODULE_SCOPE
|
| 22 |
+
#define MODULE_SCOPE extern
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
MODULE_SCOPE Tcl_LoadHandle MysqlInitStubs(Tcl_Interp*);
|
| 26 |
+
|
| 27 |
+
#ifdef _WIN32
|
| 28 |
+
#define STDCALL __stdcall
|
| 29 |
+
#else
|
| 30 |
+
#define STDCALL /* nothing */
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
enum enum_field_types {
|
| 34 |
+
MYSQL_TYPE_DECIMAL=0,
|
| 35 |
+
MYSQL_TYPE_TINY=1,
|
| 36 |
+
MYSQL_TYPE_SHORT=2,
|
| 37 |
+
MYSQL_TYPE_LONG=3,
|
| 38 |
+
MYSQL_TYPE_FLOAT=4,
|
| 39 |
+
MYSQL_TYPE_DOUBLE=5,
|
| 40 |
+
MYSQL_TYPE_NULL=6,
|
| 41 |
+
MYSQL_TYPE_TIMESTAMP=7,
|
| 42 |
+
MYSQL_TYPE_LONGLONG=8,
|
| 43 |
+
MYSQL_TYPE_INT24=9,
|
| 44 |
+
MYSQL_TYPE_DATE=10,
|
| 45 |
+
MYSQL_TYPE_TIME=11,
|
| 46 |
+
MYSQL_TYPE_DATETIME=12,
|
| 47 |
+
MYSQL_TYPE_YEAR=13,
|
| 48 |
+
MYSQL_TYPE_NEWDATE=14,
|
| 49 |
+
MYSQL_TYPE_VARCHAR=15,
|
| 50 |
+
MYSQL_TYPE_BIT=16,
|
| 51 |
+
MYSQL_TYPE_NEWDECIMAL=246,
|
| 52 |
+
MYSQL_TYPE_ENUM=247,
|
| 53 |
+
MYSQL_TYPE_SET=248,
|
| 54 |
+
MYSQL_TYPE_TINY_BLOB=249,
|
| 55 |
+
MYSQL_TYPE_MEDIUM_BLOB=250,
|
| 56 |
+
MYSQL_TYPE_LONG_BLOB=251,
|
| 57 |
+
MYSQL_TYPE_BLOB=252,
|
| 58 |
+
MYSQL_TYPE_VAR_STRING=253,
|
| 59 |
+
MYSQL_TYPE_STRING=254,
|
| 60 |
+
MYSQL_TYPE_GEOMETRY=255
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
enum mysql_option {
|
| 64 |
+
MYSQL_SET_CHARSET_NAME=7,
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
enum mysql_status {
|
| 68 |
+
MYSQL_STATUS_READY=0,
|
| 69 |
+
};
|
| 70 |
+
|
| 71 |
+
#define CLIENT_COMPRESS 32
|
| 72 |
+
#define CLIENT_INTERACTIVE 1024
|
| 73 |
+
#define MYSQL_DATA_TRUNCATED 101
|
| 74 |
+
#define MYSQL_ERRMSG_SIZE 512
|
| 75 |
+
#define MYSQL_NO_DATA 100
|
| 76 |
+
#define SCRAMBLE_LENGTH 20
|
| 77 |
+
#define SQLSTATE_LENGTH 5
|
| 78 |
+
|
| 79 |
+
typedef struct st_list LIST;
|
| 80 |
+
typedef struct st_mem_root MEM_ROOT;
|
| 81 |
+
typedef struct st_mysql MYSQL;
|
| 82 |
+
typedef struct st_mysql_bind MYSQL_BIND;
|
| 83 |
+
typedef struct st_mysql_field MYSQL_FIELD;
|
| 84 |
+
typedef struct st_mysql_res MYSQL_RES;
|
| 85 |
+
typedef char** MYSQL_ROW;
|
| 86 |
+
typedef struct st_mysql_stmt MYSQL_STMT;
|
| 87 |
+
typedef char my_bool;
|
| 88 |
+
#ifndef Socket_defined
|
| 89 |
+
typedef int my_socket;
|
| 90 |
+
#define INVALID_SOCKET -1
|
| 91 |
+
#endif
|
| 92 |
+
typedef Tcl_WideUInt my_ulonglong;
|
| 93 |
+
typedef struct st_net NET;
|
| 94 |
+
typedef struct st_used_mem USED_MEM;
|
| 95 |
+
typedef struct st_vio Vio;
|
| 96 |
+
|
| 97 |
+
struct st_mem_root {
|
| 98 |
+
USED_MEM *free;
|
| 99 |
+
USED_MEM *used;
|
| 100 |
+
USED_MEM *pre_alloc;
|
| 101 |
+
size_t min_malloc;
|
| 102 |
+
size_t block_size;
|
| 103 |
+
unsigned int block_num;
|
| 104 |
+
unsigned int first_block_usage;
|
| 105 |
+
void (*error_handler)(void);
|
| 106 |
+
};
|
| 107 |
+
|
| 108 |
+
struct st_mysql_options {
|
| 109 |
+
unsigned int connect_timeout;
|
| 110 |
+
unsigned int read_timeout;
|
| 111 |
+
unsigned int write_timeout;
|
| 112 |
+
unsigned int port;
|
| 113 |
+
unsigned int protocol;
|
| 114 |
+
unsigned long client_flag;
|
| 115 |
+
char *host;
|
| 116 |
+
char *user;
|
| 117 |
+
char *password;
|
| 118 |
+
char *unix_socket;
|
| 119 |
+
char *db;
|
| 120 |
+
struct st_dynamic_array *init_commands;
|
| 121 |
+
char *my_cnf_file;
|
| 122 |
+
char *my_cnf_group;
|
| 123 |
+
char *charset_dir;
|
| 124 |
+
char *charset_name;
|
| 125 |
+
char *ssl_key;
|
| 126 |
+
char *ssl_cert;
|
| 127 |
+
char *ssl_ca;
|
| 128 |
+
char *ssl_capath;
|
| 129 |
+
char *ssl_cipher;
|
| 130 |
+
char *shared_memory_base_name;
|
| 131 |
+
unsigned long max_allowed_packet;
|
| 132 |
+
my_bool use_ssl;
|
| 133 |
+
my_bool compress,named_pipe;
|
| 134 |
+
my_bool rpl_probe;
|
| 135 |
+
my_bool rpl_parse;
|
| 136 |
+
my_bool no_master_reads;
|
| 137 |
+
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
|
| 138 |
+
my_bool separate_thread;
|
| 139 |
+
#endif
|
| 140 |
+
enum mysql_option methods_to_use;
|
| 141 |
+
char *client_ip;
|
| 142 |
+
my_bool secure_auth;
|
| 143 |
+
my_bool report_data_truncation;
|
| 144 |
+
int (*local_infile_init)(void **, const char *, void *);
|
| 145 |
+
int (*local_infile_read)(void *, char *, unsigned int);
|
| 146 |
+
void (*local_infile_end)(void *);
|
| 147 |
+
int (*local_infile_error)(void *, char *, unsigned int);
|
| 148 |
+
void *local_infile_userdata;
|
| 149 |
+
void *extension;
|
| 150 |
+
};
|
| 151 |
+
|
| 152 |
+
struct st_net {
|
| 153 |
+
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
|
| 154 |
+
Vio *vio;
|
| 155 |
+
unsigned char *buff;
|
| 156 |
+
unsigned char *buff_end;
|
| 157 |
+
unsigned char *write_pos;
|
| 158 |
+
unsigned char *read_pos;
|
| 159 |
+
my_socket fd;
|
| 160 |
+
unsigned long remain_in_buf;
|
| 161 |
+
unsigned long length;
|
| 162 |
+
unsigned long buf_length;
|
| 163 |
+
unsigned long where_b;
|
| 164 |
+
unsigned long max_packet;
|
| 165 |
+
unsigned long max_packet_size;
|
| 166 |
+
unsigned int pkt_nr;
|
| 167 |
+
unsigned int compress_pkt_nr;
|
| 168 |
+
unsigned int write_timeout;
|
| 169 |
+
unsigned int read_timeout;
|
| 170 |
+
unsigned int retry_count;
|
| 171 |
+
int fcntl;
|
| 172 |
+
unsigned int *return_status;
|
| 173 |
+
unsigned char reading_or_writing;
|
| 174 |
+
char save_char;
|
| 175 |
+
my_bool unused0;
|
| 176 |
+
my_bool unused;
|
| 177 |
+
my_bool compress;
|
| 178 |
+
my_bool unused1;
|
| 179 |
+
#endif
|
| 180 |
+
unsigned char *query_cache_query;
|
| 181 |
+
unsigned int last_errno;
|
| 182 |
+
unsigned char error;
|
| 183 |
+
my_bool unused2;
|
| 184 |
+
my_bool return_errno;
|
| 185 |
+
char last_error[MYSQL_ERRMSG_SIZE];
|
| 186 |
+
char sqlstate[SQLSTATE_LENGTH+1];
|
| 187 |
+
void *extension;
|
| 188 |
+
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
|
| 189 |
+
my_bool skip_big_packet;
|
| 190 |
+
#endif
|
| 191 |
+
};
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
* st_mysql differs between 5.0 and 5.1, but the 5.0 version is a
|
| 195 |
+
* strict subset, we don't use any of the 5.1 fields, and we don't
|
| 196 |
+
* ever allocate the structure ourselves.
|
| 197 |
+
*/
|
| 198 |
+
|
| 199 |
+
struct st_mysql {
|
| 200 |
+
NET net;
|
| 201 |
+
unsigned char *connector_fd;
|
| 202 |
+
char *host;
|
| 203 |
+
char *user;
|
| 204 |
+
char *passwd;
|
| 205 |
+
char *unix_socket;
|
| 206 |
+
char *server_version;
|
| 207 |
+
char *host_info;
|
| 208 |
+
char *info;
|
| 209 |
+
char *db;
|
| 210 |
+
struct charset_info_st *charset;
|
| 211 |
+
MYSQL_FIELD *fields;
|
| 212 |
+
MEM_ROOT field_alloc;
|
| 213 |
+
my_ulonglong affected_rows;
|
| 214 |
+
my_ulonglong insert_id;
|
| 215 |
+
my_ulonglong extra_info;
|
| 216 |
+
unsigned long thread_id;
|
| 217 |
+
unsigned long packet_length;
|
| 218 |
+
unsigned int port;
|
| 219 |
+
unsigned long client_flag;
|
| 220 |
+
unsigned long server_capabilities;
|
| 221 |
+
unsigned int protocol_version;
|
| 222 |
+
unsigned int field_count;
|
| 223 |
+
unsigned int server_status;
|
| 224 |
+
unsigned int server_language;
|
| 225 |
+
unsigned int warning_count;
|
| 226 |
+
struct st_mysql_options options;
|
| 227 |
+
enum mysql_status status;
|
| 228 |
+
my_bool free_me;
|
| 229 |
+
my_bool reconnect;
|
| 230 |
+
char scramble[SCRAMBLE_LENGTH+1];
|
| 231 |
+
my_bool rpl_pivot;
|
| 232 |
+
struct st_mysql *master;
|
| 233 |
+
struct st_mysql *next_slave;
|
| 234 |
+
struct st_mysql* last_used_slave;
|
| 235 |
+
struct st_mysql* last_used_con;
|
| 236 |
+
LIST *stmts;
|
| 237 |
+
const struct st_mysql_methods *methods;
|
| 238 |
+
void *thd;
|
| 239 |
+
my_bool *unbuffered_fetch_owner;
|
| 240 |
+
char *info_buffer;
|
| 241 |
+
};
|
| 242 |
+
|
| 243 |
+
/*
|
| 244 |
+
* There are different version of the MYSQL_BIND structure before and after
|
| 245 |
+
* MySQL 5.1. We go after the fields of the structure using accessor functions
|
| 246 |
+
* so that the code in this file is compatible with both versions.
|
| 247 |
+
*/
|
| 248 |
+
|
| 249 |
+
struct st_mysql_bind_51 { /* Post-5.1 */
|
| 250 |
+
unsigned long* length;
|
| 251 |
+
my_bool* is_null;
|
| 252 |
+
void* buffer;
|
| 253 |
+
my_bool* error;
|
| 254 |
+
unsigned char* row_ptr;
|
| 255 |
+
void (*store_param_func)(NET* net, MYSQL_BIND* param);
|
| 256 |
+
void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 257 |
+
void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 258 |
+
unsigned long buffer_length;
|
| 259 |
+
unsigned long offset;
|
| 260 |
+
unsigned long length_value;
|
| 261 |
+
unsigned int param_number;
|
| 262 |
+
unsigned int pack_length;
|
| 263 |
+
enum enum_field_types buffer_type;
|
| 264 |
+
my_bool error_value;
|
| 265 |
+
my_bool is_unsigned;
|
| 266 |
+
my_bool long_data_used;
|
| 267 |
+
my_bool is_null_value;
|
| 268 |
+
void* extension;
|
| 269 |
+
};
|
| 270 |
+
|
| 271 |
+
struct st_mysql_bind_50 { /* Pre-5.1 */
|
| 272 |
+
unsigned long* length;
|
| 273 |
+
my_bool* is_null;
|
| 274 |
+
void* buffer;
|
| 275 |
+
my_bool* error;
|
| 276 |
+
enum enum_field_types buffer_type;
|
| 277 |
+
unsigned long buffer_length;
|
| 278 |
+
unsigned char* row_ptr;
|
| 279 |
+
unsigned long offset;
|
| 280 |
+
unsigned long length_value;
|
| 281 |
+
unsigned int param_number;
|
| 282 |
+
unsigned int pack_length;
|
| 283 |
+
my_bool error_value;
|
| 284 |
+
my_bool is_unsigned;
|
| 285 |
+
my_bool long_data_used;
|
| 286 |
+
my_bool is_null_value;
|
| 287 |
+
void (*store_param_func)(NET* net, MYSQL_BIND* param);
|
| 288 |
+
void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 289 |
+
void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 290 |
+
};
|
| 291 |
+
|
| 292 |
+
/*
|
| 293 |
+
* There are also different versions of the MYSQL_FIELD structure; fortunately,
|
| 294 |
+
* the 5.1 version is a strict extension of the 5.0 version.
|
| 295 |
+
*/
|
| 296 |
+
|
| 297 |
+
struct st_mysql_field {
|
| 298 |
+
char* name;
|
| 299 |
+
char *org_name;
|
| 300 |
+
char* table;
|
| 301 |
+
char* org_table;
|
| 302 |
+
char* db;
|
| 303 |
+
char* catalog;
|
| 304 |
+
char* def;
|
| 305 |
+
unsigned long length;
|
| 306 |
+
unsigned long max_length;
|
| 307 |
+
unsigned int name_length;
|
| 308 |
+
unsigned int org_name_length;
|
| 309 |
+
unsigned int table_length;
|
| 310 |
+
unsigned int org_table_length;
|
| 311 |
+
unsigned int db_length;
|
| 312 |
+
unsigned int catalog_length;
|
| 313 |
+
unsigned int def_length;
|
| 314 |
+
unsigned int flags;
|
| 315 |
+
unsigned int decimals;
|
| 316 |
+
unsigned int charsetnr;
|
| 317 |
+
enum enum_field_types type;
|
| 318 |
+
};
|
| 319 |
+
struct st_mysql_field_50 {
|
| 320 |
+
struct st_mysql_field field;
|
| 321 |
+
};
|
| 322 |
+
struct st_mysql_field_51 {
|
| 323 |
+
struct st_mysql_field field;
|
| 324 |
+
void* extension;
|
| 325 |
+
};
|
| 326 |
+
#define NOT_NULL_FLAG 1
|
| 327 |
+
|
| 328 |
+
#define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
|
| 329 |
+
|
| 330 |
+
#define mysql_library_init mysql_server_init
|
| 331 |
+
#define mysql_library_end mysql_server_end
|
| 332 |
+
|
| 333 |
+
#include "mysqlStubs.h"
|
| 334 |
+
|
| 335 |
+
#endif /* not FAKEMYSQL_H_INCLUDED */
|
llava_next/include/itclInt.h
ADDED
|
@@ -0,0 +1,854 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
+
* See the file "license.terms" for information on usage and redistribution of
|
| 10 |
+
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifdef HAVE_UNISTD_H
|
| 14 |
+
#include <unistd.h>
|
| 15 |
+
#endif
|
| 16 |
+
#ifdef HAVE_STDINT_H
|
| 17 |
+
#include <stdint.h>
|
| 18 |
+
#endif
|
| 19 |
+
#include <stddef.h>
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* Used to tag functions that are only to be visible within the module being
|
| 23 |
+
* built and not outside it (where this is supported by the linker).
|
| 24 |
+
*/
|
| 25 |
+
|
| 26 |
+
#ifndef MODULE_SCOPE
|
| 27 |
+
# ifdef __cplusplus
|
| 28 |
+
# define MODULE_SCOPE extern "C"
|
| 29 |
+
# else
|
| 30 |
+
# define MODULE_SCOPE extern
|
| 31 |
+
# endif
|
| 32 |
+
#endif
|
| 33 |
+
|
| 34 |
+
#include <string.h>
|
| 35 |
+
#include <ctype.h>
|
| 36 |
+
#include <tclOO.h>
|
| 37 |
+
#include "itcl.h"
|
| 38 |
+
#include "itclMigrate2TclCore.h"
|
| 39 |
+
#include "itclTclIntStubsFcn.h"
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* Utility macros: STRINGIFY takes an argument and wraps it in "" (double
|
| 43 |
+
* quotation marks).
|
| 44 |
+
*/
|
| 45 |
+
|
| 46 |
+
#ifndef STRINGIFY
|
| 47 |
+
# define STRINGIFY(x) STRINGIFY1(x)
|
| 48 |
+
# define STRINGIFY1(x) #x
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
/*
|
| 52 |
+
* MSVC 8.0 started to mark many standard C library functions depreciated
|
| 53 |
+
* including the *printf family and others. Tell it to shut up.
|
| 54 |
+
* (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0)
|
| 55 |
+
*/
|
| 56 |
+
#if defined(_MSC_VER)
|
| 57 |
+
# pragma warning(disable:4244)
|
| 58 |
+
# if _MSC_VER >= 1400
|
| 59 |
+
# pragma warning(disable:4267)
|
| 60 |
+
# pragma warning(disable:4996)
|
| 61 |
+
# endif
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#ifndef TCL_INDEX_NONE
|
| 65 |
+
# define TCL_INDEX_NONE (-1)
|
| 66 |
+
#endif
|
| 67 |
+
|
| 68 |
+
#ifndef JOIN
|
| 69 |
+
# define JOIN(a,b) JOIN1(a,b)
|
| 70 |
+
# define JOIN1(a,b) a##b
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifndef TCL_UNUSED
|
| 74 |
+
# if defined(__cplusplus)
|
| 75 |
+
# define TCL_UNUSED(T) T
|
| 76 |
+
# elif defined(__GNUC__) && (__GNUC__ > 2)
|
| 77 |
+
# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused))
|
| 78 |
+
# else
|
| 79 |
+
# define TCL_UNUSED(T) T JOIN(dummy, __LINE__)
|
| 80 |
+
# endif
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
#if TCL_MAJOR_VERSION == 8
|
| 84 |
+
# define ITCL_Z_MODIFIER ""
|
| 85 |
+
#else
|
| 86 |
+
# define ITCL_Z_MODIFIER TCL_Z_MODIFIER
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
/*
|
| 90 |
+
* Since the Tcl/Tk distribution doesn't perform any asserts,
|
| 91 |
+
* dynamic loading can fail to find the __assert function.
|
| 92 |
+
* As a workaround, we'll include our own.
|
| 93 |
+
*/
|
| 94 |
+
|
| 95 |
+
#undef assert
|
| 96 |
+
#if defined(NDEBUG) && !defined(DEBUG)
|
| 97 |
+
#define assert(EX) ((void)0)
|
| 98 |
+
#else /* !NDEBUG || DEBUG */
|
| 99 |
+
#define assert(EX) (void)((EX) || (Itcl_Assert(STRINGIFY(EX), __FILE__, __LINE__), 0))
|
| 100 |
+
#endif
|
| 101 |
+
|
| 102 |
+
#define ITCL_INTERP_DATA "itcl_data"
|
| 103 |
+
#define ITCL_TK_VERSION "8.6"
|
| 104 |
+
|
| 105 |
+
/*
|
| 106 |
+
* Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
|
| 107 |
+
* sets up the declarations needed for the main macro, FOREACH_HASH, which
|
| 108 |
+
* does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
|
| 109 |
+
* only iterates over values.
|
| 110 |
+
*/
|
| 111 |
+
|
| 112 |
+
#define FOREACH_HASH_DECLS \
|
| 113 |
+
Tcl_HashEntry *hPtr;Tcl_HashSearch search
|
| 114 |
+
#define FOREACH_HASH(key,val,tablePtr) \
|
| 115 |
+
for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \
|
| 116 |
+
(*(void **)&(key)=Tcl_GetHashKey((tablePtr),hPtr),\
|
| 117 |
+
*(void **)&(val)=Tcl_GetHashValue(hPtr),1):0; hPtr=Tcl_NextHashEntry(&search))
|
| 118 |
+
#define FOREACH_HASH_VALUE(val,tablePtr) \
|
| 119 |
+
for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \
|
| 120 |
+
(*(void **)&(val)=Tcl_GetHashValue(hPtr),1):0;hPtr=Tcl_NextHashEntry(&search))
|
| 121 |
+
|
| 122 |
+
/*
|
| 123 |
+
* What sort of size of things we like to allocate.
|
| 124 |
+
*/
|
| 125 |
+
|
| 126 |
+
#define ALLOC_CHUNK 8
|
| 127 |
+
|
| 128 |
+
#define ITCL_INT_NAMESPACE ITCL_NAMESPACE"::internal"
|
| 129 |
+
#define ITCL_INTDICTS_NAMESPACE ITCL_INT_NAMESPACE"::dicts"
|
| 130 |
+
#define ITCL_VARIABLES_NAMESPACE ITCL_INT_NAMESPACE"::variables"
|
| 131 |
+
#define ITCL_COMMANDS_NAMESPACE ITCL_INT_NAMESPACE"::commands"
|
| 132 |
+
|
| 133 |
+
typedef struct ItclFoundation {
|
| 134 |
+
Itcl_Stack methodCallStack;
|
| 135 |
+
Tcl_Command dispatchCommand;
|
| 136 |
+
} ItclFoundation;
|
| 137 |
+
|
| 138 |
+
typedef struct ItclArgList {
|
| 139 |
+
struct ItclArgList *nextPtr; /* pointer to next argument */
|
| 140 |
+
Tcl_Obj *namePtr; /* name of the argument */
|
| 141 |
+
Tcl_Obj *defaultValuePtr; /* default value or NULL if none */
|
| 142 |
+
} ItclArgList;
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Common info for managing all known objects.
|
| 146 |
+
* Each interpreter has one of these data structures stored as
|
| 147 |
+
* clientData in the "itcl" namespace. It is also accessible
|
| 148 |
+
* as associated data via the key ITCL_INTERP_DATA.
|
| 149 |
+
*/
|
| 150 |
+
struct ItclClass;
|
| 151 |
+
struct ItclObject;
|
| 152 |
+
struct ItclMemberFunc;
|
| 153 |
+
struct EnsembleInfo;
|
| 154 |
+
struct ItclDelegatedOption;
|
| 155 |
+
struct ItclDelegatedFunction;
|
| 156 |
+
|
| 157 |
+
typedef struct ItclObjectInfo {
|
| 158 |
+
Tcl_Interp *interp; /* interpreter that manages this info */
|
| 159 |
+
Tcl_HashTable objects; /* list of all known objects key is
|
| 160 |
+
* ioPtr */
|
| 161 |
+
Tcl_HashTable objectCmds; /* list of known objects using accessCmd */
|
| 162 |
+
Tcl_HashTable unused5; /* list of known objects using namePtr */
|
| 163 |
+
Tcl_HashTable classes; /* list of all known classes,
|
| 164 |
+
* key is iclsPtr */
|
| 165 |
+
Tcl_HashTable nameClasses; /* maps from fullNamePtr to iclsPtr */
|
| 166 |
+
Tcl_HashTable namespaceClasses; /* maps from nsPtr to iclsPtr */
|
| 167 |
+
Tcl_HashTable procMethods; /* maps from procPtr to mFunc */
|
| 168 |
+
Tcl_HashTable instances; /* maps from instanceNumber to ioPtr */
|
| 169 |
+
Tcl_HashTable unused8; /* maps from ioPtr to instanceNumber */
|
| 170 |
+
Tcl_HashTable frameContext; /* maps frame to context stack */
|
| 171 |
+
Tcl_HashTable classTypes; /* maps from class type i.e. "widget"
|
| 172 |
+
* to define value i.e. ITCL_WIDGET */
|
| 173 |
+
int protection; /* protection level currently in effect */
|
| 174 |
+
int useOldResolvers; /* whether to use the "old" style
|
| 175 |
+
* resolvers or the CallFrame resolvers */
|
| 176 |
+
Itcl_Stack clsStack; /* stack of class definitions currently
|
| 177 |
+
* being parsed */
|
| 178 |
+
Itcl_Stack unused; /* Removed */
|
| 179 |
+
Itcl_Stack unused6; /* obsolete field */
|
| 180 |
+
struct ItclObject *currIoPtr; /* object currently being constructed
|
| 181 |
+
* set only during calling of constructors
|
| 182 |
+
* otherwise NULL */
|
| 183 |
+
Tcl_ObjectMetadataType *class_meta_type;
|
| 184 |
+
/* type for getting the Itcl class info
|
| 185 |
+
* from a TclOO Tcl_Object */
|
| 186 |
+
const Tcl_ObjectMetadataType *object_meta_type;
|
| 187 |
+
/* type for getting the Itcl object info
|
| 188 |
+
* from a TclOO Tcl_Object */
|
| 189 |
+
Tcl_Object clazzObjectPtr; /* the root object of Itcl */
|
| 190 |
+
Tcl_Class clazzClassPtr; /* the root class of Itcl */
|
| 191 |
+
struct EnsembleInfo *ensembleInfo;
|
| 192 |
+
struct ItclClass *currContextIclsPtr;
|
| 193 |
+
/* context class for delegated option
|
| 194 |
+
* handling */
|
| 195 |
+
int currClassFlags; /* flags for the class just in creation */
|
| 196 |
+
int buildingWidget; /* set if in construction of a widget */
|
| 197 |
+
Tcl_Size unparsedObjc; /* number options not parsed by
|
| 198 |
+
ItclExtendedConfigure/-Cget function */
|
| 199 |
+
Tcl_Obj **unparsedObjv; /* options not parsed by
|
| 200 |
+
ItclExtendedConfigure/-Cget function */
|
| 201 |
+
int functionFlags; /* used for creating of ItclMemberCode */
|
| 202 |
+
int unused7;
|
| 203 |
+
struct ItclDelegatedOption *currIdoPtr;
|
| 204 |
+
/* the current delegated option info */
|
| 205 |
+
int inOptionHandling; /* used to indicate for type/widget ...
|
| 206 |
+
* that there is an option processing
|
| 207 |
+
* and methods are allowed to be called */
|
| 208 |
+
/* these are the Tcl_Obj Ptrs for the clazz unknown procedure */
|
| 209 |
+
/* need to store them to be able to free them at the end */
|
| 210 |
+
int itclWidgetInitted; /* set to 1 if itclWidget.tcl has already
|
| 211 |
+
* been called
|
| 212 |
+
*/
|
| 213 |
+
int itclHullCmdsInitted; /* set to 1 if itclHullCmds.tcl has already
|
| 214 |
+
* been called
|
| 215 |
+
*/
|
| 216 |
+
Tcl_Obj *unused2;
|
| 217 |
+
Tcl_Obj *unused3;
|
| 218 |
+
Tcl_Obj *unused4;
|
| 219 |
+
Tcl_Obj *infoVarsPtr;
|
| 220 |
+
Tcl_Obj *unused9;
|
| 221 |
+
Tcl_Obj *infoVars4Ptr;
|
| 222 |
+
Tcl_Obj *typeDestructorArgumentPtr;
|
| 223 |
+
struct ItclObject *lastIoPtr; /* last object constructed */
|
| 224 |
+
Tcl_Command infoCmd;
|
| 225 |
+
} ItclObjectInfo;
|
| 226 |
+
|
| 227 |
+
typedef struct EnsembleInfo {
|
| 228 |
+
Tcl_HashTable ensembles; /* list of all known ensembles */
|
| 229 |
+
Tcl_HashTable subEnsembles; /* list of all known subensembles */
|
| 230 |
+
Tcl_Size numEnsembles;
|
| 231 |
+
Tcl_Namespace *ensembleNsPtr;
|
| 232 |
+
} EnsembleInfo;
|
| 233 |
+
/*
|
| 234 |
+
* Representation for each [incr Tcl] class.
|
| 235 |
+
*/
|
| 236 |
+
#define ITCL_CLASS 0x1
|
| 237 |
+
#define ITCL_TYPE 0x2
|
| 238 |
+
#define ITCL_WIDGET 0x4
|
| 239 |
+
#define ITCL_WIDGETADAPTOR 0x8
|
| 240 |
+
#define ITCL_ECLASS 0x10
|
| 241 |
+
#define ITCL_NWIDGET 0x20
|
| 242 |
+
#define ITCL_WIDGET_FRAME 0x40
|
| 243 |
+
#define ITCL_WIDGET_LABEL_FRAME 0x80
|
| 244 |
+
#define ITCL_WIDGET_TOPLEVEL 0x100
|
| 245 |
+
#define ITCL_WIDGET_TTK_FRAME 0x200
|
| 246 |
+
#define ITCL_WIDGET_TTK_LABEL_FRAME 0x400
|
| 247 |
+
#define ITCL_WIDGET_TTK_TOPLEVEL 0x800
|
| 248 |
+
#define ITCL_CLASS_IS_DELETED 0x1000
|
| 249 |
+
#define ITCL_CLASS_IS_DESTROYED 0x2000
|
| 250 |
+
#define ITCL_CLASS_NS_IS_DESTROYED 0x4000
|
| 251 |
+
#define ITCL_CLASS_IS_RENAMED 0x8000 /* unused */
|
| 252 |
+
#define ITCL_CLASS_IS_FREED 0x10000
|
| 253 |
+
#define ITCL_CLASS_DERIVED_RELEASED 0x20000
|
| 254 |
+
#define ITCL_CLASS_NS_TEARDOWN 0x40000
|
| 255 |
+
#define ITCL_CLASS_NO_VARNS_DELETE 0x80000
|
| 256 |
+
#define ITCL_CLASS_SHOULD_VARNS_DELETE 0x100000
|
| 257 |
+
#define ITCL_CLASS_DESTRUCTOR_CALLED 0x400000
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
typedef struct ItclClass {
|
| 261 |
+
Tcl_Obj *namePtr; /* class name */
|
| 262 |
+
Tcl_Obj *fullNamePtr; /* fully qualified class name */
|
| 263 |
+
Tcl_Interp *interp; /* interpreter that manages this info */
|
| 264 |
+
Tcl_Namespace *nsPtr; /* namespace representing class scope */
|
| 265 |
+
Tcl_Command accessCmd; /* access command for creating instances */
|
| 266 |
+
Tcl_Command thisCmd; /* needed for deletion of class */
|
| 267 |
+
|
| 268 |
+
struct ItclObjectInfo *infoPtr;
|
| 269 |
+
/* info about all known objects
|
| 270 |
+
* and other stuff like stacks */
|
| 271 |
+
Itcl_List bases; /* list of base classes */
|
| 272 |
+
Itcl_List derived; /* list of all derived classes */
|
| 273 |
+
Tcl_HashTable heritage; /* table of all base classes. Look up
|
| 274 |
+
* by pointer to class definition. This
|
| 275 |
+
* provides fast lookup for inheritance
|
| 276 |
+
* tests. */
|
| 277 |
+
Tcl_Obj *initCode; /* initialization code for new objs */
|
| 278 |
+
Tcl_HashTable variables; /* definitions for all data members
|
| 279 |
+
in this class. Look up simple string
|
| 280 |
+
names and get back ItclVariable* ptrs */
|
| 281 |
+
Tcl_HashTable options; /* definitions for all option members
|
| 282 |
+
in this class. Look up simple string
|
| 283 |
+
names and get back ItclOption* ptrs */
|
| 284 |
+
Tcl_HashTable components; /* definitions for all component members
|
| 285 |
+
in this class. Look up simple string
|
| 286 |
+
names and get back ItclComponent* ptrs */
|
| 287 |
+
Tcl_HashTable functions; /* definitions for all member functions
|
| 288 |
+
in this class. Look up simple string
|
| 289 |
+
names and get back ItclMemberFunc* ptrs */
|
| 290 |
+
Tcl_HashTable delegatedOptions; /* definitions for all delegated options
|
| 291 |
+
in this class. Look up simple string
|
| 292 |
+
names and get back
|
| 293 |
+
ItclDelegatedOption * ptrs */
|
| 294 |
+
Tcl_HashTable delegatedFunctions; /* definitions for all delegated methods
|
| 295 |
+
or procs in this class. Look up simple
|
| 296 |
+
string names and get back
|
| 297 |
+
ItclDelegatedFunction * ptrs */
|
| 298 |
+
Tcl_HashTable methodVariables; /* definitions for all methodvariable members
|
| 299 |
+
in this class. Look up simple string
|
| 300 |
+
names and get back
|
| 301 |
+
ItclMethodVariable* ptrs */
|
| 302 |
+
Tcl_Size numInstanceVars; /* number of instance vars in variables
|
| 303 |
+
table */
|
| 304 |
+
Tcl_HashTable classCommons; /* used for storing variable namespace
|
| 305 |
+
* string for Tcl_Resolve */
|
| 306 |
+
Tcl_HashTable resolveVars; /* all possible names for variables in
|
| 307 |
+
* this class (e.g., x, foo::x, etc.) */
|
| 308 |
+
Tcl_HashTable resolveCmds; /* all possible names for functions in
|
| 309 |
+
* this class (e.g., x, foo::x, etc.) */
|
| 310 |
+
Tcl_HashTable contextCache; /* cache for function contexts */
|
| 311 |
+
struct ItclMemberFunc *unused2;
|
| 312 |
+
/* the class constructor or NULL */
|
| 313 |
+
struct ItclMemberFunc *unused3;
|
| 314 |
+
/* the class destructor or NULL */
|
| 315 |
+
struct ItclMemberFunc *unused1;
|
| 316 |
+
Tcl_Resolve *resolvePtr;
|
| 317 |
+
Tcl_Obj *widgetClassPtr; /* class name for widget if class is a
|
| 318 |
+
* ::itcl::widget */
|
| 319 |
+
Tcl_Obj *hullTypePtr; /* hulltype name for widget if class is a
|
| 320 |
+
* ::itcl::widget */
|
| 321 |
+
Tcl_Object oPtr; /* TclOO class object */
|
| 322 |
+
Tcl_Class clsPtr; /* TclOO class */
|
| 323 |
+
Tcl_Size numCommons; /* number of commons in this class */
|
| 324 |
+
Tcl_Size numVariables; /* number of variables in this class */
|
| 325 |
+
Tcl_Size numOptions; /* number of options in this class */
|
| 326 |
+
Tcl_Size unique; /* unique number for #auto generation */
|
| 327 |
+
int flags; /* maintains class status */
|
| 328 |
+
Tcl_Size callRefCount; /* prevent deleting of class if refcount>1 */
|
| 329 |
+
Tcl_Obj *typeConstructorPtr; /* initialization for types */
|
| 330 |
+
int destructorHasBeenCalled; /* prevent multiple invocations of destrcutor */
|
| 331 |
+
Tcl_Size refCount;
|
| 332 |
+
} ItclClass;
|
| 333 |
+
|
| 334 |
+
typedef struct ItclHierIter {
|
| 335 |
+
ItclClass *current; /* current position in hierarchy */
|
| 336 |
+
Itcl_Stack stack; /* stack used for traversal */
|
| 337 |
+
} ItclHierIter;
|
| 338 |
+
|
| 339 |
+
#define ITCL_OBJECT_IS_DELETED 0x01
|
| 340 |
+
#define ITCL_OBJECT_IS_DESTRUCTED 0x02
|
| 341 |
+
#define ITCL_OBJECT_IS_DESTROYED 0x04
|
| 342 |
+
#define ITCL_OBJECT_IS_RENAMED 0x08
|
| 343 |
+
#define ITCL_OBJECT_CLASS_DESTRUCTED 0x10
|
| 344 |
+
#define ITCL_TCLOO_OBJECT_IS_DELETED 0x20
|
| 345 |
+
#define ITCL_OBJECT_DESTRUCT_ERROR 0x40
|
| 346 |
+
#define ITCL_OBJECT_SHOULD_VARNS_DELETE 0x80
|
| 347 |
+
#define ITCL_OBJECT_ROOT_METHOD 0x8000
|
| 348 |
+
|
| 349 |
+
/*
|
| 350 |
+
* Representation for each [incr Tcl] object.
|
| 351 |
+
*/
|
| 352 |
+
typedef struct ItclObject {
|
| 353 |
+
ItclClass *iclsPtr; /* most-specific class */
|
| 354 |
+
Tcl_Command accessCmd; /* object access command */
|
| 355 |
+
|
| 356 |
+
Tcl_HashTable *constructed; /* temp storage used during construction */
|
| 357 |
+
Tcl_HashTable *destructed; /* temp storage used during destruction */
|
| 358 |
+
Tcl_HashTable objectVariables;
|
| 359 |
+
/* used for storing Tcl_Var entries for
|
| 360 |
+
* variable resolving, key is ivPtr of
|
| 361 |
+
* variable, value is varPtr */
|
| 362 |
+
Tcl_HashTable objectOptions; /* definitions for all option members
|
| 363 |
+
in this object. Look up option namePtr
|
| 364 |
+
names and get back ItclOption* ptrs */
|
| 365 |
+
Tcl_HashTable objectComponents; /* definitions for all component members
|
| 366 |
+
in this object. Look up component namePtr
|
| 367 |
+
names and get back ItclComponent* ptrs */
|
| 368 |
+
Tcl_HashTable objectMethodVariables;
|
| 369 |
+
/* definitions for all methodvariable members
|
| 370 |
+
in this object. Look up methodvariable
|
| 371 |
+
namePtr names and get back
|
| 372 |
+
ItclMethodVariable* ptrs */
|
| 373 |
+
Tcl_HashTable objectDelegatedOptions;
|
| 374 |
+
/* definitions for all delegated option
|
| 375 |
+
members in this object. Look up option
|
| 376 |
+
namePtr names and get back
|
| 377 |
+
ItclOption* ptrs */
|
| 378 |
+
Tcl_HashTable objectDelegatedFunctions;
|
| 379 |
+
/* definitions for all delegated function
|
| 380 |
+
members in this object. Look up function
|
| 381 |
+
namePtr names and get back
|
| 382 |
+
ItclMemberFunc * ptrs */
|
| 383 |
+
Tcl_HashTable contextCache; /* cache for function contexts */
|
| 384 |
+
Tcl_Obj *namePtr;
|
| 385 |
+
Tcl_Obj *origNamePtr; /* the original name before any rename */
|
| 386 |
+
Tcl_Obj *createNamePtr; /* the temp name before any rename
|
| 387 |
+
* mostly used for widgetadaptor
|
| 388 |
+
* because that hijackes the name
|
| 389 |
+
* often when installing the hull */
|
| 390 |
+
Tcl_Interp *interp;
|
| 391 |
+
ItclObjectInfo *infoPtr;
|
| 392 |
+
Tcl_Obj *varNsNamePtr;
|
| 393 |
+
Tcl_Object oPtr; /* the TclOO object */
|
| 394 |
+
Tcl_Resolve *resolvePtr;
|
| 395 |
+
int flags;
|
| 396 |
+
Tcl_Size callRefCount; /* prevent deleting of object if refcount > 1 */
|
| 397 |
+
Tcl_Obj *hullWindowNamePtr; /* the window path name for the hull
|
| 398 |
+
* (before renaming in installhull) */
|
| 399 |
+
int destructorHasBeenCalled; /* is set when the destructor is called
|
| 400 |
+
* to avoid callin destructor twice */
|
| 401 |
+
int noComponentTrace; /* don't call component traces if
|
| 402 |
+
* setting components in DelegationInstall */
|
| 403 |
+
int hadConstructorError; /* needed for multiple calls of CallItclObjectCmd */
|
| 404 |
+
} ItclObject;
|
| 405 |
+
|
| 406 |
+
#define ITCL_IGNORE_ERRS 0x002 /* useful for construction/destruction */
|
| 407 |
+
|
| 408 |
+
typedef struct ItclResolveInfo {
|
| 409 |
+
int flags;
|
| 410 |
+
ItclClass *iclsPtr;
|
| 411 |
+
ItclObject *ioPtr;
|
| 412 |
+
} ItclResolveInfo;
|
| 413 |
+
|
| 414 |
+
#define ITCL_RESOLVE_CLASS 0x01
|
| 415 |
+
#define ITCL_RESOLVE_OBJECT 0x02
|
| 416 |
+
|
| 417 |
+
/*
|
| 418 |
+
* Implementation for any code body in an [incr Tcl] class.
|
| 419 |
+
*/
|
| 420 |
+
typedef struct ItclMemberCode {
|
| 421 |
+
int flags; /* flags describing implementation */
|
| 422 |
+
Tcl_Size argcount; /* number of args in arglist */
|
| 423 |
+
Tcl_Size maxargcount; /* max number of args in arglist */
|
| 424 |
+
Tcl_Obj *usagePtr; /* usage string for error messages */
|
| 425 |
+
Tcl_Obj *argumentPtr; /* the function arguments */
|
| 426 |
+
Tcl_Obj *bodyPtr; /* the function body */
|
| 427 |
+
ItclArgList *argListPtr; /* the parsed arguments */
|
| 428 |
+
union {
|
| 429 |
+
Tcl_CmdProc *argCmd; /* (argc,argv) C implementation */
|
| 430 |
+
Tcl_ObjCmdProc *objCmd; /* (objc,objv) C implementation */
|
| 431 |
+
} cfunc;
|
| 432 |
+
void *clientData; /* client data for C implementations */
|
| 433 |
+
} ItclMemberCode;
|
| 434 |
+
|
| 435 |
+
/*
|
| 436 |
+
* Flag bits for ItclMemberCode:
|
| 437 |
+
*/
|
| 438 |
+
#define ITCL_IMPLEMENT_NONE 0x001 /* no implementation */
|
| 439 |
+
#define ITCL_IMPLEMENT_TCL 0x002 /* Tcl implementation */
|
| 440 |
+
#define ITCL_IMPLEMENT_ARGCMD 0x004 /* (argc,argv) C implementation */
|
| 441 |
+
#define ITCL_IMPLEMENT_OBJCMD 0x008 /* (objc,objv) C implementation */
|
| 442 |
+
#define ITCL_IMPLEMENT_C 0x00c /* either kind of C implementation */
|
| 443 |
+
|
| 444 |
+
#define Itcl_IsMemberCodeImplemented(mcode) \
|
| 445 |
+
(((mcode)->flags & ITCL_IMPLEMENT_NONE) == 0)
|
| 446 |
+
|
| 447 |
+
/*
|
| 448 |
+
* Flag bits for ItclMember: functions and variables
|
| 449 |
+
*/
|
| 450 |
+
#define ITCL_COMMON 0x010 /* non-zero => is a "proc" or common
|
| 451 |
+
* variable */
|
| 452 |
+
|
| 453 |
+
/*
|
| 454 |
+
* Flag bits for ItclMember: functions
|
| 455 |
+
*/
|
| 456 |
+
#define ITCL_CONSTRUCTOR 0x020 /* non-zero => is a constructor */
|
| 457 |
+
#define ITCL_DESTRUCTOR 0x040 /* non-zero => is a destructor */
|
| 458 |
+
#define ITCL_ARG_SPEC 0x080 /* non-zero => has an argument spec */
|
| 459 |
+
#define ITCL_BODY_SPEC 0x100 /* non-zero => has an body spec */
|
| 460 |
+
#define ITCL_BUILTIN 0x400 /* non-zero => built-in method */
|
| 461 |
+
#define ITCL_COMPONENT 0x800 /* non-zero => component */
|
| 462 |
+
#define ITCL_TYPE_METHOD 0x1000 /* non-zero => typemethod */
|
| 463 |
+
#define ITCL_METHOD 0x2000 /* non-zero => method */
|
| 464 |
+
|
| 465 |
+
/*
|
| 466 |
+
* Flag bits for ItclMember: variables
|
| 467 |
+
*/
|
| 468 |
+
#define ITCL_THIS_VAR 0x20 /* non-zero => built-in "this" variable */
|
| 469 |
+
#define ITCL_OPTIONS_VAR 0x40 /* non-zero => built-in "itcl_options"
|
| 470 |
+
* variable */
|
| 471 |
+
#define ITCL_TYPE_VAR 0x80 /* non-zero => built-in "type" variable */
|
| 472 |
+
/* no longer used ??? */
|
| 473 |
+
#define ITCL_SELF_VAR 0x100 /* non-zero => built-in "self" variable */
|
| 474 |
+
#define ITCL_SELFNS_VAR 0x200 /* non-zero => built-in "selfns"
|
| 475 |
+
* variable */
|
| 476 |
+
#define ITCL_WIN_VAR 0x400 /* non-zero => built-in "win" variable */
|
| 477 |
+
#define ITCL_COMPONENT_VAR 0x800 /* non-zero => component variable */
|
| 478 |
+
#define ITCL_HULL_VAR 0x1000 /* non-zero => built-in "itcl_hull"
|
| 479 |
+
* variable */
|
| 480 |
+
#define ITCL_OPTION_READONLY 0x2000 /* non-zero => readonly */
|
| 481 |
+
#define ITCL_VARIABLE 0x4000 /* non-zero => normal variable */
|
| 482 |
+
#define ITCL_TYPE_VARIABLE 0x8000 /* non-zero => typevariable */
|
| 483 |
+
#define ITCL_OPTION_INITTED 0x10000 /* non-zero => option has been initialized */
|
| 484 |
+
#define ITCL_OPTION_COMP_VAR 0x20000 /* variable to collect option components of extendedclass */
|
| 485 |
+
|
| 486 |
+
/*
|
| 487 |
+
* Instance components.
|
| 488 |
+
*/
|
| 489 |
+
struct ItclVariable;
|
| 490 |
+
typedef struct ItclComponent {
|
| 491 |
+
Tcl_Obj *namePtr; /* member name */
|
| 492 |
+
struct ItclVariable *ivPtr; /* variable for this component */
|
| 493 |
+
int flags;
|
| 494 |
+
int haveKeptOptions;
|
| 495 |
+
Tcl_HashTable keptOptions; /* table of options to keep */
|
| 496 |
+
} ItclComponent;
|
| 497 |
+
|
| 498 |
+
#define ITCL_COMPONENT_INHERIT 0x01
|
| 499 |
+
#define ITCL_COMPONENT_PUBLIC 0x02
|
| 500 |
+
|
| 501 |
+
typedef struct ItclDelegatedFunction {
|
| 502 |
+
Tcl_Obj *namePtr;
|
| 503 |
+
ItclComponent *icPtr;
|
| 504 |
+
Tcl_Obj *asPtr;
|
| 505 |
+
Tcl_Obj *usingPtr;
|
| 506 |
+
Tcl_HashTable exceptions;
|
| 507 |
+
int flags;
|
| 508 |
+
} ItclDelegatedFunction;
|
| 509 |
+
|
| 510 |
+
/*
|
| 511 |
+
* Representation of member functions in an [incr Tcl] class.
|
| 512 |
+
*/
|
| 513 |
+
typedef struct ItclMemberFunc {
|
| 514 |
+
Tcl_Obj* namePtr; /* member name */
|
| 515 |
+
Tcl_Obj* fullNamePtr; /* member name with "class::" qualifier */
|
| 516 |
+
ItclClass* iclsPtr; /* class containing this member */
|
| 517 |
+
int protection; /* protection level */
|
| 518 |
+
int flags; /* flags describing member (see above) */
|
| 519 |
+
ItclObjectInfo *infoPtr;
|
| 520 |
+
ItclMemberCode *codePtr; /* code associated with member */
|
| 521 |
+
Tcl_Command accessCmd; /* Tcl command installed for this function */
|
| 522 |
+
Tcl_Size argcount; /* number of args in arglist */
|
| 523 |
+
Tcl_Size maxargcount; /* max number of args in arglist */
|
| 524 |
+
Tcl_Obj *usagePtr; /* usage string for error messages */
|
| 525 |
+
Tcl_Obj *argumentPtr; /* the function arguments */
|
| 526 |
+
Tcl_Obj *builtinArgumentPtr; /* the function arguments for builtin functions */
|
| 527 |
+
Tcl_Obj *origArgsPtr; /* the argument string of the original definition */
|
| 528 |
+
Tcl_Obj *bodyPtr; /* the function body */
|
| 529 |
+
ItclArgList *argListPtr; /* the parsed arguments */
|
| 530 |
+
ItclClass *declaringClassPtr; /* the class which declared the method/proc */
|
| 531 |
+
void *tmPtr; /* TclOO methodPtr */
|
| 532 |
+
ItclDelegatedFunction *idmPtr;
|
| 533 |
+
/* if the function is delegated != NULL */
|
| 534 |
+
} ItclMemberFunc;
|
| 535 |
+
|
| 536 |
+
/*
|
| 537 |
+
* Instance variables.
|
| 538 |
+
*/
|
| 539 |
+
typedef struct ItclVariable {
|
| 540 |
+
Tcl_Obj *namePtr; /* member name */
|
| 541 |
+
Tcl_Obj *fullNamePtr; /* member name with "class::" qualifier */
|
| 542 |
+
ItclClass *iclsPtr; /* class containing this member */
|
| 543 |
+
ItclObjectInfo *infoPtr;
|
| 544 |
+
ItclMemberCode *codePtr; /* code associated with member */
|
| 545 |
+
Tcl_Obj *init; /* initial value */
|
| 546 |
+
Tcl_Obj *arrayInitPtr; /* initial value if variable should be array */
|
| 547 |
+
int protection; /* protection level */
|
| 548 |
+
int flags; /* flags describing member (see below) */
|
| 549 |
+
int initted; /* is set when first time initted, to check
|
| 550 |
+
* for example itcl_hull var, which can be only
|
| 551 |
+
* initialized once */
|
| 552 |
+
} ItclVariable;
|
| 553 |
+
|
| 554 |
+
|
| 555 |
+
struct ItclOption;
|
| 556 |
+
|
| 557 |
+
typedef struct ItclDelegatedOption {
|
| 558 |
+
Tcl_Obj *namePtr;
|
| 559 |
+
Tcl_Obj *resourceNamePtr;
|
| 560 |
+
Tcl_Obj *classNamePtr;
|
| 561 |
+
struct ItclOption *ioptPtr; /* the option name or null for "*" */
|
| 562 |
+
ItclComponent *icPtr; /* the component where the delegation goes
|
| 563 |
+
* to */
|
| 564 |
+
Tcl_Obj *asPtr;
|
| 565 |
+
Tcl_HashTable exceptions; /* exceptions from delegation */
|
| 566 |
+
} ItclDelegatedOption;
|
| 567 |
+
|
| 568 |
+
/*
|
| 569 |
+
* Instance options.
|
| 570 |
+
*/
|
| 571 |
+
typedef struct ItclOption {
|
| 572 |
+
/* within a class hierarchy there must be only
|
| 573 |
+
* one option with the same name !! */
|
| 574 |
+
Tcl_Obj *namePtr; /* member name */
|
| 575 |
+
Tcl_Obj *fullNamePtr; /* member name with "class::" qualifier */
|
| 576 |
+
Tcl_Obj *resourceNamePtr;
|
| 577 |
+
Tcl_Obj *classNamePtr;
|
| 578 |
+
ItclClass *iclsPtr; /* class containing this member */
|
| 579 |
+
int protection; /* protection level */
|
| 580 |
+
int flags; /* flags describing member (see below) */
|
| 581 |
+
ItclMemberCode *codePtr; /* code associated with member */
|
| 582 |
+
Tcl_Obj *defaultValuePtr; /* initial value */
|
| 583 |
+
Tcl_Obj *cgetMethodPtr;
|
| 584 |
+
Tcl_Obj *cgetMethodVarPtr;
|
| 585 |
+
Tcl_Obj *configureMethodPtr;
|
| 586 |
+
Tcl_Obj *configureMethodVarPtr;
|
| 587 |
+
Tcl_Obj *validateMethodPtr;
|
| 588 |
+
Tcl_Obj *validateMethodVarPtr;
|
| 589 |
+
ItclDelegatedOption *idoPtr;
|
| 590 |
+
/* if the option is delegated != NULL */
|
| 591 |
+
} ItclOption;
|
| 592 |
+
|
| 593 |
+
/*
|
| 594 |
+
* Instance methodvariables.
|
| 595 |
+
*/
|
| 596 |
+
typedef struct ItclMethodVariable {
|
| 597 |
+
Tcl_Obj *namePtr; /* member name */
|
| 598 |
+
Tcl_Obj *fullNamePtr; /* member name with "class::" qualifier */
|
| 599 |
+
ItclClass *iclsPtr; /* class containing this member */
|
| 600 |
+
int protection; /* protection level */
|
| 601 |
+
int flags; /* flags describing member (see below) */
|
| 602 |
+
Tcl_Obj *defaultValuePtr;
|
| 603 |
+
Tcl_Obj *callbackPtr;
|
| 604 |
+
} ItclMethodVariable;
|
| 605 |
+
|
| 606 |
+
#define VAR_TYPE_VARIABLE 1
|
| 607 |
+
#define VAR_TYPE_COMMON 2
|
| 608 |
+
|
| 609 |
+
#define CMD_TYPE_METHOD 1
|
| 610 |
+
#define CMD_TYPE_PROC 2
|
| 611 |
+
|
| 612 |
+
typedef struct ItclClassCmdInfo {
|
| 613 |
+
int type;
|
| 614 |
+
int protection;
|
| 615 |
+
#if TCL_MAJOR_VERSION == 8
|
| 616 |
+
int cmdNum; /* not actually used */
|
| 617 |
+
#endif
|
| 618 |
+
Tcl_Namespace *nsPtr;
|
| 619 |
+
Tcl_Namespace *declaringNsPtr;
|
| 620 |
+
} ItclClassCmdInfo;
|
| 621 |
+
|
| 622 |
+
/*
|
| 623 |
+
* Instance variable lookup entry.
|
| 624 |
+
*/
|
| 625 |
+
typedef struct ItclVarLookup {
|
| 626 |
+
ItclVariable* ivPtr; /* variable definition */
|
| 627 |
+
int usage; /* number of uses for this record */
|
| 628 |
+
int accessible; /* non-zero => accessible from class with
|
| 629 |
+
* this lookup record in its resolveVars */
|
| 630 |
+
char *leastQualName; /* simplist name for this variable, with
|
| 631 |
+
* the fewest qualifiers. This string is
|
| 632 |
+
* taken from the resolveVars table, so
|
| 633 |
+
* it shouldn't be freed. */
|
| 634 |
+
Tcl_Size varNum;
|
| 635 |
+
Tcl_Var varPtr;
|
| 636 |
+
} ItclVarLookup;
|
| 637 |
+
|
| 638 |
+
/*
|
| 639 |
+
* Instance command lookup entry.
|
| 640 |
+
*/
|
| 641 |
+
typedef struct ItclCmdLookup {
|
| 642 |
+
ItclMemberFunc* imPtr; /* function definition */
|
| 643 |
+
#if TCL_MAJOR_VERSION == 8
|
| 644 |
+
int cmdNum; /* not actually used */
|
| 645 |
+
#endif
|
| 646 |
+
ItclClassCmdInfo *classCmdInfoPtr;
|
| 647 |
+
Tcl_Command cmdPtr;
|
| 648 |
+
} ItclCmdLookup;
|
| 649 |
+
|
| 650 |
+
typedef struct ItclCallContext {
|
| 651 |
+
int objectFlags;
|
| 652 |
+
Tcl_Namespace *nsPtr;
|
| 653 |
+
ItclObject *ioPtr;
|
| 654 |
+
ItclMemberFunc *imPtr;
|
| 655 |
+
Tcl_Size refCount;
|
| 656 |
+
} ItclCallContext;
|
| 657 |
+
|
| 658 |
+
/*
|
| 659 |
+
* The macro below is used to modify a "char" value (e.g. by casting
|
| 660 |
+
* it to an unsigned character) so that it can be used safely with
|
| 661 |
+
* macros such as isspace.
|
| 662 |
+
*/
|
| 663 |
+
|
| 664 |
+
#define UCHAR(c) ((unsigned char) (c))
|
| 665 |
+
/*
|
| 666 |
+
* Macros used to cast between pointers and integers (e.g. when storing an int
|
| 667 |
+
* in ClientData), on 64-bit architectures they avoid gcc warning about "cast
|
| 668 |
+
* to/from pointer from/to integer of different size".
|
| 669 |
+
*/
|
| 670 |
+
|
| 671 |
+
#if !defined(INT2PTR)
|
| 672 |
+
# define INT2PTR(p) ((void *)(ptrdiff_t)(p))
|
| 673 |
+
#endif
|
| 674 |
+
#if !defined(PTR2INT)
|
| 675 |
+
# define PTR2INT(p) ((ptrdiff_t)(p))
|
| 676 |
+
#endif
|
| 677 |
+
|
| 678 |
+
#ifdef ITCL_DEBUG
|
| 679 |
+
MODULE_SCOPE int _itcl_debug_level;
|
| 680 |
+
MODULE_SCOPE void ItclShowArgs(int level, const char *str, size_t objc,
|
| 681 |
+
Tcl_Obj *const *objv);
|
| 682 |
+
#else
|
| 683 |
+
#define ItclShowArgs(a,b,c,d) do {(void)(c);(void)(d);} while(0)
|
| 684 |
+
#endif
|
| 685 |
+
|
| 686 |
+
MODULE_SCOPE Tcl_ObjCmdProc ItclCallCCommand;
|
| 687 |
+
MODULE_SCOPE Tcl_ObjCmdProc ItclObjectUnknownCommand;
|
| 688 |
+
MODULE_SCOPE int ItclCheckCallProc(void *clientData, Tcl_Interp *interp,
|
| 689 |
+
Tcl_ObjectContext contextPtr, Tcl_CallFrame *framePtr, int *isFinished);
|
| 690 |
+
|
| 691 |
+
MODULE_SCOPE void ItclPreserveClass(ItclClass *iclsPtr);
|
| 692 |
+
MODULE_SCOPE void ItclReleaseClass(void *iclsPtr);
|
| 693 |
+
|
| 694 |
+
MODULE_SCOPE ItclFoundation *ItclGetFoundation(Tcl_Interp *interp);
|
| 695 |
+
MODULE_SCOPE Tcl_ObjCmdProc ItclClassCommandDispatcher;
|
| 696 |
+
MODULE_SCOPE Tcl_Command Itcl_CmdAliasProc(Tcl_Interp *interp,
|
| 697 |
+
Tcl_Namespace *nsPtr, const char *cmdName, void *clientData);
|
| 698 |
+
MODULE_SCOPE Tcl_Var Itcl_VarAliasProc(Tcl_Interp *interp,
|
| 699 |
+
Tcl_Namespace *nsPtr, const char *VarName, void *clientData);
|
| 700 |
+
MODULE_SCOPE int ItclIsClass(Tcl_Interp *interp, Tcl_Command cmd);
|
| 701 |
+
MODULE_SCOPE int ItclCheckCallMethod(void *clientData, Tcl_Interp *interp,
|
| 702 |
+
Tcl_ObjectContext contextPtr, Tcl_CallFrame *framePtr, int *isFinished);
|
| 703 |
+
MODULE_SCOPE int ItclAfterCallMethod(void *clientData, Tcl_Interp *interp,
|
| 704 |
+
Tcl_ObjectContext contextPtr, Tcl_Namespace *nsPtr, int result);
|
| 705 |
+
MODULE_SCOPE void ItclReportObjectUsage(Tcl_Interp *interp,
|
| 706 |
+
ItclObject *contextIoPtr, Tcl_Namespace *callerNsPtr,
|
| 707 |
+
Tcl_Namespace *contextNsPtr);
|
| 708 |
+
MODULE_SCOPE int ItclMapMethodNameProc(Tcl_Interp *interp, Tcl_Object oPtr,
|
| 709 |
+
Tcl_Class *startClsPtr, Tcl_Obj *methodObj);
|
| 710 |
+
MODULE_SCOPE int ItclCreateArgList(Tcl_Interp *interp, const char *str,
|
| 711 |
+
Tcl_Size *argcPtr, Tcl_Size *maxArgcPtr, Tcl_Obj **usagePtr,
|
| 712 |
+
ItclArgList **arglistPtrPtr, ItclMemberFunc *imPtr,
|
| 713 |
+
const char *commandName);
|
| 714 |
+
MODULE_SCOPE int ItclObjectCmd(void *clientData, Tcl_Interp *interp,
|
| 715 |
+
Tcl_Object oPtr, Tcl_Class clsPtr, size_t objc, Tcl_Obj *const *objv);
|
| 716 |
+
MODULE_SCOPE int ItclCreateObject (Tcl_Interp *interp, const char* name,
|
| 717 |
+
ItclClass *iclsPtr, size_t objc, Tcl_Obj *const objv[]);
|
| 718 |
+
MODULE_SCOPE void ItclDeleteObjectVariablesNamespace(Tcl_Interp *interp,
|
| 719 |
+
ItclObject *ioPtr);
|
| 720 |
+
MODULE_SCOPE void ItclDeleteClassVariablesNamespace(Tcl_Interp *interp,
|
| 721 |
+
ItclClass *iclsPtr);
|
| 722 |
+
MODULE_SCOPE int ItclInfoInit(Tcl_Interp *interp, ItclObjectInfo *infoPtr);
|
| 723 |
+
|
| 724 |
+
MODULE_SCOPE Tcl_HashEntry *ItclResolveVarEntry(
|
| 725 |
+
ItclClass* iclsPtr, const char *varName);
|
| 726 |
+
|
| 727 |
+
struct Tcl_ResolvedVarInfo;
|
| 728 |
+
MODULE_SCOPE int Itcl_ClassCmdResolver(Tcl_Interp *interp, const char* name,
|
| 729 |
+
Tcl_Namespace *nsPtr, int flags, Tcl_Command *rPtr);
|
| 730 |
+
MODULE_SCOPE int Itcl_ClassVarResolver(Tcl_Interp *interp, const char* name,
|
| 731 |
+
Tcl_Namespace *nsPtr, int flags, Tcl_Var *rPtr);
|
| 732 |
+
MODULE_SCOPE int Itcl_ClassCompiledVarResolver(Tcl_Interp *interp,
|
| 733 |
+
const char* name, Tcl_Size length, Tcl_Namespace *nsPtr,
|
| 734 |
+
struct Tcl_ResolvedVarInfo **rPtr);
|
| 735 |
+
MODULE_SCOPE int Itcl_ClassCmdResolver2(Tcl_Interp *interp, const char* name,
|
| 736 |
+
Tcl_Namespace *nsPtr, int flags, Tcl_Command *rPtr);
|
| 737 |
+
MODULE_SCOPE int Itcl_ClassVarResolver2(Tcl_Interp *interp, const char* name,
|
| 738 |
+
Tcl_Namespace *nsPtr, int flags, Tcl_Var *rPtr);
|
| 739 |
+
MODULE_SCOPE int ItclSetParserResolver(Tcl_Namespace *nsPtr);
|
| 740 |
+
MODULE_SCOPE void ItclProcErrorProc(Tcl_Interp *interp, Tcl_Obj *procNameObj);
|
| 741 |
+
MODULE_SCOPE int Itcl_CreateOption (Tcl_Interp *interp, ItclClass *iclsPtr,
|
| 742 |
+
ItclOption *ioptPtr);
|
| 743 |
+
MODULE_SCOPE int ItclCreateMethodVariable(Tcl_Interp *interp,
|
| 744 |
+
ItclVariable *ivPtr, Tcl_Obj* defaultPtr, Tcl_Obj* callbackPtr,
|
| 745 |
+
ItclMethodVariable** imvPtrPtr);
|
| 746 |
+
MODULE_SCOPE int DelegationInstall(Tcl_Interp *interp, ItclObject *ioPtr,
|
| 747 |
+
ItclClass *iclsPtr);
|
| 748 |
+
MODULE_SCOPE ItclClass *ItclNamespace2Class(Tcl_Namespace *nsPtr);
|
| 749 |
+
MODULE_SCOPE const char* ItclGetCommonInstanceVar(Tcl_Interp *interp,
|
| 750 |
+
const char *name, const char *name2, ItclObject *contextIoPtr,
|
| 751 |
+
ItclClass *contextIclsPtr);
|
| 752 |
+
MODULE_SCOPE int ItclCreateMethod(Tcl_Interp* interp, ItclClass *iclsPtr,
|
| 753 |
+
Tcl_Obj *namePtr, const char* arglist, const char* body,
|
| 754 |
+
ItclMemberFunc **imPtrPtr);
|
| 755 |
+
MODULE_SCOPE int Itcl_WidgetParseInit(Tcl_Interp *interp,
|
| 756 |
+
ItclObjectInfo *infoPtr);
|
| 757 |
+
MODULE_SCOPE void ItclDeleteObjectMetadata(void *clientData);
|
| 758 |
+
MODULE_SCOPE void ItclDeleteClassMetadata(void *clientData);
|
| 759 |
+
MODULE_SCOPE void ItclDeleteArgList(ItclArgList *arglistPtr);
|
| 760 |
+
MODULE_SCOPE int Itcl_ClassOptionCmd(void *clientData, Tcl_Interp *interp,
|
| 761 |
+
int objc, Tcl_Obj *const objv[]);
|
| 762 |
+
MODULE_SCOPE int DelegatedOptionsInstall(Tcl_Interp *interp,
|
| 763 |
+
ItclClass *iclsPtr);
|
| 764 |
+
MODULE_SCOPE int Itcl_HandleDelegateOptionCmd(Tcl_Interp *interp,
|
| 765 |
+
ItclObject *ioPtr, ItclClass *iclsPtr, ItclDelegatedOption **idoPtrPtr,
|
| 766 |
+
Tcl_Size objc, Tcl_Obj *const objv[]);
|
| 767 |
+
MODULE_SCOPE int Itcl_HandleDelegateMethodCmd(Tcl_Interp *interp,
|
| 768 |
+
ItclObject *ioPtr, ItclClass *iclsPtr,
|
| 769 |
+
ItclDelegatedFunction **idmPtrPtr, Tcl_Size objc, Tcl_Obj *const objv[]);
|
| 770 |
+
MODULE_SCOPE int DelegateFunction(Tcl_Interp *interp, ItclObject *ioPtr,
|
| 771 |
+
ItclClass *iclsPtr, Tcl_Obj *componentNamePtr,
|
| 772 |
+
ItclDelegatedFunction *idmPtr);
|
| 773 |
+
MODULE_SCOPE int ItclInitObjectMethodVariables(Tcl_Interp *interp,
|
| 774 |
+
ItclObject *ioPtr, ItclClass *iclsPtr, const char *name);
|
| 775 |
+
MODULE_SCOPE int InitTclOOFunctionPointers(Tcl_Interp *interp);
|
| 776 |
+
MODULE_SCOPE ItclOption* ItclNewOption(Tcl_Interp *interp, ItclObject *ioPtr,
|
| 777 |
+
ItclClass *iclsPtr, Tcl_Obj *namePtr, const char *resourceName,
|
| 778 |
+
const char *className, char *init, ItclMemberCode *mCodePtr);
|
| 779 |
+
MODULE_SCOPE int ItclParseOption(ItclObjectInfo *infoPtr, Tcl_Interp *interp,
|
| 780 |
+
size_t objc, Tcl_Obj *const objv[], ItclClass *iclsPtr,
|
| 781 |
+
ItclObject *ioPtr, ItclOption **ioptPtrPtr);
|
| 782 |
+
MODULE_SCOPE void ItclDestroyClassNamesp(void *cdata);
|
| 783 |
+
MODULE_SCOPE int ExpandDelegateAs(Tcl_Interp *interp, ItclObject *ioPtr,
|
| 784 |
+
ItclClass *iclsPtr, ItclDelegatedFunction *idmPtr,
|
| 785 |
+
const char *funcName, Tcl_Obj *listPtr);
|
| 786 |
+
MODULE_SCOPE int ItclCheckForInitializedComponents(Tcl_Interp *interp,
|
| 787 |
+
ItclClass *iclsPtr, ItclObject *ioPtr);
|
| 788 |
+
MODULE_SCOPE int ItclCreateDelegatedFunction(Tcl_Interp *interp,
|
| 789 |
+
ItclClass *iclsPtr, Tcl_Obj *methodNamePtr, ItclComponent *icPtr,
|
| 790 |
+
Tcl_Obj *targetPtr, Tcl_Obj *usingPtr, Tcl_Obj *exceptionsPtr,
|
| 791 |
+
ItclDelegatedFunction **idmPtrPtr);
|
| 792 |
+
MODULE_SCOPE void ItclDeleteDelegatedOption(char *cdata);
|
| 793 |
+
MODULE_SCOPE void Itcl_FinishList();
|
| 794 |
+
MODULE_SCOPE void ItclDeleteDelegatedFunction(ItclDelegatedFunction *idmPtr);
|
| 795 |
+
MODULE_SCOPE void ItclFinishEnsemble(ItclObjectInfo *infoPtr);
|
| 796 |
+
MODULE_SCOPE int Itcl_EnsembleDeleteCmd(void *clientData,
|
| 797 |
+
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
|
| 798 |
+
MODULE_SCOPE int ItclAddClassesDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr);
|
| 799 |
+
MODULE_SCOPE int ItclDeleteClassesDictInfo(Tcl_Interp *interp,
|
| 800 |
+
ItclClass *iclsPtr);
|
| 801 |
+
MODULE_SCOPE int ItclAddObjectsDictInfo(Tcl_Interp *interp, ItclObject *ioPtr);
|
| 802 |
+
MODULE_SCOPE int ItclDeleteObjectsDictInfo(Tcl_Interp *interp,
|
| 803 |
+
ItclObject *ioPtr);
|
| 804 |
+
MODULE_SCOPE int ItclAddOptionDictInfo(Tcl_Interp *interp, ItclClass *iclsPtr,
|
| 805 |
+
ItclOption *ioptPtr);
|
| 806 |
+
MODULE_SCOPE int ItclAddDelegatedOptionDictInfo(Tcl_Interp *interp,
|
| 807 |
+
ItclClass *iclsPtr, ItclDelegatedOption *idoPtr);
|
| 808 |
+
MODULE_SCOPE int ItclAddClassComponentDictInfo(Tcl_Interp *interp,
|
| 809 |
+
ItclClass *iclsPtr, ItclComponent *icPtr);
|
| 810 |
+
MODULE_SCOPE int ItclAddClassVariableDictInfo(Tcl_Interp *interp,
|
| 811 |
+
ItclClass *iclsPtr, ItclVariable *ivPtr);
|
| 812 |
+
MODULE_SCOPE int ItclAddClassFunctionDictInfo(Tcl_Interp *interp,
|
| 813 |
+
ItclClass *iclsPtr, ItclMemberFunc *imPtr);
|
| 814 |
+
MODULE_SCOPE int ItclAddClassDelegatedFunctionDictInfo(Tcl_Interp *interp,
|
| 815 |
+
ItclClass *iclsPtr, ItclDelegatedFunction *idmPtr);
|
| 816 |
+
MODULE_SCOPE int ItclClassCreateObject(void *clientData, Tcl_Interp *interp,
|
| 817 |
+
Tcl_Size objc, Tcl_Obj *const objv[]);
|
| 818 |
+
|
| 819 |
+
MODULE_SCOPE void ItclRestoreInfoVars(void *clientData);
|
| 820 |
+
|
| 821 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiMyProcCmd;
|
| 822 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiInstallComponentCmd;
|
| 823 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiCallInstanceCmd;
|
| 824 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiGetInstanceVarCmd;
|
| 825 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiMyTypeMethodCmd;
|
| 826 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiMyMethodCmd;
|
| 827 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiMyTypeVarCmd;
|
| 828 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiMyVarCmd;
|
| 829 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_BiItclHullCmd;
|
| 830 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_ThisCmd;
|
| 831 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_ExtendedClassCmd;
|
| 832 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_TypeClassCmd;
|
| 833 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_AddObjectOptionCmd;
|
| 834 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_AddDelegatedOptionCmd;
|
| 835 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_AddDelegatedFunctionCmd;
|
| 836 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_SetComponentCmd;
|
| 837 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_ClassHullTypeCmd;
|
| 838 |
+
MODULE_SCOPE Tcl_ObjCmdProc Itcl_ClassWidgetClassCmd;
|
| 839 |
+
|
| 840 |
+
typedef int (ItclRootMethodProc)(ItclObject *ioPtr, Tcl_Interp *interp,
|
| 841 |
+
int objc, Tcl_Obj *const objv[]);
|
| 842 |
+
|
| 843 |
+
MODULE_SCOPE const Tcl_MethodType itclRootMethodType;
|
| 844 |
+
MODULE_SCOPE ItclRootMethodProc ItclUnknownGuts;
|
| 845 |
+
MODULE_SCOPE ItclRootMethodProc ItclConstructGuts;
|
| 846 |
+
MODULE_SCOPE ItclRootMethodProc ItclInfoGuts;
|
| 847 |
+
|
| 848 |
+
#include "itcl2TclOO.h"
|
| 849 |
+
|
| 850 |
+
/*
|
| 851 |
+
* Include all the private API, generated from itcl.decls.
|
| 852 |
+
*/
|
| 853 |
+
|
| 854 |
+
#include "itclIntDecls.h"
|
llava_next/include/sqlite3.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
llava_next/include/tclOOIntDecls.h
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* This file is (mostly) automatically generated from tclOO.decls.
|
| 3 |
+
*/
|
| 4 |
+
|
| 5 |
+
#ifndef _TCLOOINTDECLS
|
| 6 |
+
#define _TCLOOINTDECLS
|
| 7 |
+
|
| 8 |
+
/* !BEGIN!: Do not edit below this line. */
|
| 9 |
+
|
| 10 |
+
#ifdef __cplusplus
|
| 11 |
+
extern "C" {
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
/*
|
| 15 |
+
* Exported function declarations:
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
/* 0 */
|
| 19 |
+
TCLAPI Tcl_Object TclOOGetDefineCmdContext(Tcl_Interp *interp);
|
| 20 |
+
/* 1 */
|
| 21 |
+
TCLAPI Tcl_Method TclOOMakeProcInstanceMethod(Tcl_Interp *interp,
|
| 22 |
+
Object *oPtr, int flags, Tcl_Obj *nameObj,
|
| 23 |
+
Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
|
| 24 |
+
const Tcl_MethodType *typePtr,
|
| 25 |
+
void *clientData, Proc **procPtrPtr);
|
| 26 |
+
/* 2 */
|
| 27 |
+
TCLAPI Tcl_Method TclOOMakeProcMethod(Tcl_Interp *interp,
|
| 28 |
+
Class *clsPtr, int flags, Tcl_Obj *nameObj,
|
| 29 |
+
const char *namePtr, Tcl_Obj *argsObj,
|
| 30 |
+
Tcl_Obj *bodyObj,
|
| 31 |
+
const Tcl_MethodType *typePtr,
|
| 32 |
+
void *clientData, Proc **procPtrPtr);
|
| 33 |
+
/* 3 */
|
| 34 |
+
TCLAPI Method * TclOONewProcInstanceMethod(Tcl_Interp *interp,
|
| 35 |
+
Object *oPtr, int flags, Tcl_Obj *nameObj,
|
| 36 |
+
Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
|
| 37 |
+
ProcedureMethod **pmPtrPtr);
|
| 38 |
+
/* 4 */
|
| 39 |
+
TCLAPI Method * TclOONewProcMethod(Tcl_Interp *interp, Class *clsPtr,
|
| 40 |
+
int flags, Tcl_Obj *nameObj,
|
| 41 |
+
Tcl_Obj *argsObj, Tcl_Obj *bodyObj,
|
| 42 |
+
ProcedureMethod **pmPtrPtr);
|
| 43 |
+
/* 5 */
|
| 44 |
+
TCLAPI int TclOOObjectCmdCore(Object *oPtr, Tcl_Interp *interp,
|
| 45 |
+
int objc, Tcl_Obj *const *objv,
|
| 46 |
+
int publicOnly, Class *startCls);
|
| 47 |
+
/* 6 */
|
| 48 |
+
TCLAPI int TclOOIsReachable(Class *targetPtr, Class *startPtr);
|
| 49 |
+
/* 7 */
|
| 50 |
+
TCLAPI Method * TclOONewForwardMethod(Tcl_Interp *interp,
|
| 51 |
+
Class *clsPtr, int isPublic,
|
| 52 |
+
Tcl_Obj *nameObj, Tcl_Obj *prefixObj);
|
| 53 |
+
/* 8 */
|
| 54 |
+
TCLAPI Method * TclOONewForwardInstanceMethod(Tcl_Interp *interp,
|
| 55 |
+
Object *oPtr, int isPublic, Tcl_Obj *nameObj,
|
| 56 |
+
Tcl_Obj *prefixObj);
|
| 57 |
+
/* 9 */
|
| 58 |
+
TCLAPI Tcl_Method TclOONewProcInstanceMethodEx(Tcl_Interp *interp,
|
| 59 |
+
Tcl_Object oPtr,
|
| 60 |
+
TclOO_PreCallProc *preCallPtr,
|
| 61 |
+
TclOO_PostCallProc *postCallPtr,
|
| 62 |
+
ProcErrorProc *errProc, void *clientData,
|
| 63 |
+
Tcl_Obj *nameObj, Tcl_Obj *argsObj,
|
| 64 |
+
Tcl_Obj *bodyObj, int flags,
|
| 65 |
+
void **internalTokenPtr);
|
| 66 |
+
/* 10 */
|
| 67 |
+
TCLAPI Tcl_Method TclOONewProcMethodEx(Tcl_Interp *interp,
|
| 68 |
+
Tcl_Class clsPtr,
|
| 69 |
+
TclOO_PreCallProc *preCallPtr,
|
| 70 |
+
TclOO_PostCallProc *postCallPtr,
|
| 71 |
+
ProcErrorProc *errProc, void *clientData,
|
| 72 |
+
Tcl_Obj *nameObj, Tcl_Obj *argsObj,
|
| 73 |
+
Tcl_Obj *bodyObj, int flags,
|
| 74 |
+
void **internalTokenPtr);
|
| 75 |
+
/* 11 */
|
| 76 |
+
TCLAPI int TclOOInvokeObject(Tcl_Interp *interp,
|
| 77 |
+
Tcl_Object object, Tcl_Class startCls,
|
| 78 |
+
int publicPrivate, int objc,
|
| 79 |
+
Tcl_Obj *const *objv);
|
| 80 |
+
/* 12 */
|
| 81 |
+
TCLAPI void TclOOObjectSetFilters(Object *oPtr, int numFilters,
|
| 82 |
+
Tcl_Obj *const *filters);
|
| 83 |
+
/* 13 */
|
| 84 |
+
TCLAPI void TclOOClassSetFilters(Tcl_Interp *interp,
|
| 85 |
+
Class *classPtr, int numFilters,
|
| 86 |
+
Tcl_Obj *const *filters);
|
| 87 |
+
/* 14 */
|
| 88 |
+
TCLAPI void TclOOObjectSetMixins(Object *oPtr, int numMixins,
|
| 89 |
+
Class *const *mixins);
|
| 90 |
+
/* 15 */
|
| 91 |
+
TCLAPI void TclOOClassSetMixins(Tcl_Interp *interp,
|
| 92 |
+
Class *classPtr, int numMixins,
|
| 93 |
+
Class *const *mixins);
|
| 94 |
+
|
| 95 |
+
typedef struct TclOOIntStubs {
|
| 96 |
+
int magic;
|
| 97 |
+
void *hooks;
|
| 98 |
+
|
| 99 |
+
Tcl_Object (*tclOOGetDefineCmdContext) (Tcl_Interp *interp); /* 0 */
|
| 100 |
+
Tcl_Method (*tclOOMakeProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, void *clientData, Proc **procPtrPtr); /* 1 */
|
| 101 |
+
Tcl_Method (*tclOOMakeProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, const char *namePtr, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, const Tcl_MethodType *typePtr, void *clientData, Proc **procPtrPtr); /* 2 */
|
| 102 |
+
Method * (*tclOONewProcInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 3 */
|
| 103 |
+
Method * (*tclOONewProcMethod) (Tcl_Interp *interp, Class *clsPtr, int flags, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, ProcedureMethod **pmPtrPtr); /* 4 */
|
| 104 |
+
int (*tclOOObjectCmdCore) (Object *oPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, int publicOnly, Class *startCls); /* 5 */
|
| 105 |
+
int (*tclOOIsReachable) (Class *targetPtr, Class *startPtr); /* 6 */
|
| 106 |
+
Method * (*tclOONewForwardMethod) (Tcl_Interp *interp, Class *clsPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 7 */
|
| 107 |
+
Method * (*tclOONewForwardInstanceMethod) (Tcl_Interp *interp, Object *oPtr, int isPublic, Tcl_Obj *nameObj, Tcl_Obj *prefixObj); /* 8 */
|
| 108 |
+
Tcl_Method (*tclOONewProcInstanceMethodEx) (Tcl_Interp *interp, Tcl_Object oPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 9 */
|
| 109 |
+
Tcl_Method (*tclOONewProcMethodEx) (Tcl_Interp *interp, Tcl_Class clsPtr, TclOO_PreCallProc *preCallPtr, TclOO_PostCallProc *postCallPtr, ProcErrorProc *errProc, void *clientData, Tcl_Obj *nameObj, Tcl_Obj *argsObj, Tcl_Obj *bodyObj, int flags, void **internalTokenPtr); /* 10 */
|
| 110 |
+
int (*tclOOInvokeObject) (Tcl_Interp *interp, Tcl_Object object, Tcl_Class startCls, int publicPrivate, int objc, Tcl_Obj *const *objv); /* 11 */
|
| 111 |
+
void (*tclOOObjectSetFilters) (Object *oPtr, int numFilters, Tcl_Obj *const *filters); /* 12 */
|
| 112 |
+
void (*tclOOClassSetFilters) (Tcl_Interp *interp, Class *classPtr, int numFilters, Tcl_Obj *const *filters); /* 13 */
|
| 113 |
+
void (*tclOOObjectSetMixins) (Object *oPtr, int numMixins, Class *const *mixins); /* 14 */
|
| 114 |
+
void (*tclOOClassSetMixins) (Tcl_Interp *interp, Class *classPtr, int numMixins, Class *const *mixins); /* 15 */
|
| 115 |
+
} TclOOIntStubs;
|
| 116 |
+
|
| 117 |
+
extern const TclOOIntStubs *tclOOIntStubsPtr;
|
| 118 |
+
|
| 119 |
+
#ifdef __cplusplus
|
| 120 |
+
}
|
| 121 |
+
#endif
|
| 122 |
+
|
| 123 |
+
#if defined(USE_TCLOO_STUBS)
|
| 124 |
+
|
| 125 |
+
/*
|
| 126 |
+
* Inline function declarations:
|
| 127 |
+
*/
|
| 128 |
+
|
| 129 |
+
#define TclOOGetDefineCmdContext \
|
| 130 |
+
(tclOOIntStubsPtr->tclOOGetDefineCmdContext) /* 0 */
|
| 131 |
+
#define TclOOMakeProcInstanceMethod \
|
| 132 |
+
(tclOOIntStubsPtr->tclOOMakeProcInstanceMethod) /* 1 */
|
| 133 |
+
#define TclOOMakeProcMethod \
|
| 134 |
+
(tclOOIntStubsPtr->tclOOMakeProcMethod) /* 2 */
|
| 135 |
+
#define TclOONewProcInstanceMethod \
|
| 136 |
+
(tclOOIntStubsPtr->tclOONewProcInstanceMethod) /* 3 */
|
| 137 |
+
#define TclOONewProcMethod \
|
| 138 |
+
(tclOOIntStubsPtr->tclOONewProcMethod) /* 4 */
|
| 139 |
+
#define TclOOObjectCmdCore \
|
| 140 |
+
(tclOOIntStubsPtr->tclOOObjectCmdCore) /* 5 */
|
| 141 |
+
#define TclOOIsReachable \
|
| 142 |
+
(tclOOIntStubsPtr->tclOOIsReachable) /* 6 */
|
| 143 |
+
#define TclOONewForwardMethod \
|
| 144 |
+
(tclOOIntStubsPtr->tclOONewForwardMethod) /* 7 */
|
| 145 |
+
#define TclOONewForwardInstanceMethod \
|
| 146 |
+
(tclOOIntStubsPtr->tclOONewForwardInstanceMethod) /* 8 */
|
| 147 |
+
#define TclOONewProcInstanceMethodEx \
|
| 148 |
+
(tclOOIntStubsPtr->tclOONewProcInstanceMethodEx) /* 9 */
|
| 149 |
+
#define TclOONewProcMethodEx \
|
| 150 |
+
(tclOOIntStubsPtr->tclOONewProcMethodEx) /* 10 */
|
| 151 |
+
#define TclOOInvokeObject \
|
| 152 |
+
(tclOOIntStubsPtr->tclOOInvokeObject) /* 11 */
|
| 153 |
+
#define TclOOObjectSetFilters \
|
| 154 |
+
(tclOOIntStubsPtr->tclOOObjectSetFilters) /* 12 */
|
| 155 |
+
#define TclOOClassSetFilters \
|
| 156 |
+
(tclOOIntStubsPtr->tclOOClassSetFilters) /* 13 */
|
| 157 |
+
#define TclOOObjectSetMixins \
|
| 158 |
+
(tclOOIntStubsPtr->tclOOObjectSetMixins) /* 14 */
|
| 159 |
+
#define TclOOClassSetMixins \
|
| 160 |
+
(tclOOIntStubsPtr->tclOOClassSetMixins) /* 15 */
|
| 161 |
+
|
| 162 |
+
#endif /* defined(USE_TCLOO_STUBS) */
|
| 163 |
+
|
| 164 |
+
/* !END!: Do not edit above this line. */
|
| 165 |
+
|
| 166 |
+
#endif /* _TCLOOINTDECLS */
|
llava_next/include/term.h
ADDED
|
@@ -0,0 +1,893 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2018-2020,2021 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.82 2021/09/24 17:02:46 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.4"
|
| 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 20221231
|
| 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 |
+
|
| 807 |
+
#endif /* NCURSES_INTERNALS */
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
/*
|
| 811 |
+
* These entrypoints are used by tack 1.07.
|
| 812 |
+
*/
|
| 813 |
+
extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);
|
| 814 |
+
extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);
|
| 815 |
+
|
| 816 |
+
/*
|
| 817 |
+
* Normal entry points
|
| 818 |
+
*/
|
| 819 |
+
extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);
|
| 820 |
+
extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);
|
| 821 |
+
|
| 822 |
+
/* miscellaneous entry points */
|
| 823 |
+
extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);
|
| 824 |
+
extern NCURSES_EXPORT(int) setupterm (const char *,int,int *);
|
| 825 |
+
|
| 826 |
+
/* terminfo entry points, also declared in curses.h */
|
| 827 |
+
#if !defined(__NCURSES_H)
|
| 828 |
+
extern NCURSES_EXPORT(char *) tigetstr (const char *);
|
| 829 |
+
extern NCURSES_EXPORT_VAR(char) ttytype[];
|
| 830 |
+
extern NCURSES_EXPORT(int) putp (const char *);
|
| 831 |
+
extern NCURSES_EXPORT(int) tigetflag (const char *);
|
| 832 |
+
extern NCURSES_EXPORT(int) tigetnum (const char *);
|
| 833 |
+
|
| 834 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 835 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
|
| 836 |
+
#else
|
| 837 |
+
extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 838 |
+
#endif
|
| 839 |
+
|
| 840 |
+
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
|
| 841 |
+
|
| 842 |
+
#endif /* __NCURSES_H */
|
| 843 |
+
|
| 844 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 845 |
+
#if !defined(NCURSES_TERMCAP_H_incl)
|
| 846 |
+
extern NCURSES_EXPORT(char *) tgetstr (const char *, char **);
|
| 847 |
+
extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
| 848 |
+
extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
| 849 |
+
extern NCURSES_EXPORT(int) tgetflag (const char *);
|
| 850 |
+
extern NCURSES_EXPORT(int) tgetnum (const char *);
|
| 851 |
+
extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
| 852 |
+
#endif /* NCURSES_TERMCAP_H_incl */
|
| 853 |
+
|
| 854 |
+
/*
|
| 855 |
+
* Include curses.h before term.h to enable these extensions.
|
| 856 |
+
*/
|
| 857 |
+
#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)
|
| 858 |
+
|
| 859 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, const char *);
|
| 860 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);
|
| 861 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, const char *);
|
| 862 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, const char *);
|
| 863 |
+
|
| 864 |
+
#if 1 /* NCURSES_TPARM_VARARGS */
|
| 865 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */
|
| 866 |
+
#else
|
| 867 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */
|
| 868 |
+
#endif
|
| 869 |
+
|
| 870 |
+
/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
| 871 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, const char *, char **);
|
| 872 |
+
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);
|
| 873 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);
|
| 874 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, const char *);
|
| 875 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, const char *);
|
| 876 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);
|
| 877 |
+
|
| 878 |
+
extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);
|
| 879 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);
|
| 880 |
+
|
| 881 |
+
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);
|
| 882 |
+
#endif /* NCURSES_SP_FUNCS */
|
| 883 |
+
|
| 884 |
+
/*
|
| 885 |
+
* Debugging features.
|
| 886 |
+
*/
|
| 887 |
+
extern GCC_NORETURN NCURSES_EXPORT(void) exit_terminfo(int);
|
| 888 |
+
|
| 889 |
+
#ifdef __cplusplus
|
| 890 |
+
}
|
| 891 |
+
#endif
|
| 892 |
+
|
| 893 |
+
#endif /* NCURSES_TERM_H_incl */
|
llava_next/include/tkMacOSXFont.h
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tkMacOSXFont.h --
|
| 3 |
+
*
|
| 4 |
+
* Contains the Macintosh implementation of the platform-independent
|
| 5 |
+
* font package interface.
|
| 6 |
+
*
|
| 7 |
+
* Copyright (c) 1990-1994 The Regents of the University of California.
|
| 8 |
+
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
|
| 9 |
+
* Copyright 2001-2009, Apple Inc.
|
| 10 |
+
* Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
|
| 11 |
+
*
|
| 12 |
+
* See the file "license.terms" for information on usage and redistribution
|
| 13 |
+
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
#ifndef TKMACOSXFONT_H
|
| 17 |
+
#define TKMACOSXFONT_H 1
|
| 18 |
+
|
| 19 |
+
#include "tkFont.h"
|
| 20 |
+
|
| 21 |
+
#ifndef _TKMACINT
|
| 22 |
+
#include "tkMacOSXInt.h"
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* Function prototypes
|
| 27 |
+
*/
|
| 28 |
+
|
| 29 |
+
MODULE_SCOPE Tcl_Obj * TkMacOSXFontDescriptionForNSFontAndNSFontAttributes(
|
| 30 |
+
NSFont *nsFont, NSDictionary *nsAttributes);
|
| 31 |
+
|
| 32 |
+
#endif /*TKMACOSXFONT_H*/
|
llava_next/include/tkMenubutton.h
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tkMenubutton.h --
|
| 3 |
+
*
|
| 4 |
+
* Declarations of types and functions used to implement the menubutton
|
| 5 |
+
* widget.
|
| 6 |
+
*
|
| 7 |
+
* Copyright (c) 1996-1997 by Sun Microsystems, Inc.
|
| 8 |
+
*
|
| 9 |
+
* See the file "license.terms" for information on usage and redistribution of
|
| 10 |
+
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifndef _TKMENUBUTTON
|
| 14 |
+
#define _TKMENUBUTTON
|
| 15 |
+
|
| 16 |
+
#ifndef _TKINT
|
| 17 |
+
#include "tkInt.h"
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
#ifndef _TKMENU
|
| 21 |
+
#include "tkMenu.h"
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
* Legal values for the "orient" field of TkMenubutton records.
|
| 26 |
+
*/
|
| 27 |
+
|
| 28 |
+
enum direction {
|
| 29 |
+
DIRECTION_ABOVE, DIRECTION_BELOW, DIRECTION_FLUSH,
|
| 30 |
+
DIRECTION_LEFT, DIRECTION_RIGHT
|
| 31 |
+
};
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* Legal values for the "state" field of TkMenubutton records.
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
enum state {
|
| 38 |
+
STATE_ACTIVE, STATE_DISABLED, STATE_NORMAL
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* A data structure of the following type is kept for each widget managed by
|
| 43 |
+
* this file:
|
| 44 |
+
*/
|
| 45 |
+
|
| 46 |
+
typedef struct {
|
| 47 |
+
Tk_Window tkwin; /* Window that embodies the widget. NULL means
|
| 48 |
+
* that the window has been destroyed but the
|
| 49 |
+
* data structures haven't yet been cleaned
|
| 50 |
+
* up. */
|
| 51 |
+
Display *display; /* Display containing widget. Needed, among
|
| 52 |
+
* other things, so that resources can bee
|
| 53 |
+
* freed up even after tkwin has gone away. */
|
| 54 |
+
Tcl_Interp *interp; /* Interpreter associated with menubutton. */
|
| 55 |
+
Tcl_Command widgetCmd; /* Token for menubutton's widget command. */
|
| 56 |
+
Tk_OptionTable optionTable; /* Table that defines configuration options
|
| 57 |
+
* available for this widget. */
|
| 58 |
+
char *menuName; /* Name of menu associated with widget.
|
| 59 |
+
* Malloc-ed. */
|
| 60 |
+
|
| 61 |
+
/*
|
| 62 |
+
* Information about what's displayed in the menu button:
|
| 63 |
+
*/
|
| 64 |
+
|
| 65 |
+
char *text; /* Text to display in button (malloc'ed) or
|
| 66 |
+
* NULL. */
|
| 67 |
+
int underline; /* Index of character to underline. */
|
| 68 |
+
char *textVarName; /* Name of variable (malloc'ed) or NULL. If
|
| 69 |
+
* non-NULL, button displays the contents of
|
| 70 |
+
* this variable. */
|
| 71 |
+
Pixmap bitmap; /* Bitmap to display or None. If not None then
|
| 72 |
+
* text and textVar and underline are
|
| 73 |
+
* ignored. */
|
| 74 |
+
char *imageString; /* Name of image to display (malloc'ed), or
|
| 75 |
+
* NULL. If non-NULL, bitmap, text, and
|
| 76 |
+
* textVarName are ignored. */
|
| 77 |
+
Tk_Image image; /* Image to display in window, or NULL if
|
| 78 |
+
* none. */
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* Information used when displaying widget:
|
| 82 |
+
*/
|
| 83 |
+
|
| 84 |
+
enum state state; /* State of button for display purposes:
|
| 85 |
+
* normal, active, or disabled. */
|
| 86 |
+
Tk_3DBorder normalBorder; /* Structure used to draw 3-D border and
|
| 87 |
+
* background when window isn't active. NULL
|
| 88 |
+
* means no such border exists. */
|
| 89 |
+
Tk_3DBorder activeBorder; /* Structure used to draw 3-D border and
|
| 90 |
+
* background when window is active. NULL
|
| 91 |
+
* means no such border exists. */
|
| 92 |
+
int borderWidth; /* Width of border. */
|
| 93 |
+
int relief; /* 3-d effect: TK_RELIEF_RAISED, etc. */
|
| 94 |
+
int highlightWidth; /* Width in pixels of highlight to draw around
|
| 95 |
+
* widget when it has the focus. <= 0 means
|
| 96 |
+
* don't draw a highlight. */
|
| 97 |
+
XColor *highlightBgColorPtr;/* Color for drawing traversal highlight area
|
| 98 |
+
* when highlight is off. */
|
| 99 |
+
XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
|
| 100 |
+
int inset; /* Total width of all borders, including
|
| 101 |
+
* traversal highlight and 3-D border.
|
| 102 |
+
* Indicates how much interior stuff must be
|
| 103 |
+
* offset from outside edges to leave room for
|
| 104 |
+
* borders. */
|
| 105 |
+
Tk_Font tkfont; /* Information about text font, or NULL. */
|
| 106 |
+
XColor *normalFg; /* Foreground color in normal mode. */
|
| 107 |
+
XColor *activeFg; /* Foreground color in active mode. NULL means
|
| 108 |
+
* use normalFg instead. */
|
| 109 |
+
XColor *disabledFg; /* Foreground color when disabled. NULL means
|
| 110 |
+
* use normalFg with a 50% stipple instead. */
|
| 111 |
+
GC normalTextGC; /* GC for drawing text in normal mode. */
|
| 112 |
+
GC activeTextGC; /* GC for drawing text in active mode (NULL
|
| 113 |
+
* means use normalTextGC). */
|
| 114 |
+
Pixmap gray; /* Pixmap for displaying disabled text/icon if
|
| 115 |
+
* disabledFg is NULL. */
|
| 116 |
+
GC disabledGC; /* Used to produce disabled effect for
|
| 117 |
+
* text. */
|
| 118 |
+
GC stippleGC; /* Used to produce disabled stipple effect for
|
| 119 |
+
* images when disabled. */
|
| 120 |
+
int leftBearing; /* Distance from text origin to leftmost drawn
|
| 121 |
+
* pixel (positive means to right). */
|
| 122 |
+
int rightBearing; /* Amount text sticks right from its
|
| 123 |
+
* origin. */
|
| 124 |
+
char *widthString; /* Value of -width option. Malloc'ed. */
|
| 125 |
+
char *heightString; /* Value of -height option. Malloc'ed. */
|
| 126 |
+
int width, height; /* If > 0, these specify dimensions to request
|
| 127 |
+
* for window, in characters for text and in
|
| 128 |
+
* pixels for bitmaps. In this case the actual
|
| 129 |
+
* size of the text string or bitmap is
|
| 130 |
+
* ignored in computing desired window
|
| 131 |
+
* size. */
|
| 132 |
+
int wrapLength; /* Line length (in pixels) at which to wrap
|
| 133 |
+
* onto next line. <= 0 means don't wrap
|
| 134 |
+
* except at newlines. */
|
| 135 |
+
int padX, padY; /* Extra space around text or bitmap (pixels
|
| 136 |
+
* on each side). */
|
| 137 |
+
Tk_Anchor anchor; /* Where text/bitmap should be displayed
|
| 138 |
+
* inside window region. */
|
| 139 |
+
Tk_Justify justify; /* Justification to use for multi-line
|
| 140 |
+
* text. */
|
| 141 |
+
int textWidth; /* Width needed to display text as requested,
|
| 142 |
+
* in pixels. */
|
| 143 |
+
int textHeight; /* Height needed to display text as requested,
|
| 144 |
+
* in pixels. */
|
| 145 |
+
Tk_TextLayout textLayout; /* Saved text layout information. */
|
| 146 |
+
int indicatorOn; /* Non-zero means display indicator; 0 means
|
| 147 |
+
* don't display. */
|
| 148 |
+
int indicatorHeight; /* Height of indicator in pixels. This same
|
| 149 |
+
* amount of extra space is also left on each
|
| 150 |
+
* side of the indicator. 0 if no
|
| 151 |
+
* indicator. */
|
| 152 |
+
int indicatorWidth; /* Width of indicator in pixels, including
|
| 153 |
+
* indicatorHeight in padding on each side. 0
|
| 154 |
+
* if no indicator. */
|
| 155 |
+
|
| 156 |
+
/*
|
| 157 |
+
* Miscellaneous information:
|
| 158 |
+
*/
|
| 159 |
+
|
| 160 |
+
int compound; /* Value of -compound option; specifies
|
| 161 |
+
* whether the menubutton should show both an
|
| 162 |
+
* image and text, and, if so, how. */
|
| 163 |
+
enum direction direction; /* Direction for where to pop the menu. Valid
|
| 164 |
+
* directions are "above", "below", "left",
|
| 165 |
+
* "right", and "flush". "flush" means that
|
| 166 |
+
* the upper left corner of the menubutton is
|
| 167 |
+
* where the menu pops up. "above" and "below"
|
| 168 |
+
* will attempt to pop the menu completely
|
| 169 |
+
* above or below the menu respectively.
|
| 170 |
+
* "left" and "right" will pop the menu left
|
| 171 |
+
* or right, and the active item will be next
|
| 172 |
+
* to the button. */
|
| 173 |
+
Tk_Cursor cursor; /* Current cursor for window, or NULL. */
|
| 174 |
+
char *takeFocus; /* Value of -takefocus option; not used in the
|
| 175 |
+
* C code, but used by keyboard traversal
|
| 176 |
+
* scripts. Malloc'ed, but may be NULL. */
|
| 177 |
+
int flags; /* Various flags; see below for
|
| 178 |
+
* definitions. */
|
| 179 |
+
} TkMenuButton;
|
| 180 |
+
|
| 181 |
+
/*
|
| 182 |
+
* Flag bits for buttons:
|
| 183 |
+
*
|
| 184 |
+
* REDRAW_PENDING: Non-zero means a DoWhenIdle handler has
|
| 185 |
+
* already been queued to redraw this window.
|
| 186 |
+
* POSTED: Non-zero means that the menu associated with
|
| 187 |
+
* this button has been posted (typically because
|
| 188 |
+
* of an active button press).
|
| 189 |
+
* GOT_FOCUS: Non-zero means this button currently has the
|
| 190 |
+
* input focus.
|
| 191 |
+
*/
|
| 192 |
+
|
| 193 |
+
#define REDRAW_PENDING 1
|
| 194 |
+
#define POSTED 2
|
| 195 |
+
#define GOT_FOCUS 4
|
| 196 |
+
|
| 197 |
+
/*
|
| 198 |
+
* The following constants define the dimensions of the cascade indicator,
|
| 199 |
+
* which is displayed if the "-indicatoron" option is true. The units for
|
| 200 |
+
* these options are 1/10 millimeters.
|
| 201 |
+
*/
|
| 202 |
+
|
| 203 |
+
#define INDICATOR_WIDTH 40
|
| 204 |
+
#define INDICATOR_HEIGHT 17
|
| 205 |
+
|
| 206 |
+
/*
|
| 207 |
+
* Declaration of procedures used in the implementation of the button widget.
|
| 208 |
+
*/
|
| 209 |
+
|
| 210 |
+
MODULE_SCOPE void TkpComputeMenuButtonGeometry(TkMenuButton *mbPtr);
|
| 211 |
+
MODULE_SCOPE TkMenuButton *TkpCreateMenuButton(Tk_Window tkwin);
|
| 212 |
+
MODULE_SCOPE void TkpDisplayMenuButton(ClientData clientData);
|
| 213 |
+
MODULE_SCOPE void TkpDestroyMenuButton(TkMenuButton *mbPtr);
|
| 214 |
+
MODULE_SCOPE void TkMenuButtonWorldChanged(ClientData instanceData);
|
| 215 |
+
|
| 216 |
+
#endif /* _TKMENUBUTTON */
|
llava_next/include/tkUuid.h
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#define TK_VERSION_UUID \
|
| 2 |
+
e987bb51b8fce99b545a408b5eb2cbcecedf6929ff1f7094e383666f02a5f556
|
| 3 |
+
|
llava_next/share/info/history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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This is history.info, produced by makeinfo version 6.8 from
|
| 2 |
+
history.texi.
|
| 3 |
+
|
| 4 |
+
This document describes the GNU History library (version 8.2, 19
|
| 5 |
+
September 2022), a programming tool that provides a consistent user
|
| 6 |
+
interface for recalling lines of previously typed input.
|
| 7 |
+
|
| 8 |
+
Copyright (C) 1988-2022 Free Software Foundation, Inc.
|
| 9 |
+
|
| 10 |
+
Permission is granted to copy, distribute and/or modify this
|
| 11 |
+
document under the terms of the GNU Free Documentation License,
|
| 12 |
+
Version 1.3 or any later version published by the Free Software
|
| 13 |
+
Foundation; with no Invariant Sections, no Front-Cover Texts, and
|
| 14 |
+
no Back-Cover Texts. A copy of the license is included in the
|
| 15 |
+
section entitled "GNU Free Documentation License".
|
| 16 |
+
|
| 17 |
+
INFO-DIR-SECTION Libraries
|
| 18 |
+
START-INFO-DIR-ENTRY
|
| 19 |
+
* History: (history). The GNU history library API.
|
| 20 |
+
END-INFO-DIR-ENTRY
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
File: history.info, Node: Top, Next: Using History Interactively, Up: (dir)
|
| 24 |
+
|
| 25 |
+
GNU History Library
|
| 26 |
+
*******************
|
| 27 |
+
|
| 28 |
+
This document describes the GNU History library, a programming tool that
|
| 29 |
+
provides a consistent user interface for recalling lines of previously
|
| 30 |
+
typed input.
|
| 31 |
+
|
| 32 |
+
* Menu:
|
| 33 |
+
|
| 34 |
+
* Using History Interactively:: GNU History User's Manual.
|
| 35 |
+
* Programming with GNU History:: GNU History Programmer's Manual.
|
| 36 |
+
* GNU Free Documentation License:: License for copying this manual.
|
| 37 |
+
* Concept Index:: Index of concepts described in this manual.
|
| 38 |
+
* Function and Variable Index:: Index of externally visible functions
|
| 39 |
+
and variables.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
File: history.info, Node: Using History Interactively, Next: Programming with GNU History, Prev: Top, Up: Top
|
| 43 |
+
|
| 44 |
+
1 Using History Interactively
|
| 45 |
+
*****************************
|
| 46 |
+
|
| 47 |
+
This chapter describes how to use the GNU History Library interactively,
|
| 48 |
+
from a user's standpoint. It should be considered a user's guide. For
|
| 49 |
+
information on using the GNU History Library in your own programs, *note
|
| 50 |
+
Programming with GNU History::.
|
| 51 |
+
|
| 52 |
+
* Menu:
|
| 53 |
+
|
| 54 |
+
* History Interaction:: What it feels like using History as a user.
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
File: history.info, Node: History Interaction, Up: Using History Interactively
|
| 58 |
+
|
| 59 |
+
1.1 History Expansion
|
| 60 |
+
=====================
|
| 61 |
+
|
| 62 |
+
The History library provides a history expansion feature that is similar
|
| 63 |
+
to the history expansion provided by 'csh'. This section describes the
|
| 64 |
+
syntax used to manipulate the history information.
|
| 65 |
+
|
| 66 |
+
History expansions introduce words from the history list into the
|
| 67 |
+
input stream, making it easy to repeat commands, insert the arguments to
|
| 68 |
+
a previous command into the current input line, or fix errors in
|
| 69 |
+
previous commands quickly.
|
| 70 |
+
|
| 71 |
+
History expansion takes place in two parts. The first is to
|
| 72 |
+
determine which line from the history list should be used during
|
| 73 |
+
substitution. The second is to select portions of that line for
|
| 74 |
+
inclusion into the current one. The line selected from the history is
|
| 75 |
+
called the "event", and the portions of that line that are acted upon
|
| 76 |
+
are called "words". Various "modifiers" are available to manipulate the
|
| 77 |
+
selected words. The line is broken into words in the same fashion that
|
| 78 |
+
Bash does, so that several words surrounded by quotes are considered one
|
| 79 |
+
word. History expansions are introduced by the appearance of the
|
| 80 |
+
history expansion character, which is '!' by default.
|
| 81 |
+
|
| 82 |
+
History expansion implements shell-like quoting conventions: a
|
| 83 |
+
backslash can be used to remove the special handling for the next
|
| 84 |
+
character; single quotes enclose verbatim sequences of characters, and
|
| 85 |
+
can be used to inhibit history expansion; and characters enclosed within
|
| 86 |
+
double quotes may be subject to history expansion, since backslash can
|
| 87 |
+
escape the history expansion character, but single quotes may not, since
|
| 88 |
+
they are not treated specially within double quotes.
|
| 89 |
+
|
| 90 |
+
* Menu:
|
| 91 |
+
|
| 92 |
+
* Event Designators:: How to specify which history line to use.
|
| 93 |
+
* Word Designators:: Specifying which words are of interest.
|
| 94 |
+
* Modifiers:: Modifying the results of substitution.
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
File: history.info, Node: Event Designators, Next: Word Designators, Up: History Interaction
|
| 98 |
+
|
| 99 |
+
1.1.1 Event Designators
|
| 100 |
+
-----------------------
|
| 101 |
+
|
| 102 |
+
An event designator is a reference to a command line entry in the
|
| 103 |
+
history list. Unless the reference is absolute, events are relative to
|
| 104 |
+
the current position in the history list.
|
| 105 |
+
|
| 106 |
+
'!'
|
| 107 |
+
Start a history substitution, except when followed by a space, tab,
|
| 108 |
+
the end of the line, or '='.
|
| 109 |
+
|
| 110 |
+
'!N'
|
| 111 |
+
Refer to command line N.
|
| 112 |
+
|
| 113 |
+
'!-N'
|
| 114 |
+
Refer to the command N lines back.
|
| 115 |
+
|
| 116 |
+
'!!'
|
| 117 |
+
Refer to the previous command. This is a synonym for '!-1'.
|
| 118 |
+
|
| 119 |
+
'!STRING'
|
| 120 |
+
Refer to the most recent command preceding the current position in
|
| 121 |
+
the history list starting with STRING.
|
| 122 |
+
|
| 123 |
+
'!?STRING[?]'
|
| 124 |
+
Refer to the most recent command preceding the current position in
|
| 125 |
+
the history list containing STRING. The trailing '?' may be
|
| 126 |
+
omitted if the STRING is followed immediately by a newline. If
|
| 127 |
+
STRING is missing, the string from the most recent search is used;
|
| 128 |
+
it is an error if there is no previous search string.
|
| 129 |
+
|
| 130 |
+
'^STRING1^STRING2^'
|
| 131 |
+
Quick Substitution. Repeat the last command, replacing STRING1
|
| 132 |
+
with STRING2. Equivalent to '!!:s^STRING1^STRING2^'.
|
| 133 |
+
|
| 134 |
+
'!#'
|
| 135 |
+
The entire command line typed so far.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
File: history.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction
|
| 139 |
+
|
| 140 |
+
1.1.2 Word Designators
|
| 141 |
+
----------------------
|
| 142 |
+
|
| 143 |
+
Word designators are used to select desired words from the event. A ':'
|
| 144 |
+
separates the event specification from the word designator. It may be
|
| 145 |
+
omitted if the word designator begins with a '^', '$', '*', '-', or '%'.
|
| 146 |
+
Words are numbered from the beginning of the line, with the first word
|
| 147 |
+
being denoted by 0 (zero). Words are inserted into the current line
|
| 148 |
+
separated by single spaces.
|
| 149 |
+
|
| 150 |
+
For example,
|
| 151 |
+
|
| 152 |
+
'!!'
|
| 153 |
+
designates the preceding command. When you type this, the
|
| 154 |
+
preceding command is repeated in toto.
|
| 155 |
+
|
| 156 |
+
'!!:$'
|
| 157 |
+
designates the last argument of the preceding command. This may be
|
| 158 |
+
shortened to '!$'.
|
| 159 |
+
|
| 160 |
+
'!fi:2'
|
| 161 |
+
designates the second argument of the most recent command starting
|
| 162 |
+
with the letters 'fi'.
|
| 163 |
+
|
| 164 |
+
Here are the word designators:
|
| 165 |
+
|
| 166 |
+
'0 (zero)'
|
| 167 |
+
The '0'th word. For many applications, this is the command word.
|
| 168 |
+
|
| 169 |
+
'N'
|
| 170 |
+
The Nth word.
|
| 171 |
+
|
| 172 |
+
'^'
|
| 173 |
+
The first argument; that is, word 1.
|
| 174 |
+
|
| 175 |
+
'$'
|
| 176 |
+
The last argument.
|
| 177 |
+
|
| 178 |
+
'%'
|
| 179 |
+
The first word matched by the most recent '?STRING?' search, if the
|
| 180 |
+
search string begins with a character that is part of a word.
|
| 181 |
+
|
| 182 |
+
'X-Y'
|
| 183 |
+
A range of words; '-Y' abbreviates '0-Y'.
|
| 184 |
+
|
| 185 |
+
'*'
|
| 186 |
+
All of the words, except the '0'th. This is a synonym for '1-$'.
|
| 187 |
+
It is not an error to use '*' if there is just one word in the
|
| 188 |
+
event; the empty string is returned in that case.
|
| 189 |
+
|
| 190 |
+
'X*'
|
| 191 |
+
Abbreviates 'X-$'
|
| 192 |
+
|
| 193 |
+
'X-'
|
| 194 |
+
Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is
|
| 195 |
+
missing, it defaults to 0.
|
| 196 |
+
|
| 197 |
+
If a word designator is supplied without an event specification, the
|
| 198 |
+
previous command is used as the event.
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
File: history.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction
|
| 202 |
+
|
| 203 |
+
1.1.3 Modifiers
|
| 204 |
+
---------------
|
| 205 |
+
|
| 206 |
+
After the optional word designator, you can add a sequence of one or
|
| 207 |
+
more of the following modifiers, each preceded by a ':'. These modify,
|
| 208 |
+
or edit, the word or words selected from the history event.
|
| 209 |
+
|
| 210 |
+
'h'
|
| 211 |
+
Remove a trailing pathname component, leaving only the head.
|
| 212 |
+
|
| 213 |
+
't'
|
| 214 |
+
Remove all leading pathname components, leaving the tail.
|
| 215 |
+
|
| 216 |
+
'r'
|
| 217 |
+
Remove a trailing suffix of the form '.SUFFIX', leaving the
|
| 218 |
+
basename.
|
| 219 |
+
|
| 220 |
+
'e'
|
| 221 |
+
Remove all but the trailing suffix.
|
| 222 |
+
|
| 223 |
+
'p'
|
| 224 |
+
Print the new command but do not execute it.
|
| 225 |
+
|
| 226 |
+
's/OLD/NEW/'
|
| 227 |
+
Substitute NEW for the first occurrence of OLD in the event line.
|
| 228 |
+
Any character may be used as the delimiter in place of '/'. The
|
| 229 |
+
delimiter may be quoted in OLD and NEW with a single backslash. If
|
| 230 |
+
'&' appears in NEW, it is replaced by OLD. A single backslash will
|
| 231 |
+
quote the '&'. If OLD is null, it is set to the last OLD
|
| 232 |
+
substituted, or, if no previous history substitutions took place,
|
| 233 |
+
the last STRING in a !?STRING'[?]' search. If NEW is null, each
|
| 234 |
+
matching OLD is deleted. The final delimiter is optional if it is
|
| 235 |
+
the last character on the input line.
|
| 236 |
+
|
| 237 |
+
'&'
|
| 238 |
+
Repeat the previous substitution.
|
| 239 |
+
|
| 240 |
+
'g'
|
| 241 |
+
'a'
|
| 242 |
+
Cause changes to be applied over the entire event line. Used in
|
| 243 |
+
conjunction with 's', as in 'gs/OLD/NEW/', or with '&'.
|
| 244 |
+
|
| 245 |
+
'G'
|
| 246 |
+
Apply the following 's' or '&' modifier once to each word in the
|
| 247 |
+
event.
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
File: history.info, Node: Programming with GNU History, Next: GNU Free Documentation License, Prev: Using History Interactively, Up: Top
|
| 251 |
+
|
| 252 |
+
2 Programming with GNU History
|
| 253 |
+
******************************
|
| 254 |
+
|
| 255 |
+
This chapter describes how to interface programs that you write with the
|
| 256 |
+
GNU History Library. It should be considered a technical guide. For
|
| 257 |
+
information on the interactive use of GNU History, *note Using History
|
| 258 |
+
Interactively::.
|
| 259 |
+
|
| 260 |
+
* Menu:
|
| 261 |
+
|
| 262 |
+
* Introduction to History:: What is the GNU History library for?
|
| 263 |
+
* History Storage:: How information is stored.
|
| 264 |
+
* History Functions:: Functions that you can use.
|
| 265 |
+
* History Variables:: Variables that control behaviour.
|
| 266 |
+
* History Programming Example:: Example of using the GNU History Library.
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
File: history.info, Node: Introduction to History, Next: History Storage, Up: Programming with GNU History
|
| 270 |
+
|
| 271 |
+
2.1 Introduction to History
|
| 272 |
+
===========================
|
| 273 |
+
|
| 274 |
+
Many programs read input from the user a line at a time. The GNU
|
| 275 |
+
History library is able to keep track of those lines, associate
|
| 276 |
+
arbitrary data with each line, and utilize information from previous
|
| 277 |
+
lines in composing new ones.
|
| 278 |
+
|
| 279 |
+
A programmer using the History library has available functions for
|
| 280 |
+
remembering lines on a history list, associating arbitrary data with a
|
| 281 |
+
line, removing lines from the list, searching through the list for a
|
| 282 |
+
line containing an arbitrary text string, and referencing any line in
|
| 283 |
+
the list directly. In addition, a history "expansion" function is
|
| 284 |
+
available which provides for a consistent user interface across
|
| 285 |
+
different programs.
|
| 286 |
+
|
| 287 |
+
The user using programs written with the History library has the
|
| 288 |
+
benefit of a consistent user interface with a set of well-known commands
|
| 289 |
+
for manipulating the text of previous lines and using that text in new
|
| 290 |
+
commands. The basic history manipulation commands are similar to the
|
| 291 |
+
history substitution provided by 'csh'.
|
| 292 |
+
|
| 293 |
+
The programmer can also use the Readline library, which includes some
|
| 294 |
+
history manipulation by default, and has the added advantage of command
|
| 295 |
+
line editing.
|
| 296 |
+
|
| 297 |
+
Before declaring any functions using any functionality the History
|
| 298 |
+
library provides in other code, an application writer should include the
|
| 299 |
+
file '<readline/history.h>' in any file that uses the History library's
|
| 300 |
+
features. It supplies extern declarations for all of the library's
|
| 301 |
+
public functions and variables, and declares all of the public data
|
| 302 |
+
structures.
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
File: history.info, Node: History Storage, Next: History Functions, Prev: Introduction to History, Up: Programming with GNU History
|
| 306 |
+
|
| 307 |
+
2.2 History Storage
|
| 308 |
+
===================
|
| 309 |
+
|
| 310 |
+
The history list is an array of history entries. A history entry is
|
| 311 |
+
declared as follows:
|
| 312 |
+
|
| 313 |
+
typedef void *histdata_t;
|
| 314 |
+
|
| 315 |
+
typedef struct _hist_entry {
|
| 316 |
+
char *line;
|
| 317 |
+
char *timestamp;
|
| 318 |
+
histdata_t data;
|
| 319 |
+
} HIST_ENTRY;
|
| 320 |
+
|
| 321 |
+
The history list itself might therefore be declared as
|
| 322 |
+
|
| 323 |
+
HIST_ENTRY **the_history_list;
|
| 324 |
+
|
| 325 |
+
The state of the History library is encapsulated into a single
|
| 326 |
+
structure:
|
| 327 |
+
|
| 328 |
+
/*
|
| 329 |
+
* A structure used to pass around the current state of the history.
|
| 330 |
+
*/
|
| 331 |
+
typedef struct _hist_state {
|
| 332 |
+
HIST_ENTRY **entries; /* Pointer to the entries themselves. */
|
| 333 |
+
int offset; /* The location pointer within this array. */
|
| 334 |
+
int length; /* Number of elements within this array. */
|
| 335 |
+
int size; /* Number of slots allocated to this array. */
|
| 336 |
+
int flags;
|
| 337 |
+
} HISTORY_STATE;
|
| 338 |
+
|
| 339 |
+
If the flags member includes 'HS_STIFLED', the history has been
|
| 340 |
+
stifled.
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
File: history.info, Node: History Functions, Next: History Variables, Prev: History Storage, Up: Programming with GNU History
|
| 344 |
+
|
| 345 |
+
2.3 History Functions
|
| 346 |
+
=====================
|
| 347 |
+
|
| 348 |
+
This section describes the calling sequence for the various functions
|
| 349 |
+
exported by the GNU History library.
|
| 350 |
+
|
| 351 |
+
* Menu:
|
| 352 |
+
|
| 353 |
+
* Initializing History and State Management:: Functions to call when you
|
| 354 |
+
want to use history in a
|
| 355 |
+
program.
|
| 356 |
+
* History List Management:: Functions used to manage the list
|
| 357 |
+
of history entries.
|
| 358 |
+
* Information About the History List:: Functions returning information about
|
| 359 |
+
the history list.
|
| 360 |
+
* Moving Around the History List:: Functions used to change the position
|
| 361 |
+
in the history list.
|
| 362 |
+
* Searching the History List:: Functions to search the history list
|
| 363 |
+
for entries containing a string.
|
| 364 |
+
* Managing the History File:: Functions that read and write a file
|
| 365 |
+
containing the history list.
|
| 366 |
+
* History Expansion:: Functions to perform csh-like history
|
| 367 |
+
expansion.
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
File: history.info, Node: Initializing History and State Management, Next: History List Management, Up: History Functions
|
| 371 |
+
|
| 372 |
+
2.3.1 Initializing History and State Management
|
| 373 |
+
-----------------------------------------------
|
| 374 |
+
|
| 375 |
+
This section describes functions used to initialize and manage the state
|
| 376 |
+
of the History library when you want to use the history functions in
|
| 377 |
+
your program.
|
| 378 |
+
|
| 379 |
+
-- Function: void using_history (void)
|
| 380 |
+
Begin a session in which the history functions might be used. This
|
| 381 |
+
initializes the interactive variables.
|
| 382 |
+
|
| 383 |
+
-- Function: HISTORY_STATE * history_get_history_state (void)
|
| 384 |
+
Return a structure describing the current state of the input
|
| 385 |
+
history.
|
| 386 |
+
|
| 387 |
+
-- Function: void history_set_history_state (HISTORY_STATE *state)
|
| 388 |
+
Set the state of the history list according to STATE.
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
File: history.info, Node: History List Management, Next: Information About the History List, Prev: Initializing History and State Management, Up: History Functions
|
| 392 |
+
|
| 393 |
+
2.3.2 History List Management
|
| 394 |
+
-----------------------------
|
| 395 |
+
|
| 396 |
+
These functions manage individual entries on the history list, or set
|
| 397 |
+
parameters managing the list itself.
|
| 398 |
+
|
| 399 |
+
-- Function: void add_history (const char *string)
|
| 400 |
+
Place STRING at the end of the history list. The associated data
|
| 401 |
+
field (if any) is set to 'NULL'. If the maximum number of history
|
| 402 |
+
entries has been set using 'stifle_history()', and the new number
|
| 403 |
+
of history entries would exceed that maximum, the oldest history
|
| 404 |
+
entry is removed.
|
| 405 |
+
|
| 406 |
+
-- Function: void add_history_time (const char *string)
|
| 407 |
+
Change the time stamp associated with the most recent history entry
|
| 408 |
+
to STRING.
|
| 409 |
+
|
| 410 |
+
-- Function: HIST_ENTRY * remove_history (int which)
|
| 411 |
+
Remove history entry at offset WHICH from the history. The removed
|
| 412 |
+
element is returned so you can free the line, data, and containing
|
| 413 |
+
structure.
|
| 414 |
+
|
| 415 |
+
-- Function: histdata_t free_history_entry (HIST_ENTRY *histent)
|
| 416 |
+
Free the history entry HISTENT and any history library private data
|
| 417 |
+
associated with it. Returns the application-specific data so the
|
| 418 |
+
caller can dispose of it.
|
| 419 |
+
|
| 420 |
+
-- Function: HIST_ENTRY * replace_history_entry (int which, const char
|
| 421 |
+
*line, histdata_t data)
|
| 422 |
+
Make the history entry at offset WHICH have LINE and DATA. This
|
| 423 |
+
returns the old entry so the caller can dispose of any
|
| 424 |
+
application-specific data. In the case of an invalid WHICH, a
|
| 425 |
+
'NULL' pointer is returned.
|
| 426 |
+
|
| 427 |
+
-- Function: void clear_history (void)
|
| 428 |
+
Clear the history list by deleting all the entries.
|
| 429 |
+
|
| 430 |
+
-- Function: void stifle_history (int max)
|
| 431 |
+
Stifle the history list, remembering only the last MAX entries.
|
| 432 |
+
The history list will contain only MAX entries at a time.
|
| 433 |
+
|
| 434 |
+
-- Function: int unstifle_history (void)
|
| 435 |
+
Stop stifling the history. This returns the previously-set maximum
|
| 436 |
+
number of history entries (as set by 'stifle_history()'). The
|
| 437 |
+
value is positive if the history was stifled, negative if it
|
| 438 |
+
wasn't.
|
| 439 |
+
|
| 440 |
+
-- Function: int history_is_stifled (void)
|
| 441 |
+
Returns non-zero if the history is stifled, zero if it is not.
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
File: history.info, Node: Information About the History List, Next: Moving Around the History List, Prev: History List Management, Up: History Functions
|
| 445 |
+
|
| 446 |
+
2.3.3 Information About the History List
|
| 447 |
+
----------------------------------------
|
| 448 |
+
|
| 449 |
+
These functions return information about the entire history list or
|
| 450 |
+
individual list entries.
|
| 451 |
+
|
| 452 |
+
-- Function: HIST_ENTRY ** history_list (void)
|
| 453 |
+
Return a 'NULL' terminated array of 'HIST_ENTRY *' which is the
|
| 454 |
+
current input history. Element 0 of this list is the beginning of
|
| 455 |
+
time. If there is no history, return 'NULL'.
|
| 456 |
+
|
| 457 |
+
-- Function: int where_history (void)
|
| 458 |
+
Returns the offset of the current history element.
|
| 459 |
+
|
| 460 |
+
-- Function: HIST_ENTRY * current_history (void)
|
| 461 |
+
Return the history entry at the current position, as determined by
|
| 462 |
+
'where_history()'. If there is no entry there, return a 'NULL'
|
| 463 |
+
pointer.
|
| 464 |
+
|
| 465 |
+
-- Function: HIST_ENTRY * history_get (int offset)
|
| 466 |
+
Return the history entry at position OFFSET. The range of valid
|
| 467 |
+
values of OFFSET starts at 'history_base' and ends at
|
| 468 |
+
HISTORY_LENGTH - 1 (*note History Variables::). If there is no
|
| 469 |
+
entry there, or if OFFSET is outside the valid range, return a
|
| 470 |
+
'NULL' pointer.
|
| 471 |
+
|
| 472 |
+
-- Function: time_t history_get_time (HIST_ENTRY *entry)
|
| 473 |
+
Return the time stamp associated with the history entry ENTRY. If
|
| 474 |
+
the timestamp is missing or invalid, return 0.
|
| 475 |
+
|
| 476 |
+
-- Function: int history_total_bytes (void)
|
| 477 |
+
Return the number of bytes that the primary history entries are
|
| 478 |
+
using. This function returns the sum of the lengths of all the
|
| 479 |
+
lines in the history.
|
| 480 |
+
|
| 481 |
+
|
| 482 |
+
File: history.info, Node: Moving Around the History List, Next: Searching the History List, Prev: Information About the History List, Up: History Functions
|
| 483 |
+
|
| 484 |
+
2.3.4 Moving Around the History List
|
| 485 |
+
------------------------------------
|
| 486 |
+
|
| 487 |
+
These functions allow the current index into the history list to be set
|
| 488 |
+
or changed.
|
| 489 |
+
|
| 490 |
+
-- Function: int history_set_pos (int pos)
|
| 491 |
+
Set the current history offset to POS, an absolute index into the
|
| 492 |
+
list. Returns 1 on success, 0 if POS is less than zero or greater
|
| 493 |
+
than the number of history entries.
|
| 494 |
+
|
| 495 |
+
-- Function: HIST_ENTRY * previous_history (void)
|
| 496 |
+
Back up the current history offset to the previous history entry,
|
| 497 |
+
and return a pointer to that entry. If there is no previous entry,
|
| 498 |
+
return a 'NULL' pointer.
|
| 499 |
+
|
| 500 |
+
-- Function: HIST_ENTRY * next_history (void)
|
| 501 |
+
If the current history offset refers to a valid history entry,
|
| 502 |
+
increment the current history offset. If the possibly-incremented
|
| 503 |
+
history offset refers to a valid history entry, return a pointer to
|
| 504 |
+
that entry; otherwise, return a 'BNULL' pointer.
|
| 505 |
+
|
| 506 |
+
|
| 507 |
+
File: history.info, Node: Searching the History List, Next: Managing the History File, Prev: Moving Around the History List, Up: History Functions
|
| 508 |
+
|
| 509 |
+
2.3.5 Searching the History List
|
| 510 |
+
--------------------------------
|
| 511 |
+
|
| 512 |
+
These functions allow searching of the history list for entries
|
| 513 |
+
containing a specific string. Searching may be performed both forward
|
| 514 |
+
and backward from the current history position. The search may be
|
| 515 |
+
"anchored", meaning that the string must match at the beginning of the
|
| 516 |
+
history entry.
|
| 517 |
+
|
| 518 |
+
-- Function: int history_search (const char *string, int direction)
|
| 519 |
+
Search the history for STRING, starting at the current history
|
| 520 |
+
offset. If DIRECTION is less than 0, then the search is through
|
| 521 |
+
previous entries, otherwise through subsequent entries. If STRING
|
| 522 |
+
is found, then the current history index is set to that history
|
| 523 |
+
entry, and the value returned is the offset in the line of the
|
| 524 |
+
entry where STRING was found. Otherwise, nothing is changed, and a
|
| 525 |
+
-1 is returned.
|
| 526 |
+
|
| 527 |
+
-- Function: int history_search_prefix (const char *string, int
|
| 528 |
+
direction)
|
| 529 |
+
Search the history for STRING, starting at the current history
|
| 530 |
+
offset. The search is anchored: matching lines must begin with
|
| 531 |
+
STRING. If DIRECTION is less than 0, then the search is through
|
| 532 |
+
previous entries, otherwise through subsequent entries. If STRING
|
| 533 |
+
is found, then the current history index is set to that entry, and
|
| 534 |
+
the return value is 0. Otherwise, nothing is changed, and a -1 is
|
| 535 |
+
returned.
|
| 536 |
+
|
| 537 |
+
-- Function: int history_search_pos (const char *string, int direction,
|
| 538 |
+
int pos)
|
| 539 |
+
Search for STRING in the history list, starting at POS, an absolute
|
| 540 |
+
index into the list. If DIRECTION is negative, the search proceeds
|
| 541 |
+
backward from POS, otherwise forward. Returns the absolute index
|
| 542 |
+
of the history element where STRING was found, or -1 otherwise.
|
| 543 |
+
|
| 544 |
+
|
| 545 |
+
File: history.info, Node: Managing the History File, Next: History Expansion, Prev: Searching the History List, Up: History Functions
|
| 546 |
+
|
| 547 |
+
2.3.6 Managing the History File
|
| 548 |
+
-------------------------------
|
| 549 |
+
|
| 550 |
+
The History library can read the history from and write it to a file.
|
| 551 |
+
This section documents the functions for managing a history file.
|
| 552 |
+
|
| 553 |
+
-- Function: int read_history (const char *filename)
|
| 554 |
+
Add the contents of FILENAME to the history list, a line at a time.
|
| 555 |
+
If FILENAME is 'NULL', then read from '~/.history'. Returns 0 if
|
| 556 |
+
successful, or 'errno' if not.
|
| 557 |
+
|
| 558 |
+
-- Function: int read_history_range (const char *filename, int from,
|
| 559 |
+
int to)
|
| 560 |
+
Read a range of lines from FILENAME, adding them to the history
|
| 561 |
+
list. Start reading at line FROM and end at TO. If FROM is zero,
|
| 562 |
+
start at the beginning. If TO is less than FROM, then read until
|
| 563 |
+
the end of the file. If FILENAME is 'NULL', then read from
|
| 564 |
+
'~/.history'. Returns 0 if successful, or 'errno' if not.
|
| 565 |
+
|
| 566 |
+
-- Function: int write_history (const char *filename)
|
| 567 |
+
Write the current history to FILENAME, overwriting FILENAME if
|
| 568 |
+
necessary. If FILENAME is 'NULL', then write the history list to
|
| 569 |
+
'~/.history'. Returns 0 on success, or 'errno' on a read or write
|
| 570 |
+
error.
|
| 571 |
+
|
| 572 |
+
-- Function: int append_history (int nelements, const char *filename)
|
| 573 |
+
Append the last NELEMENTS of the history list to FILENAME. If
|
| 574 |
+
FILENAME is 'NULL', then append to '~/.history'. Returns 0 on
|
| 575 |
+
success, or 'errno' on a read or write error.
|
| 576 |
+
|
| 577 |
+
-- Function: int history_truncate_file (const char *filename, int
|
| 578 |
+
nlines)
|
| 579 |
+
Truncate the history file FILENAME, leaving only the last NLINES
|
| 580 |
+
lines. If FILENAME is 'NULL', then '~/.history' is truncated.
|
| 581 |
+
Returns 0 on success, or 'errno' on failure.
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
File: history.info, Node: History Expansion, Prev: Managing the History File, Up: History Functions
|
| 585 |
+
|
| 586 |
+
2.3.7 History Expansion
|
| 587 |
+
-----------------------
|
| 588 |
+
|
| 589 |
+
These functions implement history expansion.
|
| 590 |
+
|
| 591 |
+
-- Function: int history_expand (char *string, char **output)
|
| 592 |
+
Expand STRING, placing the result into OUTPUT, a pointer to a
|
| 593 |
+
string (*note History Interaction::). Returns:
|
| 594 |
+
'0'
|
| 595 |
+
If no expansions took place (or, if the only change in the
|
| 596 |
+
text was the removal of escape characters preceding the
|
| 597 |
+
history expansion character);
|
| 598 |
+
'1'
|
| 599 |
+
if expansions did take place;
|
| 600 |
+
'-1'
|
| 601 |
+
if there was an error in expansion;
|
| 602 |
+
'2'
|
| 603 |
+
if the returned line should be displayed, but not executed, as
|
| 604 |
+
with the ':p' modifier (*note Modifiers::).
|
| 605 |
+
|
| 606 |
+
If an error occurred in expansion, then OUTPUT contains a
|
| 607 |
+
descriptive error message.
|
| 608 |
+
|
| 609 |
+
-- Function: char * get_history_event (const char *string, int *cindex,
|
| 610 |
+
int qchar)
|
| 611 |
+
Returns the text of the history event beginning at STRING +
|
| 612 |
+
*CINDEX. *CINDEX is modified to point to after the event
|
| 613 |
+
specifier. At function entry, CINDEX points to the index into
|
| 614 |
+
STRING where the history event specification begins. QCHAR is a
|
| 615 |
+
character that is allowed to end the event specification in
|
| 616 |
+
addition to the "normal" terminating characters.
|
| 617 |
+
|
| 618 |
+
-- Function: char ** history_tokenize (const char *string)
|
| 619 |
+
Return an array of tokens parsed out of STRING, much as the shell
|
| 620 |
+
might. The tokens are split on the characters in the
|
| 621 |
+
HISTORY_WORD_DELIMITERS variable, and shell quoting conventions are
|
| 622 |
+
obeyed as described below.
|
| 623 |
+
|
| 624 |
+
-- Function: char * history_arg_extract (int first, int last, const
|
| 625 |
+
char *string)
|
| 626 |
+
Extract a string segment consisting of the FIRST through LAST
|
| 627 |
+
arguments present in STRING. Arguments are split using
|
| 628 |
+
'history_tokenize'.
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
File: history.info, Node: History Variables, Next: History Programming Example, Prev: History Functions, Up: Programming with GNU History
|
| 632 |
+
|
| 633 |
+
2.4 History Variables
|
| 634 |
+
=====================
|
| 635 |
+
|
| 636 |
+
This section describes the externally-visible variables exported by the
|
| 637 |
+
GNU History Library.
|
| 638 |
+
|
| 639 |
+
-- Variable: int history_base
|
| 640 |
+
The logical offset of the first entry in the history list.
|
| 641 |
+
|
| 642 |
+
-- Variable: int history_length
|
| 643 |
+
The number of entries currently stored in the history list.
|
| 644 |
+
|
| 645 |
+
-- Variable: int history_max_entries
|
| 646 |
+
The maximum number of history entries. This must be changed using
|
| 647 |
+
'stifle_history()'.
|
| 648 |
+
|
| 649 |
+
-- Variable: int history_write_timestamps
|
| 650 |
+
If non-zero, timestamps are written to the history file, so they
|
| 651 |
+
can be preserved between sessions. The default value is 0, meaning
|
| 652 |
+
that timestamps are not saved.
|
| 653 |
+
|
| 654 |
+
The current timestamp format uses the value of HISTORY_COMMENT_CHAR
|
| 655 |
+
to delimit timestamp entries in the history file. If that variable
|
| 656 |
+
does not have a value (the default), timestamps will not be
|
| 657 |
+
written.
|
| 658 |
+
|
| 659 |
+
-- Variable: char history_expansion_char
|
| 660 |
+
The character that introduces a history event. The default is '!'.
|
| 661 |
+
Setting this to 0 inhibits history expansion.
|
| 662 |
+
|
| 663 |
+
-- Variable: char history_subst_char
|
| 664 |
+
The character that invokes word substitution if found at the start
|
| 665 |
+
of a line. The default is '^'.
|
| 666 |
+
|
| 667 |
+
-- Variable: char history_comment_char
|
| 668 |
+
During tokenization, if this character is seen as the first
|
| 669 |
+
character of a word, then it and all subsequent characters up to a
|
| 670 |
+
newline are ignored, suppressing history expansion for the
|
| 671 |
+
remainder of the line. This is disabled by default.
|
| 672 |
+
|
| 673 |
+
-- Variable: char * history_word_delimiters
|
| 674 |
+
The characters that separate tokens for 'history_tokenize()'. The
|
| 675 |
+
default value is '" \t\n()<>;&|"'.
|
| 676 |
+
|
| 677 |
+
-- Variable: char * history_search_delimiter_chars
|
| 678 |
+
The list of additional characters which can delimit a history
|
| 679 |
+
search string, in addition to space, TAB, ':' and '?' in the case
|
| 680 |
+
of a substring search. The default is empty.
|
| 681 |
+
|
| 682 |
+
-- Variable: char * history_no_expand_chars
|
| 683 |
+
The list of characters which inhibit history expansion if found
|
| 684 |
+
immediately following HISTORY_EXPANSION_CHAR. The default is
|
| 685 |
+
space, tab, newline, carriage return, and '='.
|
| 686 |
+
|
| 687 |
+
-- Variable: int history_quotes_inhibit_expansion
|
| 688 |
+
If non-zero, the history expansion code implements shell-like
|
| 689 |
+
quoting: single-quoted words are not scanned for the history
|
| 690 |
+
expansion character or the history comment character, and
|
| 691 |
+
double-quoted words may have history expansion performed, since
|
| 692 |
+
single quotes are not special within double quotes. The default
|
| 693 |
+
value is 0.
|
| 694 |
+
|
| 695 |
+
-- Variable: int history_quoting_state
|
| 696 |
+
An application may set this variable to indicate that the current
|
| 697 |
+
line being expanded is subject to existing quoting. If set to ''',
|
| 698 |
+
the history expansion function will assume that the line is
|
| 699 |
+
single-quoted and inhibit expansion until it reads an unquoted
|
| 700 |
+
closing single quote; if set to '"', history expansion will assume
|
| 701 |
+
the line is double quoted until it reads an unquoted closing double
|
| 702 |
+
quote. If set to zero, the default, the history expansion function
|
| 703 |
+
will assume the line is not quoted and treat quote characters
|
| 704 |
+
within the line as described above. This is only effective if
|
| 705 |
+
HISTORY_QUOTES_INHIBIT_EXPANSION is set.
|
| 706 |
+
|
| 707 |
+
-- Variable: rl_linebuf_func_t * history_inhibit_expansion_function
|
| 708 |
+
This should be set to the address of a function that takes two
|
| 709 |
+
arguments: a 'char *' (STRING) and an 'int' index into that string
|
| 710 |
+
(I). It should return a non-zero value if the history expansion
|
| 711 |
+
starting at STRING[I] should not be performed; zero if the
|
| 712 |
+
expansion should be done. It is intended for use by applications
|
| 713 |
+
like Bash that use the history expansion character for additional
|
| 714 |
+
purposes. By default, this variable is set to 'NULL'.
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
File: history.info, Node: History Programming Example, Prev: History Variables, Up: Programming with GNU History
|
| 718 |
+
|
| 719 |
+
2.5 History Programming Example
|
| 720 |
+
===============================
|
| 721 |
+
|
| 722 |
+
The following program demonstrates simple use of the GNU History
|
| 723 |
+
Library.
|
| 724 |
+
|
| 725 |
+
#include <stdio.h>
|
| 726 |
+
#include <readline/history.h>
|
| 727 |
+
|
| 728 |
+
main (argc, argv)
|
| 729 |
+
int argc;
|
| 730 |
+
char **argv;
|
| 731 |
+
{
|
| 732 |
+
char line[1024], *t;
|
| 733 |
+
int len, done = 0;
|
| 734 |
+
|
| 735 |
+
line[0] = 0;
|
| 736 |
+
|
| 737 |
+
using_history ();
|
| 738 |
+
while (!done)
|
| 739 |
+
{
|
| 740 |
+
printf ("history$ ");
|
| 741 |
+
fflush (stdout);
|
| 742 |
+
t = fgets (line, sizeof (line) - 1, stdin);
|
| 743 |
+
if (t && *t)
|
| 744 |
+
{
|
| 745 |
+
len = strlen (t);
|
| 746 |
+
if (t[len - 1] == '\n')
|
| 747 |
+
t[len - 1] = '\0';
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
if (!t)
|
| 751 |
+
strcpy (line, "quit");
|
| 752 |
+
|
| 753 |
+
if (line[0])
|
| 754 |
+
{
|
| 755 |
+
char *expansion;
|
| 756 |
+
int result;
|
| 757 |
+
|
| 758 |
+
result = history_expand (line, &expansion);
|
| 759 |
+
if (result)
|
| 760 |
+
fprintf (stderr, "%s\n", expansion);
|
| 761 |
+
|
| 762 |
+
if (result < 0 || result == 2)
|
| 763 |
+
{
|
| 764 |
+
free (expansion);
|
| 765 |
+
continue;
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
add_history (expansion);
|
| 769 |
+
strncpy (line, expansion, sizeof (line) - 1);
|
| 770 |
+
free (expansion);
|
| 771 |
+
}
|
| 772 |
+
|
| 773 |
+
if (strcmp (line, "quit") == 0)
|
| 774 |
+
done = 1;
|
| 775 |
+
else if (strcmp (line, "save") == 0)
|
| 776 |
+
write_history ("history_file");
|
| 777 |
+
else if (strcmp (line, "read") == 0)
|
| 778 |
+
read_history ("history_file");
|
| 779 |
+
else if (strcmp (line, "list") == 0)
|
| 780 |
+
{
|
| 781 |
+
register HIST_ENTRY **the_list;
|
| 782 |
+
register int i;
|
| 783 |
+
|
| 784 |
+
the_list = history_list ();
|
| 785 |
+
if (the_list)
|
| 786 |
+
for (i = 0; the_list[i]; i++)
|
| 787 |
+
printf ("%d: %s\n", i + history_base, the_list[i]->line);
|
| 788 |
+
}
|
| 789 |
+
else if (strncmp (line, "delete", 6) == 0)
|
| 790 |
+
{
|
| 791 |
+
int which;
|
| 792 |
+
if ((sscanf (line + 6, "%d", &which)) == 1)
|
| 793 |
+
{
|
| 794 |
+
HIST_ENTRY *entry = remove_history (which);
|
| 795 |
+
if (!entry)
|
| 796 |
+
fprintf (stderr, "No such entry %d\n", which);
|
| 797 |
+
else
|
| 798 |
+
{
|
| 799 |
+
free (entry->line);
|
| 800 |
+
free (entry);
|
| 801 |
+
}
|
| 802 |
+
}
|
| 803 |
+
else
|
| 804 |
+
{
|
| 805 |
+
fprintf (stderr, "non-numeric arg given to `delete'\n");
|
| 806 |
+
}
|
| 807 |
+
}
|
| 808 |
+
}
|
| 809 |
+
}
|
| 810 |
+
|
| 811 |
+
|
| 812 |
+
File: history.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Programming with GNU History, Up: Top
|
| 813 |
+
|
| 814 |
+
Appendix A GNU Free Documentation License
|
| 815 |
+
*****************************************
|
| 816 |
+
|
| 817 |
+
Version 1.3, 3 November 2008
|
| 818 |
+
|
| 819 |
+
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
| 820 |
+
<http://fsf.org/>
|
| 821 |
+
|
| 822 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 823 |
+
of this license document, but changing it is not allowed.
|
| 824 |
+
|
| 825 |
+
0. PREAMBLE
|
| 826 |
+
|
| 827 |
+
The purpose of this License is to make a manual, textbook, or other
|
| 828 |
+
functional and useful document "free" in the sense of freedom: to
|
| 829 |
+
assure everyone the effective freedom to copy and redistribute it,
|
| 830 |
+
with or without modifying it, either commercially or
|
| 831 |
+
noncommercially. Secondarily, this License preserves for the
|
| 832 |
+
author and publisher a way to get credit for their work, while not
|
| 833 |
+
being considered responsible for modifications made by others.
|
| 834 |
+
|
| 835 |
+
This License is a kind of "copyleft", which means that derivative
|
| 836 |
+
works of the document must themselves be free in the same sense.
|
| 837 |
+
It complements the GNU General Public License, which is a copyleft
|
| 838 |
+
license designed for free software.
|
| 839 |
+
|
| 840 |
+
We have designed this License in order to use it for manuals for
|
| 841 |
+
free software, because free software needs free documentation: a
|
| 842 |
+
free program should come with manuals providing the same freedoms
|
| 843 |
+
that the software does. But this License is not limited to
|
| 844 |
+
software manuals; it can be used for any textual work, regardless
|
| 845 |
+
of subject matter or whether it is published as a printed book. We
|
| 846 |
+
recommend this License principally for works whose purpose is
|
| 847 |
+
instruction or reference.
|
| 848 |
+
|
| 849 |
+
1. APPLICABILITY AND DEFINITIONS
|
| 850 |
+
|
| 851 |
+
This License applies to any manual or other work, in any medium,
|
| 852 |
+
that contains a notice placed by the copyright holder saying it can
|
| 853 |
+
be distributed under the terms of this License. Such a notice
|
| 854 |
+
grants a world-wide, royalty-free license, unlimited in duration,
|
| 855 |
+
to use that work under the conditions stated herein. The
|
| 856 |
+
"Document", below, refers to any such manual or work. Any member
|
| 857 |
+
of the public is a licensee, and is addressed as "you". You accept
|
| 858 |
+
the license if you copy, modify or distribute the work in a way
|
| 859 |
+
requiring permission under copyright law.
|
| 860 |
+
|
| 861 |
+
A "Modified Version" of the Document means any work containing the
|
| 862 |
+
Document or a portion of it, either copied verbatim, or with
|
| 863 |
+
modifications and/or translated into another language.
|
| 864 |
+
|
| 865 |
+
A "Secondary Section" is a named appendix or a front-matter section
|
| 866 |
+
of the Document that deals exclusively with the relationship of the
|
| 867 |
+
publishers or authors of the Document to the Document's overall
|
| 868 |
+
subject (or to related matters) and contains nothing that could
|
| 869 |
+
fall directly within that overall subject. (Thus, if the Document
|
| 870 |
+
is in part a textbook of mathematics, a Secondary Section may not
|
| 871 |
+
explain any mathematics.) The relationship could be a matter of
|
| 872 |
+
historical connection with the subject or with related matters, or
|
| 873 |
+
of legal, commercial, philosophical, ethical or political position
|
| 874 |
+
regarding them.
|
| 875 |
+
|
| 876 |
+
The "Invariant Sections" are certain Secondary Sections whose
|
| 877 |
+
titles are designated, as being those of Invariant Sections, in the
|
| 878 |
+
notice that says that the Document is released under this License.
|
| 879 |
+
If a section does not fit the above definition of Secondary then it
|
| 880 |
+
is not allowed to be designated as Invariant. The Document may
|
| 881 |
+
contain zero Invariant Sections. If the Document does not identify
|
| 882 |
+
any Invariant Sections then there are none.
|
| 883 |
+
|
| 884 |
+
The "Cover Texts" are certain short passages of text that are
|
| 885 |
+
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
|
| 886 |
+
that says that the Document is released under this License. A
|
| 887 |
+
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
|
| 888 |
+
be at most 25 words.
|
| 889 |
+
|
| 890 |
+
A "Transparent" copy of the Document means a machine-readable copy,
|
| 891 |
+
represented in a format whose specification is available to the
|
| 892 |
+
general public, that is suitable for revising the document
|
| 893 |
+
straightforwardly with generic text editors or (for images composed
|
| 894 |
+
of pixels) generic paint programs or (for drawings) some widely
|
| 895 |
+
available drawing editor, and that is suitable for input to text
|
| 896 |
+
formatters or for automatic translation to a variety of formats
|
| 897 |
+
suitable for input to text formatters. A copy made in an otherwise
|
| 898 |
+
Transparent file format whose markup, or absence of markup, has
|
| 899 |
+
been arranged to thwart or discourage subsequent modification by
|
| 900 |
+
readers is not Transparent. An image format is not Transparent if
|
| 901 |
+
used for any substantial amount of text. A copy that is not
|
| 902 |
+
"Transparent" is called "Opaque".
|
| 903 |
+
|
| 904 |
+
Examples of suitable formats for Transparent copies include plain
|
| 905 |
+
ASCII without markup, Texinfo input format, LaTeX input format,
|
| 906 |
+
SGML or XML using a publicly available DTD, and standard-conforming
|
| 907 |
+
simple HTML, PostScript or PDF designed for human modification.
|
| 908 |
+
Examples of transparent image formats include PNG, XCF and JPG.
|
| 909 |
+
Opaque formats include proprietary formats that can be read and
|
| 910 |
+
edited only by proprietary word processors, SGML or XML for which
|
| 911 |
+
the DTD and/or processing tools are not generally available, and
|
| 912 |
+
the machine-generated HTML, PostScript or PDF produced by some word
|
| 913 |
+
processors for output purposes only.
|
| 914 |
+
|
| 915 |
+
The "Title Page" means, for a printed book, the title page itself,
|
| 916 |
+
plus such following pages as are needed to hold, legibly, the
|
| 917 |
+
material this License requires to appear in the title page. For
|
| 918 |
+
works in formats which do not have any title page as such, "Title
|
| 919 |
+
Page" means the text near the most prominent appearance of the
|
| 920 |
+
work's title, preceding the beginning of the body of the text.
|
| 921 |
+
|
| 922 |
+
The "publisher" means any person or entity that distributes copies
|
| 923 |
+
of the Document to the public.
|
| 924 |
+
|
| 925 |
+
A section "Entitled XYZ" means a named subunit of the Document
|
| 926 |
+
whose title either is precisely XYZ or contains XYZ in parentheses
|
| 927 |
+
following text that translates XYZ in another language. (Here XYZ
|
| 928 |
+
stands for a specific section name mentioned below, such as
|
| 929 |
+
"Acknowledgements", "Dedications", "Endorsements", or "History".)
|
| 930 |
+
To "Preserve the Title" of such a section when you modify the
|
| 931 |
+
Document means that it remains a section "Entitled XYZ" according
|
| 932 |
+
to this definition.
|
| 933 |
+
|
| 934 |
+
The Document may include Warranty Disclaimers next to the notice
|
| 935 |
+
which states that this License applies to the Document. These
|
| 936 |
+
Warranty Disclaimers are considered to be included by reference in
|
| 937 |
+
this License, but only as regards disclaiming warranties: any other
|
| 938 |
+
implication that these Warranty Disclaimers may have is void and
|
| 939 |
+
has no effect on the meaning of this License.
|
| 940 |
+
|
| 941 |
+
2. VERBATIM COPYING
|
| 942 |
+
|
| 943 |
+
You may copy and distribute the Document in any medium, either
|
| 944 |
+
commercially or noncommercially, provided that this License, the
|
| 945 |
+
copyright notices, and the license notice saying this License
|
| 946 |
+
applies to the Document are reproduced in all copies, and that you
|
| 947 |
+
add no other conditions whatsoever to those of this License. You
|
| 948 |
+
may not use technical measures to obstruct or control the reading
|
| 949 |
+
or further copying of the copies you make or distribute. However,
|
| 950 |
+
you may accept compensation in exchange for copies. If you
|
| 951 |
+
distribute a large enough number of copies you must also follow the
|
| 952 |
+
conditions in section 3.
|
| 953 |
+
|
| 954 |
+
You may also lend copies, under the same conditions stated above,
|
| 955 |
+
and you may publicly display copies.
|
| 956 |
+
|
| 957 |
+
3. COPYING IN QUANTITY
|
| 958 |
+
|
| 959 |
+
If you publish printed copies (or copies in media that commonly
|
| 960 |
+
have printed covers) of the Document, numbering more than 100, and
|
| 961 |
+
the Document's license notice requires Cover Texts, you must
|
| 962 |
+
enclose the copies in covers that carry, clearly and legibly, all
|
| 963 |
+
these Cover Texts: Front-Cover Texts on the front cover, and
|
| 964 |
+
Back-Cover Texts on the back cover. Both covers must also clearly
|
| 965 |
+
and legibly identify you as the publisher of these copies. The
|
| 966 |
+
front cover must present the full title with all words of the title
|
| 967 |
+
equally prominent and visible. You may add other material on the
|
| 968 |
+
covers in addition. Copying with changes limited to the covers, as
|
| 969 |
+
long as they preserve the title of the Document and satisfy these
|
| 970 |
+
conditions, can be treated as verbatim copying in other respects.
|
| 971 |
+
|
| 972 |
+
If the required texts for either cover are too voluminous to fit
|
| 973 |
+
legibly, you should put the first ones listed (as many as fit
|
| 974 |
+
reasonably) on the actual cover, and continue the rest onto
|
| 975 |
+
adjacent pages.
|
| 976 |
+
|
| 977 |
+
If you publish or distribute Opaque copies of the Document
|
| 978 |
+
numbering more than 100, you must either include a machine-readable
|
| 979 |
+
Transparent copy along with each Opaque copy, or state in or with
|
| 980 |
+
each Opaque copy a computer-network location from which the general
|
| 981 |
+
network-using public has access to download using public-standard
|
| 982 |
+
network protocols a complete Transparent copy of the Document, free
|
| 983 |
+
of added material. If you use the latter option, you must take
|
| 984 |
+
reasonably prudent steps, when you begin distribution of Opaque
|
| 985 |
+
copies in quantity, to ensure that this Transparent copy will
|
| 986 |
+
remain thus accessible at the stated location until at least one
|
| 987 |
+
year after the last time you distribute an Opaque copy (directly or
|
| 988 |
+
through your agents or retailers) of that edition to the public.
|
| 989 |
+
|
| 990 |
+
It is requested, but not required, that you contact the authors of
|
| 991 |
+
the Document well before redistributing any large number of copies,
|
| 992 |
+
to give them a chance to provide you with an updated version of the
|
| 993 |
+
Document.
|
| 994 |
+
|
| 995 |
+
4. MODIFICATIONS
|
| 996 |
+
|
| 997 |
+
You may copy and distribute a Modified Version of the Document
|
| 998 |
+
under the conditions of sections 2 and 3 above, provided that you
|
| 999 |
+
release the Modified Version under precisely this License, with the
|
| 1000 |
+
Modified Version filling the role of the Document, thus licensing
|
| 1001 |
+
distribution and modification of the Modified Version to whoever
|
| 1002 |
+
possesses a copy of it. In addition, you must do these things in
|
| 1003 |
+
the Modified Version:
|
| 1004 |
+
|
| 1005 |
+
A. Use in the Title Page (and on the covers, if any) a title
|
| 1006 |
+
distinct from that of the Document, and from those of previous
|
| 1007 |
+
versions (which should, if there were any, be listed in the
|
| 1008 |
+
History section of the Document). You may use the same title
|
| 1009 |
+
as a previous version if the original publisher of that
|
| 1010 |
+
version gives permission.
|
| 1011 |
+
|
| 1012 |
+
B. List on the Title Page, as authors, one or more persons or
|
| 1013 |
+
entities responsible for authorship of the modifications in
|
| 1014 |
+
the Modified Version, together with at least five of the
|
| 1015 |
+
principal authors of the Document (all of its principal
|
| 1016 |
+
authors, if it has fewer than five), unless they release you
|
| 1017 |
+
from this requirement.
|
| 1018 |
+
|
| 1019 |
+
C. State on the Title page the name of the publisher of the
|
| 1020 |
+
Modified Version, as the publisher.
|
| 1021 |
+
|
| 1022 |
+
D. Preserve all the copyright notices of the Document.
|
| 1023 |
+
|
| 1024 |
+
E. Add an appropriate copyright notice for your modifications
|
| 1025 |
+
adjacent to the other copyright notices.
|
| 1026 |
+
|
| 1027 |
+
F. Include, immediately after the copyright notices, a license
|
| 1028 |
+
notice giving the public permission to use the Modified
|
| 1029 |
+
Version under the terms of this License, in the form shown in
|
| 1030 |
+
the Addendum below.
|
| 1031 |
+
|
| 1032 |
+
G. Preserve in that license notice the full lists of Invariant
|
| 1033 |
+
Sections and required Cover Texts given in the Document's
|
| 1034 |
+
license notice.
|
| 1035 |
+
|
| 1036 |
+
H. Include an unaltered copy of this License.
|
| 1037 |
+
|
| 1038 |
+
I. Preserve the section Entitled "History", Preserve its Title,
|
| 1039 |
+
and add to it an item stating at least the title, year, new
|
| 1040 |
+
authors, and publisher of the Modified Version as given on the
|
| 1041 |
+
Title Page. If there is no section Entitled "History" in the
|
| 1042 |
+
Document, create one stating the title, year, authors, and
|
| 1043 |
+
publisher of the Document as given on its Title Page, then add
|
| 1044 |
+
an item describing the Modified Version as stated in the
|
| 1045 |
+
previous sentence.
|
| 1046 |
+
|
| 1047 |
+
J. Preserve the network location, if any, given in the Document
|
| 1048 |
+
for public access to a Transparent copy of the Document, and
|
| 1049 |
+
likewise the network locations given in the Document for
|
| 1050 |
+
previous versions it was based on. These may be placed in the
|
| 1051 |
+
"History" section. You may omit a network location for a work
|
| 1052 |
+
that was published at least four years before the Document
|
| 1053 |
+
itself, or if the original publisher of the version it refers
|
| 1054 |
+
to gives permission.
|
| 1055 |
+
|
| 1056 |
+
K. For any section Entitled "Acknowledgements" or "Dedications",
|
| 1057 |
+
Preserve the Title of the section, and preserve in the section
|
| 1058 |
+
all the substance and tone of each of the contributor
|
| 1059 |
+
acknowledgements and/or dedications given therein.
|
| 1060 |
+
|
| 1061 |
+
L. Preserve all the Invariant Sections of the Document, unaltered
|
| 1062 |
+
in their text and in their titles. Section numbers or the
|
| 1063 |
+
equivalent are not considered part of the section titles.
|
| 1064 |
+
|
| 1065 |
+
M. Delete any section Entitled "Endorsements". Such a section
|
| 1066 |
+
may not be included in the Modified Version.
|
| 1067 |
+
|
| 1068 |
+
N. Do not retitle any existing section to be Entitled
|
| 1069 |
+
"Endorsements" or to conflict in title with any Invariant
|
| 1070 |
+
Section.
|
| 1071 |
+
|
| 1072 |
+
O. Preserve any Warranty Disclaimers.
|
| 1073 |
+
|
| 1074 |
+
If the Modified Version includes new front-matter sections or
|
| 1075 |
+
appendices that qualify as Secondary Sections and contain no
|
| 1076 |
+
material copied from the Document, you may at your option designate
|
| 1077 |
+
some or all of these sections as invariant. To do this, add their
|
| 1078 |
+
titles to the list of Invariant Sections in the Modified Version's
|
| 1079 |
+
license notice. These titles must be distinct from any other
|
| 1080 |
+
section titles.
|
| 1081 |
+
|
| 1082 |
+
You may add a section Entitled "Endorsements", provided it contains
|
| 1083 |
+
nothing but endorsements of your Modified Version by various
|
| 1084 |
+
parties--for example, statements of peer review or that the text
|
| 1085 |
+
has been approved by an organization as the authoritative
|
| 1086 |
+
definition of a standard.
|
| 1087 |
+
|
| 1088 |
+
You may add a passage of up to five words as a Front-Cover Text,
|
| 1089 |
+
and a passage of up to 25 words as a Back-Cover Text, to the end of
|
| 1090 |
+
the list of Cover Texts in the Modified Version. Only one passage
|
| 1091 |
+
of Front-Cover Text and one of Back-Cover Text may be added by (or
|
| 1092 |
+
through arrangements made by) any one entity. If the Document
|
| 1093 |
+
already includes a cover text for the same cover, previously added
|
| 1094 |
+
by you or by arrangement made by the same entity you are acting on
|
| 1095 |
+
behalf of, you may not add another; but you may replace the old
|
| 1096 |
+
one, on explicit permission from the previous publisher that added
|
| 1097 |
+
the old one.
|
| 1098 |
+
|
| 1099 |
+
The author(s) and publisher(s) of the Document do not by this
|
| 1100 |
+
License give permission to use their names for publicity for or to
|
| 1101 |
+
assert or imply endorsement of any Modified Version.
|
| 1102 |
+
|
| 1103 |
+
5. COMBINING DOCUMENTS
|
| 1104 |
+
|
| 1105 |
+
You may combine the Document with other documents released under
|
| 1106 |
+
this License, under the terms defined in section 4 above for
|
| 1107 |
+
modified versions, provided that you include in the combination all
|
| 1108 |
+
of the Invariant Sections of all of the original documents,
|
| 1109 |
+
unmodified, and list them all as Invariant Sections of your
|
| 1110 |
+
combined work in its license notice, and that you preserve all
|
| 1111 |
+
their Warranty Disclaimers.
|
| 1112 |
+
|
| 1113 |
+
The combined work need only contain one copy of this License, and
|
| 1114 |
+
multiple identical Invariant Sections may be replaced with a single
|
| 1115 |
+
copy. If there are multiple Invariant Sections with the same name
|
| 1116 |
+
but different contents, make the title of each such section unique
|
| 1117 |
+
by adding at the end of it, in parentheses, the name of the
|
| 1118 |
+
original author or publisher of that section if known, or else a
|
| 1119 |
+
unique number. Make the same adjustment to the section titles in
|
| 1120 |
+
the list of Invariant Sections in the license notice of the
|
| 1121 |
+
combined work.
|
| 1122 |
+
|
| 1123 |
+
In the combination, you must combine any sections Entitled
|
| 1124 |
+
"History" in the various original documents, forming one section
|
| 1125 |
+
Entitled "History"; likewise combine any sections Entitled
|
| 1126 |
+
"Acknowledgements", and any sections Entitled "Dedications". You
|
| 1127 |
+
must delete all sections Entitled "Endorsements."
|
| 1128 |
+
|
| 1129 |
+
6. COLLECTIONS OF DOCUMENTS
|
| 1130 |
+
|
| 1131 |
+
You may make a collection consisting of the Document and other
|
| 1132 |
+
documents released under this License, and replace the individual
|
| 1133 |
+
copies of this License in the various documents with a single copy
|
| 1134 |
+
that is included in the collection, provided that you follow the
|
| 1135 |
+
rules of this License for verbatim copying of each of the documents
|
| 1136 |
+
in all other respects.
|
| 1137 |
+
|
| 1138 |
+
You may extract a single document from such a collection, and
|
| 1139 |
+
distribute it individually under this License, provided you insert
|
| 1140 |
+
a copy of this License into the extracted document, and follow this
|
| 1141 |
+
License in all other respects regarding verbatim copying of that
|
| 1142 |
+
document.
|
| 1143 |
+
|
| 1144 |
+
7. AGGREGATION WITH INDEPENDENT WORKS
|
| 1145 |
+
|
| 1146 |
+
A compilation of the Document or its derivatives with other
|
| 1147 |
+
separate and independent documents or works, in or on a volume of a
|
| 1148 |
+
storage or distribution medium, is called an "aggregate" if the
|
| 1149 |
+
copyright resulting from the compilation is not used to limit the
|
| 1150 |
+
legal rights of the compilation's users beyond what the individual
|
| 1151 |
+
works permit. When the Document is included in an aggregate, this
|
| 1152 |
+
License does not apply to the other works in the aggregate which
|
| 1153 |
+
are not themselves derivative works of the Document.
|
| 1154 |
+
|
| 1155 |
+
If the Cover Text requirement of section 3 is applicable to these
|
| 1156 |
+
copies of the Document, then if the Document is less than one half
|
| 1157 |
+
of the entire aggregate, the Document's Cover Texts may be placed
|
| 1158 |
+
on covers that bracket the Document within the aggregate, or the
|
| 1159 |
+
electronic equivalent of covers if the Document is in electronic
|
| 1160 |
+
form. Otherwise they must appear on printed covers that bracket
|
| 1161 |
+
the whole aggregate.
|
| 1162 |
+
|
| 1163 |
+
8. TRANSLATION
|
| 1164 |
+
|
| 1165 |
+
Translation is considered a kind of modification, so you may
|
| 1166 |
+
distribute translations of the Document under the terms of section
|
| 1167 |
+
4. Replacing Invariant Sections with translations requires special
|
| 1168 |
+
permission from their copyright holders, but you may include
|
| 1169 |
+
translations of some or all Invariant Sections in addition to the
|
| 1170 |
+
original versions of these Invariant Sections. You may include a
|
| 1171 |
+
translation of this License, and all the license notices in the
|
| 1172 |
+
Document, and any Warranty Disclaimers, provided that you also
|
| 1173 |
+
include the original English version of this License and the
|
| 1174 |
+
original versions of those notices and disclaimers. In case of a
|
| 1175 |
+
disagreement between the translation and the original version of
|
| 1176 |
+
this License or a notice or disclaimer, the original version will
|
| 1177 |
+
prevail.
|
| 1178 |
+
|
| 1179 |
+
If a section in the Document is Entitled "Acknowledgements",
|
| 1180 |
+
"Dedications", or "History", the requirement (section 4) to
|
| 1181 |
+
Preserve its Title (section 1) will typically require changing the
|
| 1182 |
+
actual title.
|
| 1183 |
+
|
| 1184 |
+
9. TERMINATION
|
| 1185 |
+
|
| 1186 |
+
You may not copy, modify, sublicense, or distribute the Document
|
| 1187 |
+
except as expressly provided under this License. Any attempt
|
| 1188 |
+
otherwise to copy, modify, sublicense, or distribute it is void,
|
| 1189 |
+
and will automatically terminate your rights under this License.
|
| 1190 |
+
|
| 1191 |
+
However, if you cease all violation of this License, then your
|
| 1192 |
+
license from a particular copyright holder is reinstated (a)
|
| 1193 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 1194 |
+
finally terminates your license, and (b) permanently, if the
|
| 1195 |
+
copyright holder fails to notify you of the violation by some
|
| 1196 |
+
reasonable means prior to 60 days after the cessation.
|
| 1197 |
+
|
| 1198 |
+
Moreover, your license from a particular copyright holder is
|
| 1199 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 1200 |
+
violation by some reasonable means, this is the first time you have
|
| 1201 |
+
received notice of violation of this License (for any work) from
|
| 1202 |
+
that copyright holder, and you cure the violation prior to 30 days
|
| 1203 |
+
after your receipt of the notice.
|
| 1204 |
+
|
| 1205 |
+
Termination of your rights under this section does not terminate
|
| 1206 |
+
the licenses of parties who have received copies or rights from you
|
| 1207 |
+
under this License. If your rights have been terminated and not
|
| 1208 |
+
permanently reinstated, receipt of a copy of some or all of the
|
| 1209 |
+
same material does not give you any rights to use it.
|
| 1210 |
+
|
| 1211 |
+
10. FUTURE REVISIONS OF THIS LICENSE
|
| 1212 |
+
|
| 1213 |
+
The Free Software Foundation may publish new, revised versions of
|
| 1214 |
+
the GNU Free Documentation License from time to time. Such new
|
| 1215 |
+
versions will be similar in spirit to the present version, but may
|
| 1216 |
+
differ in detail to address new problems or concerns. See
|
| 1217 |
+
<http://www.gnu.org/copyleft/>.
|
| 1218 |
+
|
| 1219 |
+
Each version of the License is given a distinguishing version
|
| 1220 |
+
number. If the Document specifies that a particular numbered
|
| 1221 |
+
version of this License "or any later version" applies to it, you
|
| 1222 |
+
have the option of following the terms and conditions either of
|
| 1223 |
+
that specified version or of any later version that has been
|
| 1224 |
+
published (not as a draft) by the Free Software Foundation. If the
|
| 1225 |
+
Document does not specify a version number of this License, you may
|
| 1226 |
+
choose any version ever published (not as a draft) by the Free
|
| 1227 |
+
Software Foundation. If the Document specifies that a proxy can
|
| 1228 |
+
decide which future versions of this License can be used, that
|
| 1229 |
+
proxy's public statement of acceptance of a version permanently
|
| 1230 |
+
authorizes you to choose that version for the Document.
|
| 1231 |
+
|
| 1232 |
+
11. RELICENSING
|
| 1233 |
+
|
| 1234 |
+
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
|
| 1235 |
+
World Wide Web server that publishes copyrightable works and also
|
| 1236 |
+
provides prominent facilities for anybody to edit those works. A
|
| 1237 |
+
public wiki that anybody can edit is an example of such a server.
|
| 1238 |
+
A "Massive Multiauthor Collaboration" (or "MMC") contained in the
|
| 1239 |
+
site means any set of copyrightable works thus published on the MMC
|
| 1240 |
+
site.
|
| 1241 |
+
|
| 1242 |
+
"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
|
| 1243 |
+
license published by Creative Commons Corporation, a not-for-profit
|
| 1244 |
+
corporation with a principal place of business in San Francisco,
|
| 1245 |
+
California, as well as future copyleft versions of that license
|
| 1246 |
+
published by that same organization.
|
| 1247 |
+
|
| 1248 |
+
"Incorporate" means to publish or republish a Document, in whole or
|
| 1249 |
+
in part, as part of another Document.
|
| 1250 |
+
|
| 1251 |
+
An MMC is "eligible for relicensing" if it is licensed under this
|
| 1252 |
+
License, and if all works that were first published under this
|
| 1253 |
+
License somewhere other than this MMC, and subsequently
|
| 1254 |
+
incorporated in whole or in part into the MMC, (1) had no cover
|
| 1255 |
+
texts or invariant sections, and (2) were thus incorporated prior
|
| 1256 |
+
to November 1, 2008.
|
| 1257 |
+
|
| 1258 |
+
The operator of an MMC Site may republish an MMC contained in the
|
| 1259 |
+
site under CC-BY-SA on the same site at any time before August 1,
|
| 1260 |
+
2009, provided the MMC is eligible for relicensing.
|
| 1261 |
+
|
| 1262 |
+
ADDENDUM: How to use this License for your documents
|
| 1263 |
+
====================================================
|
| 1264 |
+
|
| 1265 |
+
To use this License in a document you have written, include a copy of
|
| 1266 |
+
the License in the document and put the following copyright and license
|
| 1267 |
+
notices just after the title page:
|
| 1268 |
+
|
| 1269 |
+
Copyright (C) YEAR YOUR NAME.
|
| 1270 |
+
Permission is granted to copy, distribute and/or modify this document
|
| 1271 |
+
under the terms of the GNU Free Documentation License, Version 1.3
|
| 1272 |
+
or any later version published by the Free Software Foundation;
|
| 1273 |
+
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
| 1274 |
+
Texts. A copy of the license is included in the section entitled ``GNU
|
| 1275 |
+
Free Documentation License''.
|
| 1276 |
+
|
| 1277 |
+
If you have Invariant Sections, Front-Cover Texts and Back-Cover
|
| 1278 |
+
Texts, replace the "with...Texts." line with this:
|
| 1279 |
+
|
| 1280 |
+
with the Invariant Sections being LIST THEIR TITLES, with
|
| 1281 |
+
the Front-Cover Texts being LIST, and with the Back-Cover Texts
|
| 1282 |
+
being LIST.
|
| 1283 |
+
|
| 1284 |
+
If you have Invariant Sections without Cover Texts, or some other
|
| 1285 |
+
combination of the three, merge those two alternatives to suit the
|
| 1286 |
+
situation.
|
| 1287 |
+
|
| 1288 |
+
If your document contains nontrivial examples of program code, we
|
| 1289 |
+
recommend releasing these examples in parallel under your choice of free
|
| 1290 |
+
software license, such as the GNU General Public License, to permit
|
| 1291 |
+
their use in free software.
|
| 1292 |
+
|
| 1293 |
+
|
| 1294 |
+
File: history.info, Node: Concept Index, Next: Function and Variable Index, Prev: GNU Free Documentation License, Up: Top
|
| 1295 |
+
|
| 1296 |
+
Appendix B Concept Index
|
| 1297 |
+
************************
|
| 1298 |
+
|
| 1299 |
+
|