From 12cb6e09b64a9ecd8ee90f0243fc4af41a64238c Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 26 Nov 2005 15:55:12 +0000 Subject: [PATCH] bool -> SilcBool. --- lib/silcasn1/silcasn1.c | 8 ++++---- lib/silcasn1/silcasn1.h | 24 +++++++++++------------ lib/silcasn1/silcasn1_decode.c | 18 ++++++++--------- lib/silcasn1/silcasn1_encode.c | 10 +++++----- lib/silcasn1/silcasn1_i.h | 2 +- lib/silcasn1/silcber.c | 10 +++++----- lib/silcasn1/silcber.h | 20 +++++++++---------- lib/silcasn1/tests/test_silcasn1.c | 16 +++++++-------- lib/silcclient/client.c | 20 +++++++++---------- lib/silcclient/client_attrs.c | 4 ++-- lib/silcclient/client_channel.c | 12 ++++++------ lib/silcclient/client_ftp.c | 2 +- lib/silcclient/client_internal.h | 12 ++++++------ lib/silcclient/client_notify.c | 2 +- lib/silcclient/client_ops_example.c | 6 +++--- lib/silcclient/client_prvmsg.c | 20 +++++++++---------- lib/silcclient/client_resume.c | 6 +++--- lib/silcclient/command.c | 12 ++++++------ lib/silcclient/command.h | 4 ++-- lib/silcclient/command_reply.c | 12 ++++++------ lib/silcclient/idlist.c | 30 ++++++++++++++--------------- lib/silcclient/idlist.h | 4 ++-- lib/silcclient/protocol.c | 10 +++++----- lib/silcclient/protocol.h | 6 +++--- lib/silcclient/silcclient.h | 2 +- 25 files changed, 136 insertions(+), 136 deletions(-) diff --git a/lib/silcasn1/silcasn1.c b/lib/silcasn1/silcasn1.c index eec926c4..dfb5cd3d 100644 --- a/lib/silcasn1/silcasn1.c +++ b/lib/silcasn1/silcasn1.c @@ -45,7 +45,7 @@ void silc_asn1_free(SilcAsn1 asn1) /* Init pre-allocated ASN.1 context */ -bool silc_asn1_init(SilcAsn1 asn1) +SilcBool silc_asn1_init(SilcAsn1 asn1) { asn1->stack1 = silc_stack_alloc(768); if (!asn1->stack1) @@ -155,14 +155,14 @@ const char *silc_asn1_tag_name(SilcAsn1Tag tag) /* Dumps the ASN.1 data block into standard output (stdout). */ -bool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src) +SilcBool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src) { - bool ret = FALSE; + SilcBool ret = FALSE; SilcBerEncoding renc; SilcAsn1Tag rtag; const unsigned char *rdata; SilcUInt32 rdata_len, len = 0; - bool rindef; + SilcBool rindef; SILC_LOG_DEBUG(("Dumping ASN.1")); diff --git a/lib/silcasn1/silcasn1.h b/lib/silcasn1/silcasn1.h index f9c4c46f..a620d69c 100644 --- a/lib/silcasn1/silcasn1.h +++ b/lib/silcasn1/silcasn1.h @@ -231,7 +231,7 @@ void silc_asn1_free(SilcAsn1 asn1); * * SYNOPSIS * - * bool silc_asn1_init(SilcAsn1 asn1); + * SilcBool silc_asn1_init(SilcAsn1 asn1); * * DESCRIPTION * @@ -246,7 +246,7 @@ void silc_asn1_free(SilcAsn1 asn1); * error; * ***/ -bool silc_asn1_init(SilcAsn1 asn1); +SilcBool silc_asn1_init(SilcAsn1 asn1); /****f* silcasn1/SilcASN1API/silc_asn1_uninit * @@ -266,7 +266,7 @@ void silc_asn1_uninit(SilcAsn1 asn1); * * SYNOPSIS * - * bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); + * SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); * * DESCRIPTION * @@ -313,13 +313,13 @@ void silc_asn1_uninit(SilcAsn1 asn1); * string2 [1] OCTET-STRING } * ***/ -bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); +SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); /****f* silcasn1/SilcASN1API/silc_asn1_decode * * SYNOPSIS * - * bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...); + * SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...); * * DESCRIPTION * @@ -355,7 +355,7 @@ bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); * * EXAMPLE * - * bool bool_val, foo; + * SilcBool bool_val, foo; * unsigned char *string, string2; * SilcUInt32 string_len, string2_len; * @@ -370,7 +370,7 @@ bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...); * SILC_ASN1_END, SILC_ASN1_END); * ***/ -bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...); +SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...); /****f* silcasn1/SilcASN1API/SILC_ASN1_OPTS * @@ -601,17 +601,17 @@ bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...); * SYNOPSIS * * Encoding: - * SILC_ASN1_BOOLEAN(bool) - * SILC_ASN1_BOOLEAN_T(opts, tag, bool) + * SILC_ASN1_BOOLEAN(boolval) + * SILC_ASN1_BOOLEAN_T(opts, tag, boolval) * * Decoding: - * SILC_ASN1_BOOLEAN(&bool) - * SILC_ASN1_BOOLEAN_T(opts, tag, &bool) + * SILC_ASN1_BOOLEAN(&boolval) + * SILC_ASN1_BOOLEAN_T(opts, tag, &boolval) * * DESCRIPTION * * Macro used to encode or decode boolean value. Type boolean type - * is bool. + * is SilcBool. * * The `opts' is SilcAsn1Options. The `tag' is a tag number. * diff --git a/lib/silcasn1/silcasn1_decode.c b/lib/silcasn1/silcasn1_decode.c index ed04a0ab..f2d638b9 100644 --- a/lib/silcasn1/silcasn1_decode.c +++ b/lib/silcasn1/silcasn1_decode.c @@ -29,9 +29,9 @@ silc_asn1_decoder function. This parses the sequence of types and returns them as raw BER buffers in an array of SilcBuffers. */ -static bool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src) +static SilcBool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src) { - bool ret = FALSE; + SilcBool ret = FALSE; SilcList types; SilcAsn1Tag type; SilcBuffer *retb; @@ -39,7 +39,7 @@ static bool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src) SilcAsn1Tag rtag; const unsigned char *rdata; SilcUInt32 rdata_len, len = 0; - bool found = FALSE, rindef; + SilcBool found = FALSE, rindef; struct SilcAsn1SofStruct { SilcAsn1Tag type; @@ -243,11 +243,11 @@ static bool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src) arguments (either very first or first for recursion) for a type. The `depth' includes the current depth of recursion. */ -static bool +static SilcBool silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type, SilcAsn1Tag tag, SilcBerClass ber_class, SilcAsn1Options opts, SilcBuffer src, SilcUInt32 depth, - bool primitive) + SilcBool primitive) { unsigned char *ptr = src->data; SilcAsn1Tag rtype, rtag; @@ -255,7 +255,7 @@ silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type, SilcBerClass rclass; SilcBerEncoding renc; SilcUInt32 len = 0; - bool ret, indef, rindef, found = FALSE, choice = FALSE; + SilcBool ret, indef, rindef, found = FALSE, choice = FALSE; const unsigned char *rdata; SilcUInt32 rdata_len; int i; @@ -517,7 +517,7 @@ silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type, case SILC_ASN1_TAG_BOOLEAN: { /* Decode boolean (TRUE/FALSE) value */ - SILC_ASN1_VAD(asn1, opts, bool, val); + SILC_ASN1_VAD(asn1, opts, SilcBool, val); if (rdata_len != 1) { SILC_LOG_DEBUG(("Malformed boolean value")); @@ -778,14 +778,14 @@ silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type, return ret; } -bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...) +SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...) { SilcAsn1Tag type, tag; SilcAsn1Options opts; SilcBerClass ber_class; SilcStackFrame frame1, frame2; SilcStack stack1 = NULL, stack2 = NULL; - bool ret; + SilcBool ret; if (!asn1) return FALSE; diff --git a/lib/silcasn1/silcasn1_encode.c b/lib/silcasn1/silcasn1_encode.c index a0504f55..7c8d667d 100644 --- a/lib/silcasn1/silcasn1_encode.c +++ b/lib/silcasn1/silcasn1_encode.c @@ -56,18 +56,18 @@ is TRUE if this encoder receives one primitive type as argument. If it is a constructed type it must be FALSE value. */ -static bool +static SilcBool silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, SilcAsn1Tag type, SilcAsn1Tag tag, SilcBerClass ber_class, SilcAsn1Options opts, SilcBuffer dest, SilcUInt32 depth, - bool primitive) + SilcBool primitive) { unsigned char *ptr = dest->data; SilcAsn1Tag rtype, rtag; SilcAsn1Options ropts; SilcBerClass rclass; SilcUInt32 len = 0; - bool ret = FALSE, indef; + SilcBool ret = FALSE, indef; SilcBufferStruct buf; SilcStackFrame frame; @@ -588,14 +588,14 @@ silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2, return ret; } -bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...) +SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...) { SilcAsn1Tag type, tag; SilcAsn1Options opts; SilcBerClass ber_class; SilcStackFrame frame1, frame2; SilcStack stack1 = NULL; - bool ret; + SilcBool ret; if (!asn1) return FALSE; diff --git a/lib/silcasn1/silcasn1_i.h b/lib/silcasn1/silcasn1_i.h index 67fb4d05..394ba3ba 100644 --- a/lib/silcasn1/silcasn1_i.h +++ b/lib/silcasn1/silcasn1_i.h @@ -105,7 +105,7 @@ struct SilcAsn1Object { const char *silc_asn1_tag_name(SilcAsn1Tag tag); /* Dumps the ASN.1 data block into standard output (stdout). */ -bool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src); +SilcBool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src); #endif /* SILC_DIST_INPLACE */ #endif /* SILCASN1_I_H */ diff --git a/lib/silcasn1/silcber.c b/lib/silcasn1/silcber.c index bfcafa37..8f7b7e16 100644 --- a/lib/silcasn1/silcber.c +++ b/lib/silcasn1/silcber.c @@ -27,10 +27,10 @@ function. If the `indefinite' is TRUE then the BER block will not include the length of the data in the BER block. */ -bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, +SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, SilcBerEncoding encoding, SilcUInt32 tag, const unsigned char *data, SilcUInt32 data_len, - bool indefinite) + SilcBool indefinite) { int i = 0, c; SilcUInt32 tmp; @@ -114,10 +114,10 @@ bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, `identifier_len' is the length of the BER header, and the length of the entire BER object is `identifier_len' + `data_len'. */ -bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, +SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, SilcBerEncoding *encoding, SilcUInt32 *tag, const unsigned char **data, SilcUInt32 *data_len, - bool *indefinite, SilcUInt32 *identifier_len) + SilcBool *indefinite, SilcUInt32 *identifier_len) { int i = 0, c; SilcUInt32 t; @@ -240,7 +240,7 @@ bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, encoding with silc_ber_encode. */ SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len, - bool indefinite) + SilcBool indefinite) { SilcUInt32 len, tmp; diff --git a/lib/silcasn1/silcber.h b/lib/silcasn1/silcber.h index b4bec70e..244c856c 100644 --- a/lib/silcasn1/silcber.h +++ b/lib/silcasn1/silcber.h @@ -51,10 +51,10 @@ typedef enum { * * SYNOPSIS * - * bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, + * SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, * SilcBerEncoding encoding, SilcUInt32 tag, * const unsigned char *data, SilcUInt32 data_len, - * bool indefinite); + * SilcBool indefinite); * * DESCRIPTION * @@ -65,19 +65,19 @@ typedef enum { * include the length of the data in the BER block. * ***/ -bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, +SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, SilcBerEncoding encoding, SilcUInt32 tag, const unsigned char *data, SilcUInt32 data_len, - bool indefinite); + SilcBool indefinite); /****f* silcasn1/SilcBerAPI/silc_ber_decode * * SYNOPSIS * - * bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, + * SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, * SilcBerEncoding *encoding, SilcUInt32 *tag, * const unsigned char **data, SilcUInt32 *data_len, - * bool *indefinite, SilcUInt32 *identifier_len); + * SilcBool *indefinite, SilcUInt32 *identifier_len); * * DESCRIPTION * @@ -92,17 +92,17 @@ bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, * of the entire BER object is `identifier_len' + `data_len'. * ***/ -bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, +SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, SilcBerEncoding *encoding, SilcUInt32 *tag, const unsigned char **data, SilcUInt32 *data_len, - bool *indefinite, SilcUInt32 *identifier_len); + SilcBool *indefinite, SilcUInt32 *identifier_len); /****f* silcasn1/SilcBerAPI/silc_ber_encoded_len * * SYNOPSIS * * SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len, - * bool indefinite); + * SilcBool indefinite); * * DESCRIPTION * @@ -112,6 +112,6 @@ bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, * ***/ SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len, - bool indefinite); + SilcBool indefinite); #endif /* SILCBER_H */ diff --git a/lib/silcasn1/tests/test_silcasn1.c b/lib/silcasn1/tests/test_silcasn1.c index 5f153aa3..c92deee7 100644 --- a/lib/silcasn1/tests/test_silcasn1.c +++ b/lib/silcasn1/tests/test_silcasn1.c @@ -2,15 +2,15 @@ /* silc_asn1_encode(asn1, node, - SILC_ASN1_BOOLEAN(bool), + SILC_ASN1_BOOLEAN(SilcBool), SILC_ASN1_END); silc_asn1_encode(asn1, dest, SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101), SILC_ASN1_SEQUENCE_T(0, 9), SILC_ASN1_SEQUENCE, SILC_ASN1_ANY_T(0, 33, node), - SILC_ASN1_BOOLEAN_T(0, 4, bool), - SILC_ASN1_BOOLEAN(bool), + SILC_ASN1_BOOLEAN_T(0, 4, boolv), + SILC_ASN1_BOOLEAN(SilcBool), SILC_ASN1_END, SILC_ASN1_END, SILC_ASN1_END); @@ -23,15 +23,15 @@ silc_asn1_encode(asn1, dest, /* silc_asn1_encode(asn1, node, - SILC_ASN1_BOOLEAN(bool), + SILC_ASN1_BOOLEAN(SilcBool), SILC_ASN1_END); silc_asn1_encode(asn1, dest, SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101), SILC_ASN1_SEQUENCE_T(0, 9), SILC_ASN1_SEQUENCE, SILC_ASN1_ANY_T(SILC_ASN1_EXPLICIT, 33, node), - SILC_ASN1_BOOLEAN_T(0, 4, bool), - SILC_ASN1_BOOLEAN(bool), + SILC_ASN1_BOOLEAN_T(0, 4, boolv), + SILC_ASN1_BOOLEAN(SilcBool), SILC_ASN1_END, SILC_ASN1_END, SILC_ASN1_END); @@ -47,8 +47,8 @@ int main(int argc, char **argv) { SilcBufferStruct node, node2; SilcAsn1 asn1; - bool success = FALSE; - bool val = TRUE; + SilcBool success = FALSE; + SilcBool val = TRUE; int i; unsigned char *str; SilcUInt32 str_len; diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 61191981..7b980de9 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -28,12 +28,12 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second); SILC_TASK_CALLBACK(silc_client_connect_to_server_final); SILC_TASK_CALLBACK(silc_client_rekey_final); -static bool silc_client_packet_parse(SilcPacketParserContext *parser_context, +static SilcBool silc_client_packet_parse(SilcPacketParserContext *parser_context, void *context); static void silc_client_packet_parse_type(SilcClient client, SilcSocketConnection sock, SilcPacketContext *packet); -void silc_client_resolve_auth_method(bool success, +void silc_client_resolve_auth_method(SilcBool success, SilcProtocolAuthMeth auth_meth, const unsigned char *auth_data, SilcUInt32 auth_data_len, void *context); @@ -111,7 +111,7 @@ void silc_client_free(SilcClient client) the client ready to be run. One must call silc_client_run to run the client. Returns FALSE if error occured, TRUE otherwise. */ -bool silc_client_init(SilcClient client) +SilcBool silc_client_init(SilcClient client) { SILC_LOG_DEBUG(("Initializing client")); @@ -298,7 +298,7 @@ void silc_client_del_connection(SilcClient client, SilcClientConnection conn) SilcIDCacheList list; SilcIDCacheEntry entry; SilcClientCommandPending *r; - bool ret; + SilcBool ret; if (silc_idcache_get_all(conn->internal->client_cache, &list)) { ret = silc_idcache_list_first(list, &entry); @@ -748,7 +748,7 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second) client operation to resolve the authentication method. We will continue the executiong of the protocol in this function. */ -void silc_client_resolve_auth_method(bool success, +void silc_client_resolve_auth_method(SilcBool success, SilcProtocolAuthMeth auth_meth, const unsigned char *auth_data, SilcUInt32 auth_data_len, void *context) @@ -928,7 +928,7 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_final) int silc_client_packet_send_real(SilcClient client, SilcSocketConnection sock, - bool force_send) + SilcBool force_send) { int ret; @@ -1049,7 +1049,7 @@ SILC_TASK_CALLBACK_GLOBAL(silc_client_packet_process) /* Parser callback called by silc_packet_receive_process. Thie merely registers timeout that will handle the actual parsing when appropriate. */ -static bool silc_client_packet_parse(SilcPacketParserContext *parser_context, +static SilcBool silc_client_packet_parse(SilcPacketParserContext *parser_context, void *context) { SilcClient client = (SilcClient)context; @@ -1412,7 +1412,7 @@ void silc_client_packet_send(SilcClient client, SilcHmac hmac, unsigned char *data, SilcUInt32 data_len, - bool force_send) + SilcBool force_send) { SilcPacketContext packetdata; const SilcBufferStruct packet; @@ -1504,7 +1504,7 @@ void silc_client_packet_send(SilcClient client, /* Packet sending routine for application. This is the only routine that is provided for application to send SILC packets. */ -bool silc_client_send_packet(SilcClient client, +SilcBool silc_client_send_packet(SilcClient client, SilcClientConnection conn, SilcPacketType type, const unsigned char *data, @@ -1705,7 +1705,7 @@ SILC_TASK_CALLBACK(silc_client_send_auto_nick) static void silc_client_resume_session_cb(SilcClient client, SilcClientConnection conn, - bool success, + SilcBool success, void *context) { SilcBuffer sidp; diff --git a/lib/silcclient/client_attrs.c b/lib/silcclient/client_attrs.c index eaf0a233..80a8d04d 100644 --- a/lib/silcclient/client_attrs.c +++ b/lib/silcclient/client_attrs.c @@ -184,12 +184,12 @@ static void silc_client_attribute_del_foreach(void *key, void *context, /* Delete one attribute */ -bool silc_client_attribute_del(SilcClient client, +SilcBool silc_client_attribute_del(SilcClient client, SilcClientConnection conn, SilcAttribute attribute, SilcAttributePayload attr) { - bool ret; + SilcBool ret; if (!conn->internal->attrs) return FALSE; diff --git a/lib/silcclient/client_channel.c b/lib/silcclient/client_channel.c index 496d124c..8f6e320a 100644 --- a/lib/silcclient/client_channel.c +++ b/lib/silcclient/client_channel.c @@ -32,14 +32,14 @@ with the next receiver's key. The `data' is the channel message. If the `force_send' is TRUE then the packet is sent immediately. */ -bool silc_client_send_channel_message(SilcClient client, +SilcBool silc_client_send_channel_message(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel, SilcChannelPrivateKey key, SilcMessageFlags flags, unsigned char *data, SilcUInt32 data_len, - bool force_send) + SilcBool force_send) { SilcSocketConnection sock; SilcBuffer payload; @@ -50,7 +50,7 @@ bool silc_client_send_channel_message(SilcClient client, unsigned char *id_string; int block_len; SilcChannelUser chu; - bool ret = FALSE; + SilcBool ret = FALSE; assert(client && conn && channel); sock = conn->sock; @@ -524,7 +524,7 @@ void silc_client_receive_channel_key(SilcClient client, currently it is not expected that the SKE key material would be used as channel private key. However, this API allows it. */ -bool silc_client_add_channel_private_key(SilcClient client, +SilcBool silc_client_add_channel_private_key(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel, const char *name, @@ -598,7 +598,7 @@ bool silc_client_add_channel_private_key(SilcClient client, after calling this to protect the channel messages. Returns FALSE on on error, TRUE otherwise. */ -bool silc_client_del_channel_private_keys(SilcClient client, +SilcBool silc_client_del_channel_private_keys(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel) { @@ -634,7 +634,7 @@ bool silc_client_del_channel_private_keys(SilcClient client, old channel key is used hereafter to protect the channel messages. This returns FALSE on error, TRUE otherwise. */ -bool silc_client_del_channel_private_key(SilcClient client, +SilcBool silc_client_del_channel_private_key(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel, SilcChannelPrivateKey key) diff --git a/lib/silcclient/client_ftp.c b/lib/silcclient/client_ftp.c index 3e71b5ab..58c2419c 100644 --- a/lib/silcclient/client_ftp.c +++ b/lib/silcclient/client_ftp.c @@ -826,7 +826,7 @@ silc_client_file_send(SilcClient client, void *monitor_context, const char *local_ip, SilcUInt32 local_port, - bool do_not_bind, + SilcBool do_not_bind, SilcClientEntry client_entry, const char *filepath, SilcUInt32 *session_id) diff --git a/lib/silcclient/client_internal.h b/lib/silcclient/client_internal.h index 05b1ff36..f676873e 100644 --- a/lib/silcclient/client_internal.h +++ b/lib/silcclient/client_internal.h @@ -36,7 +36,7 @@ typedef struct { unsigned char *send_enc_key; SilcUInt32 enc_key_len; int ske_group; - bool pfs; + SilcBool pfs; SilcUInt32 timeout; void *context; } *SilcClientRekey; @@ -152,7 +152,7 @@ struct SilcClientConnectionInternalStruct { /* Session resuming callback */ typedef void (*SilcClientResumeSessionCallback)(SilcClient client, SilcClientConnection conn, - bool success, + SilcBool success, void *context); /* Rekey must be performed at the lastest when this many packets is sent */ @@ -221,10 +221,10 @@ void silc_client_packet_send(SilcClient client, SilcHmac hmac, unsigned char *data, SilcUInt32 data_len, - bool force_send); + SilcBool force_send); int silc_client_packet_send_real(SilcClient client, SilcSocketConnection sock, - bool force_send); + SilcBool force_send); void silc_client_ftp_free_sessions(SilcClient client, SilcClientConnection conn); void silc_client_ftp_session_free(SilcClientFtpSession session); @@ -282,7 +282,7 @@ void silc_client_ftp(SilcClient client, SilcPacketContext *packet); SilcBuffer silc_client_get_detach_data(SilcClient client, SilcClientConnection conn); -bool silc_client_process_detach_data(SilcClient client, +SilcBool silc_client_process_detach_data(SilcClient client, SilcClientConnection conn, unsigned char **old_id, SilcUInt16 *old_id_len); @@ -299,6 +299,6 @@ SILC_TASK_CALLBACK_GLOBAL(silc_client_rekey_callback); void silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd, SilcStatus status, - bool notify); + SilcBool notify); #endif diff --git a/lib/silcclient/client_notify.c b/lib/silcclient/client_notify.c index 75b113ad..1f81b435 100644 --- a/lib/silcclient/client_notify.c +++ b/lib/silcclient/client_notify.c @@ -1369,7 +1369,7 @@ void silc_client_notify_by_server(SilcClient client, * Received notify about some client we are watching */ SilcNotifyType notify = 0; - bool del_client = FALSE; + SilcBool del_client = FALSE; unsigned char *pk; SilcUInt32 pk_len; SilcPublicKey public_key = NULL; diff --git a/lib/silcclient/client_ops_example.c b/lib/silcclient/client_ops_example.c index 7c03f1c4..526c86e3 100644 --- a/lib/silcclient/client_ops_example.c +++ b/lib/silcclient/client_ops_example.c @@ -85,7 +85,7 @@ silc_notify(SilcClient client, SilcClientConnection conn, static void silc_command(SilcClient client, SilcClientConnection conn, - SilcClientCommandContext cmd_context, bool success, + SilcClientCommandContext cmd_context, SilcBool success, SilcCommand command, SilcStatus status) { @@ -111,7 +111,7 @@ silc_command(SilcClient client, SilcClientConnection conn, static void silc_command_reply(SilcClient client, SilcClientConnection conn, - SilcCommandPayload cmd_payload, bool success, + SilcCommandPayload cmd_payload, SilcBool success, SilcCommand command, SilcStatus status, ...) { @@ -213,7 +213,7 @@ silc_failure(SilcClient client, SilcClientConnection conn, silc_client_perform_key_agreement). If TRUE is returned also the `completion' and `context' arguments must be set by the application. */ -static bool +static SilcBool silc_key_agreement(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, const char *hostname, SilcUInt16 port, SilcKeyAgreementCallback *completion, diff --git a/lib/silcclient/client_prvmsg.c b/lib/silcclient/client_prvmsg.c index fbd5655e..47c9d789 100644 --- a/lib/silcclient/client_prvmsg.c +++ b/lib/silcclient/client_prvmsg.c @@ -32,13 +32,13 @@ message. The `data' is the private message. If the `force_send' is TRUE the packet is sent immediately. */ -bool silc_client_send_private_message(SilcClient client, +SilcBool silc_client_send_private_message(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, SilcMessageFlags flags, unsigned char *data, SilcUInt32 data_len, - bool force_send) + SilcBool force_send) { SilcSocketConnection sock; SilcBuffer buffer; @@ -47,7 +47,7 @@ bool silc_client_send_private_message(SilcClient client, SilcCipher cipher; SilcHmac hmac; int block_len; - bool ret = FALSE; + SilcBool ret = FALSE; assert(client && conn && client_entry); sock = conn->sock; @@ -330,15 +330,15 @@ void silc_client_private_message_key(SilcClient client, Returns FALSE if the key is already set for the `client_entry', TRUE otherwise. */ -bool silc_client_add_private_message_key(SilcClient client, +SilcBool silc_client_add_private_message_key(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, const char *cipher, const char *hmac, unsigned char *key, SilcUInt32 key_len, - bool generate_key, - bool responder) + SilcBool generate_key, + SilcBool responder) { unsigned char private_key[32]; SilcUInt32 len; @@ -426,13 +426,13 @@ bool silc_client_add_private_message_key(SilcClient client, `cipher' and `hmac' SHOULD be provided as it is negotiated also in the SKE protocol. */ -bool silc_client_add_private_message_key_ske(SilcClient client, +SilcBool silc_client_add_private_message_key_ske(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, const char *cipher, const char *hmac, SilcSKEKeyMaterial *key, - bool responder) + SilcBool responder) { assert(client && client_entry); @@ -491,7 +491,7 @@ bool silc_client_add_private_message_key_ske(SilcClient client, going to be the initiator, if and when, the users set up a static private message key (not Key Agreement). */ -bool silc_client_send_private_message_key_request(SilcClient client, +SilcBool silc_client_send_private_message_key_request(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry) { @@ -537,7 +537,7 @@ bool silc_client_send_private_message_key_request(SilcClient client, after this to protect the private messages with the remote `client_entry' client. Returns FALSE on error, TRUE otherwise. */ -bool silc_client_del_private_message_key(SilcClient client, +SilcBool silc_client_del_private_message_key(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry) { diff --git a/lib/silcclient/client_resume.c b/lib/silcclient/client_resume.c index 928c7df9..66a65457 100644 --- a/lib/silcclient/client_resume.c +++ b/lib/silcclient/client_resume.c @@ -102,7 +102,7 @@ SilcBuffer silc_client_get_detach_data(SilcClient client, server. To do that call silc_client_resume_session function. This returns the old detached session client ID. */ -bool silc_client_process_detach_data(SilcClient client, +SilcBool silc_client_process_detach_data(SilcClient client, SilcClientConnection conn, unsigned char **old_id, SilcUInt16 *old_id_len) @@ -184,7 +184,7 @@ typedef struct { SilcUInt32 channel_count; SilcUInt32 *cmd_idents; SilcUInt32 cmd_idents_count; - bool success; + SilcBool success; } *SilcClientResumeSession; /* Generic command reply callback. */ @@ -249,7 +249,7 @@ void silc_client_resume_session(SilcClient client, SilcChannelEntry channel; SilcBuffer tmp; int i; - bool ret; + SilcBool ret; SILC_LOG_DEBUG(("Resuming detached session")); diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index a64353b9..f7fb402a 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -80,7 +80,7 @@ SilcClientCommand silc_client_command_find(SilcClient client, /* Executes a command */ -bool silc_client_command_call(SilcClient client, +SilcBool silc_client_command_call(SilcClient client, SilcClientConnection conn, const char *command_line, ...) { @@ -286,7 +286,7 @@ SILC_CLIENT_CMD_FUNC(whois) SilcBuffer buffer, attrs = NULL; unsigned char count[4], *tmp = NULL; int i; - bool details = FALSE, nick = FALSE; + SilcBool details = FALSE, nick = FALSE; unsigned char *pubkey = NULL; if (!cmd->conn) { @@ -1664,7 +1664,7 @@ SILC_CLIENT_CMD_FUNC(cmode) case 'C': if (add) { int k; - bool chadd = FALSE; + SilcBool chadd = FALSE; SilcPublicKey chpk = NULL; mode |= SILC_CHANNEL_MODE_CHANNEL_AUTH; @@ -2327,7 +2327,7 @@ SILC_CLIENT_CMD_FUNC(watch) SilcBuffer buffer, idp = NULL, args = NULL; int type = 0; const char *pubkey = NULL; - bool pubkey_add = TRUE; + SilcBool pubkey_add = TRUE; if (!cmd->conn) { SILC_NOT_CONNECTED(cmd->client, cmd->conn); @@ -2678,7 +2678,7 @@ SILC_CLIENT_CMD_FUNC(service) command identifier `ident'. Application usually does not need it and set it to zero value. */ -bool silc_client_command_register(SilcClient client, +SilcBool silc_client_command_register(SilcClient client, SilcCommand command, const char *name, SilcCommandCb command_function, @@ -2705,7 +2705,7 @@ bool silc_client_command_register(SilcClient client, `command_function' and command reply function `command_reply_function'. Returns TRUE if the command was found and unregistered. */ -bool silc_client_command_unregister(SilcClient client, +SilcBool silc_client_command_unregister(SilcClient client, SilcCommand command, SilcCommandCb command_function, SilcCommandCb command_reply_function, diff --git a/lib/silcclient/command.h b/lib/silcclient/command.h index 3f5e58a3..ca9c584e 100644 --- a/lib/silcclient/command.h +++ b/lib/silcclient/command.h @@ -102,14 +102,14 @@ void silc_client_command_free(SilcClientCommandContext ctx); SilcClientCommandContext silc_client_command_dup(SilcClientCommandContext ctx); SilcClientCommand silc_client_command_find(SilcClient client, const char *name); -bool silc_client_command_register(SilcClient client, +SilcBool silc_client_command_register(SilcClient client, SilcCommand command, const char *name, SilcCommandCb command_function, SilcCommandCb command_reply_function, SilcUInt8 max_args, SilcUInt16 ident); -bool silc_client_command_unregister(SilcClient client, +SilcBool silc_client_command_unregister(SilcClient client, SilcCommand command, SilcCommandCb command_function, SilcCommandCb command_reply_function, diff --git a/lib/silcclient/command_reply.c b/lib/silcclient/command_reply.c index 5c64922e..3cf9a22b 100644 --- a/lib/silcclient/command_reply.c +++ b/lib/silcclient/command_reply.c @@ -163,7 +163,7 @@ void silc_client_command_reply_free(SilcClientCommandReplyContext cmd) void silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd, SilcStatus status, - bool notify) + SilcBool notify) { SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data; SilcClientID *client_id; @@ -174,7 +174,7 @@ silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd, char *realname = NULL; SilcUInt32 idle = 0, mode = 0; SilcBufferStruct channels, ch_user_modes; - bool has_channels = FALSE, has_user_modes = FALSE; + SilcBool has_channels = FALSE, has_user_modes = FALSE; unsigned char *fingerprint; SilcUInt32 fingerprint_len; @@ -371,7 +371,7 @@ SILC_CLIENT_CMD_REPLY_FUNC(whowas) static void silc_client_command_reply_identify_save(SilcClientCommandReplyContext cmd, SilcStatus status, - bool notify) + SilcBool notify) { SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data; SilcClient client = cmd->client; @@ -1737,8 +1737,8 @@ static void silc_client_command_reply_users_cb(SilcClient client, static int silc_client_command_reply_users_save(SilcClientCommandReplyContext cmd, SilcStatus status, - bool notify, - bool resolve, + SilcBool notify, + SilcBool resolve, SilcGetChannelCallback get_channel, SilcCommandCb get_clients) { @@ -1753,7 +1753,7 @@ silc_client_command_reply_users_save(SilcClientCommandReplyContext cmd, int i; unsigned char **res_argv = NULL; SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0; - bool wait_res = FALSE; + SilcBool wait_res = FALSE; SILC_LOG_DEBUG(("Start")); diff --git a/lib/silcclient/idlist.c b/lib/silcclient/idlist.c index 8862a266..c8ec5325 100644 --- a/lib/silcclient/idlist.c +++ b/lib/silcclient/idlist.c @@ -47,7 +47,7 @@ SilcClientEntry *silc_client_get_clients_local(SilcClient client, SilcIDCacheList list = NULL; SilcClientEntry entry, *clients; int i = 0; - bool found = FALSE; + SilcBool found = FALSE; char *nicknamec; assert(client && conn); @@ -388,7 +388,7 @@ SilcClientEntry silc_idlist_get_client(SilcClient client, SilcClientConnection conn, const char *nickname, const char *format, - bool query) + SilcBool query) { SilcIDCacheEntry id_cache; SilcIDCacheList list = NULL; @@ -487,7 +487,7 @@ SILC_CLIENT_CMD_FUNC(get_clients_list_callback) SilcBuffer client_id_list = i->client_id_list; SilcClientEntry *clients = NULL; SilcUInt32 clients_count = 0; - bool found = FALSE; + SilcBool found = FALSE; int c; SILC_LOG_DEBUG(("Start")); @@ -561,7 +561,7 @@ void silc_client_get_clients_by_list(SilcClient client, unsigned char **res_argv = NULL; SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0; GetClientsByListInternal in; - bool wait_res = FALSE; + SilcBool wait_res = FALSE; assert(client && conn && client_id_list); @@ -579,7 +579,7 @@ void silc_client_get_clients_by_list(SilcClient client, SilcUInt16 idp_len; SilcClientID *client_id; SilcClientEntry entry; - bool ret; + SilcBool ret; /* Get Client ID */ SILC_GET16_MSB(idp_len, client_id_list->data + 2); @@ -695,7 +695,7 @@ SILC_CLIENT_CMD_FUNC(get_clients_by_channel_cb) GetClientsByChannelInternal i = context; SilcClientEntry *clients = NULL; SilcUInt32 clients_count = 0; - bool found = FALSE; + SilcBool found = FALSE; SilcChannelEntry channel; SilcHashTableList htl; SilcChannelUser chu; @@ -743,7 +743,7 @@ void silc_client_get_clients_by_channel(SilcClient client, unsigned char **res_argv = NULL; SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0; SilcBuffer idp; - bool wait_res = FALSE; + SilcBool wait_res = FALSE; assert(client && conn && channel); @@ -1100,10 +1100,10 @@ void silc_client_del_client_entry(SilcClient client, /* Removes client from the cache by the client entry. */ -bool silc_client_del_client(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_client(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry) { - bool ret = silc_idcache_del_by_context(conn->internal->client_cache, + SilcBool ret = silc_idcache_del_by_context(conn->internal->client_cache, client_entry); if (ret) { @@ -1178,10 +1178,10 @@ static void silc_client_del_channel_foreach(void *key, void *context, /* Removes channel from the cache by the channel entry. */ -bool silc_client_del_channel(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_channel(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel) { - bool ret = silc_idcache_del_by_context(conn->internal->channel_cache, + SilcBool ret = silc_idcache_del_by_context(conn->internal->channel_cache, channel); SILC_LOG_DEBUG(("Start")); @@ -1226,7 +1226,7 @@ bool silc_client_del_channel(SilcClient client, SilcClientConnection conn, /* Replaces the channel ID of the `channel' to `new_id'. Returns FALSE if the ID could not be changed. */ -bool silc_client_replace_channel_id(SilcClient client, +SilcBool silc_client_replace_channel_id(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel, SilcChannelID *new_id) @@ -1557,10 +1557,10 @@ SilcServerEntry silc_client_add_server(SilcClient client, /* Removes server from the cache by the server entry. */ -bool silc_client_del_server(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_server(SilcClient client, SilcClientConnection conn, SilcServerEntry server) { - bool ret = silc_idcache_del_by_context(conn->internal->server_cache, server); + SilcBool ret = silc_idcache_del_by_context(conn->internal->server_cache, server); silc_free(server->server_name); silc_free(server->server_info); silc_free(server->server_id); @@ -1621,7 +1621,7 @@ void silc_client_nickname_format(SilcClient client, char *cp; char *newnick = NULL; int i, off = 0, len; - bool freebase; + SilcBool freebase; SilcClientEntry *clients; SilcUInt32 clients_count = 0; SilcClientEntry unformatted = NULL; diff --git a/lib/silcclient/idlist.h b/lib/silcclient/idlist.h index 4e9d1c87..7338486d 100644 --- a/lib/silcclient/idlist.h +++ b/lib/silcclient/idlist.h @@ -41,7 +41,7 @@ SilcClientEntry silc_idlist_get_client(SilcClient client, SilcClientConnection conn, const char *nickname, const char *format, - bool query); + SilcBool query); SilcChannelEntry silc_client_add_channel(SilcClient client, SilcClientConnection conn, const char *channel_name, @@ -57,7 +57,7 @@ void silc_client_update_server(SilcClient client, SilcServerEntry server_entry, const char *server_name, const char *server_info); -bool silc_client_replace_channel_id(SilcClient client, +SilcBool silc_client_replace_channel_id(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel, SilcChannelID *new_id); diff --git a/lib/silcclient/protocol.c b/lib/silcclient/protocol.c index 9d9918a0..21d730e9 100644 --- a/lib/silcclient/protocol.c +++ b/lib/silcclient/protocol.c @@ -55,7 +55,7 @@ typedef struct { void *completion_context; } *VerifyKeyContext; -static void silc_client_verify_key_cb(bool success, void *context) +static void silc_client_verify_key_cb(SilcBool success, void *context) { VerifyKeyContext verify = (VerifyKeyContext)context; @@ -110,7 +110,7 @@ void silc_client_protocol_ke_set_keys(SilcSKE ske, SilcHash hash, SilcHmac hmac, SilcSKEDiffieHellmanGroup group, - bool is_responder) + SilcBool is_responder) { SilcClientConnection conn = (SilcClientConnection)sock->user_data; const char *cname = silc_cipher_get_name(cipher); @@ -768,7 +768,7 @@ silc_client_protocol_rekey_validate(SilcClient client, SilcClientRekeyInternalContext *ctx, SilcSocketConnection sock, SilcSKEKeyMaterial *keymat, - bool send) + SilcBool send) { SilcClientConnection conn = (SilcClientConnection)sock->user_data; @@ -819,7 +819,7 @@ silc_client_protocol_rekey_validate(SilcClient client, static void silc_client_protocol_rekey_generate(SilcClient client, SilcClientRekeyInternalContext *ctx, - bool send) + SilcBool send) { SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data; SilcSKEKeyMaterial *keymat; @@ -848,7 +848,7 @@ silc_client_protocol_rekey_generate(SilcClient client, static void silc_client_protocol_rekey_generate_pfs(SilcClient client, SilcClientRekeyInternalContext *ctx, - bool send) + SilcBool send) { SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data; SilcSKEKeyMaterial *keymat; diff --git a/lib/silcclient/protocol.h b/lib/silcclient/protocol.h index 019fa37a..246a3cd8 100644 --- a/lib/silcclient/protocol.h +++ b/lib/silcclient/protocol.h @@ -78,8 +78,8 @@ typedef struct { void *client; void *context; SilcSocketConnection sock; - bool responder; /* TRUE if we are receiving party */ - bool pfs; /* TRUE if PFS is to be used */ + SilcBool responder; /* TRUE if we are receiving party */ + SilcBool pfs; /* TRUE if PFS is to be used */ SilcSKE ske; /* Defined if PFS is used */ SilcPacketContext *packet; } SilcClientRekeyInternalContext; @@ -106,6 +106,6 @@ void silc_client_protocol_ke_set_keys(SilcSKE ske, SilcHash hash, SilcHmac hmac, SilcSKEDiffieHellmanGroup group, - bool is_responder); + SilcBool is_responder); #endif diff --git a/lib/silcclient/silcclient.h b/lib/silcclient/silcclient.h index 27698fae..260fe70b 100644 --- a/lib/silcclient/silcclient.h +++ b/lib/silcclient/silcclient.h @@ -2031,7 +2031,7 @@ silc_client_list_private_message_keys(SilcClient client, * argument MUST be set to FALSE when setting the key. * ***/ -bool +SilcBool silc_client_send_private_message_key_request(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry); -- 2.24.0