Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/isccc
File: symtab.h
/*
[0] Fix | Delete
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*
[9] Fix | Delete
* Portions Copyright (C) 2001 Nominum, Inc.
[10] Fix | Delete
*
[11] Fix | Delete
* Permission to use, copy, modify, and/or distribute this software for any
[12] Fix | Delete
* purpose with or without fee is hereby granted, provided that the above
[13] Fix | Delete
* copyright notice and this permission notice appear in all copies.
[14] Fix | Delete
*
[15] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
[16] Fix | Delete
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
[17] Fix | Delete
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
[18] Fix | Delete
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
[19] Fix | Delete
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
[20] Fix | Delete
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
[21] Fix | Delete
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
[25] Fix | Delete
#ifndef ISCCC_SYMTAB_H
[26] Fix | Delete
#define ISCCC_SYMTAB_H 1
[27] Fix | Delete
[28] Fix | Delete
/*****
[29] Fix | Delete
***** Module Info
[30] Fix | Delete
*****/
[31] Fix | Delete
[32] Fix | Delete
/*! \file isccc/symtab.h
[33] Fix | Delete
* \brief
[34] Fix | Delete
* Provides a simple memory-based symbol table.
[35] Fix | Delete
*
[36] Fix | Delete
* Keys are C strings. A type may be specified when looking up,
[37] Fix | Delete
* defining, or undefining. A type value of 0 means "match any type";
[38] Fix | Delete
* any other value will only match the given type.
[39] Fix | Delete
*
[40] Fix | Delete
* It's possible that a client will attempt to define a <key, type,
[41] Fix | Delete
* value> tuple when a tuple with the given key and type already
[42] Fix | Delete
* exists in the table. What to do in this case is specified by the
[43] Fix | Delete
* client. Possible policies are:
[44] Fix | Delete
*
[45] Fix | Delete
*\li isccc_symexists_reject Disallow the define, returning #ISC_R_EXISTS
[46] Fix | Delete
*\li isccc_symexists_replace Replace the old value with the new. The
[47] Fix | Delete
* undefine action (if provided) will be called
[48] Fix | Delete
* with the old <key, type, value> tuple.
[49] Fix | Delete
*\li isccc_symexists_add Add the new tuple, leaving the old tuple in
[50] Fix | Delete
* the table. Subsequent lookups will retrieve
[51] Fix | Delete
* the most-recently-defined tuple.
[52] Fix | Delete
*
[53] Fix | Delete
* A lookup of a key using type 0 will return the most-recently
[54] Fix | Delete
* defined symbol with that key. An undefine of a key using type 0
[55] Fix | Delete
* will undefine the most-recently defined symbol with that key.
[56] Fix | Delete
* Trying to define a key with type 0 is illegal.
[57] Fix | Delete
*
[58] Fix | Delete
* The symbol table library does not make a copy the key field, so the
[59] Fix | Delete
* caller must ensure that any key it passes to isccc_symtab_define()
[60] Fix | Delete
* will not change until it calls isccc_symtab_undefine() or
[61] Fix | Delete
* isccc_symtab_destroy().
[62] Fix | Delete
*
[63] Fix | Delete
* A user-specified action will be called (if provided) when a symbol
[64] Fix | Delete
* is undefined. It can be used to free memory associated with keys
[65] Fix | Delete
* and/or values.
[66] Fix | Delete
*/
[67] Fix | Delete
[68] Fix | Delete
/***
[69] Fix | Delete
*** Imports.
[70] Fix | Delete
***/
[71] Fix | Delete
[72] Fix | Delete
#include <stdbool.h>
[73] Fix | Delete
[74] Fix | Delete
#include <isc/lang.h>
[75] Fix | Delete
#include <isccc/types.h>
[76] Fix | Delete
[77] Fix | Delete
/***
[78] Fix | Delete
*** Symbol Tables.
[79] Fix | Delete
***/
[80] Fix | Delete
[81] Fix | Delete
typedef union isccc_symvalue {
[82] Fix | Delete
void * as_pointer;
[83] Fix | Delete
int as_integer;
[84] Fix | Delete
unsigned int as_uinteger;
[85] Fix | Delete
} isccc_symvalue_t;
[86] Fix | Delete
[87] Fix | Delete
typedef void (*isccc_symtabundefaction_t)(char *key, unsigned int type,
[88] Fix | Delete
isccc_symvalue_t value, void *userarg);
[89] Fix | Delete
[90] Fix | Delete
typedef bool (*isccc_symtabforeachaction_t)(char *key,
[91] Fix | Delete
unsigned int type,
[92] Fix | Delete
isccc_symvalue_t value,
[93] Fix | Delete
void *userarg);
[94] Fix | Delete
[95] Fix | Delete
typedef enum {
[96] Fix | Delete
isccc_symexists_reject = 0,
[97] Fix | Delete
isccc_symexists_replace = 1,
[98] Fix | Delete
isccc_symexists_add = 2
[99] Fix | Delete
} isccc_symexists_t;
[100] Fix | Delete
[101] Fix | Delete
ISC_LANG_BEGINDECLS
[102] Fix | Delete
[103] Fix | Delete
isc_result_t
[104] Fix | Delete
isccc_symtab_create(unsigned int size,
[105] Fix | Delete
isccc_symtabundefaction_t undefine_action, void *undefine_arg,
[106] Fix | Delete
bool case_sensitive, isccc_symtab_t **symtabp);
[107] Fix | Delete
[108] Fix | Delete
void
[109] Fix | Delete
isccc_symtab_destroy(isccc_symtab_t **symtabp);
[110] Fix | Delete
[111] Fix | Delete
isc_result_t
[112] Fix | Delete
isccc_symtab_lookup(isccc_symtab_t *symtab, const char *key, unsigned int type,
[113] Fix | Delete
isccc_symvalue_t *value);
[114] Fix | Delete
[115] Fix | Delete
isc_result_t
[116] Fix | Delete
isccc_symtab_define(isccc_symtab_t *symtab, char *key, unsigned int type,
[117] Fix | Delete
isccc_symvalue_t value, isccc_symexists_t exists_policy);
[118] Fix | Delete
[119] Fix | Delete
isc_result_t
[120] Fix | Delete
isccc_symtab_undefine(isccc_symtab_t *symtab, const char *key, unsigned int type);
[121] Fix | Delete
[122] Fix | Delete
void
[123] Fix | Delete
isccc_symtab_foreach(isccc_symtab_t *symtab, isccc_symtabforeachaction_t action,
[124] Fix | Delete
void *arg);
[125] Fix | Delete
[126] Fix | Delete
ISC_LANG_ENDDECLS
[127] Fix | Delete
[128] Fix | Delete
#endif /* ISCCC_SYMTAB_H */
[129] Fix | Delete
[130] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function