From c27a4ecc3e616e8a5ee09b8ca888ed6ff3e501f7 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 26 Nov 2005 15:44:49 +0000 Subject: [PATCH] bool -> SilcBool. --- lib/silcclient/silcclient.h | 104 +++++++++++------------ lib/silcmath/mp_tma.c | 2 +- lib/silcmath/silcmath.h | 8 +- lib/silcmath/silcmp.h | 4 +- lib/silcmath/silcprimegen.c | 8 +- lib/silcske/silcske.c | 2 +- lib/silcske/silcske.h | 6 +- lib/silcutil/beos/silcbeosmutex.c | 2 +- lib/silcutil/beos/silcbeossockconn.c | 2 +- lib/silcutil/beos/silcbeosthread.c | 6 +- lib/silcutil/os2/silcos2mutex.c | 2 +- lib/silcutil/os2/silcos2net.c | 4 +- lib/silcutil/os2/silcos2sockconn.c | 2 +- lib/silcutil/os2/silcos2thread.c | 6 +- lib/silcutil/silcapputil.c | 14 +-- lib/silcutil/silcapputil.h | 20 ++--- lib/silcutil/silcasync.c | 6 +- lib/silcutil/silcasync.h | 20 ++--- lib/silcutil/silcconfig.c | 18 ++-- lib/silcutil/silcconfig.h | 8 +- lib/silcutil/silcfdstream.c | 4 +- lib/silcutil/silcfdstream.h | 4 +- lib/silcutil/silcfsm.c | 10 +-- lib/silcutil/silcfsm.h | 16 ++-- lib/silcutil/silcfsm_i.h | 6 +- lib/silcutil/silchashtable.c | 32 +++---- lib/silcutil/silchashtable.h | 44 +++++----- lib/silcutil/silclog.c | 10 +-- lib/silcutil/silclog.h | 32 +++---- lib/silcutil/silcmime.c | 6 +- lib/silcutil/silcmime.h | 12 +-- lib/silcutil/silcmutex.h | 4 +- lib/silcutil/silcnet.c | 18 ++-- lib/silcutil/silcnet.h | 44 +++++----- lib/silcutil/silcschedule.c | 12 +-- lib/silcutil/silcschedule.h | 12 +-- lib/silcutil/silcsocketstream.c | 12 +-- lib/silcutil/silcsocketstream.h | 16 ++-- lib/silcutil/silcstack.c | 4 +- lib/silcutil/silcstack_i.h | 4 +- lib/silcutil/silcstream.c | 2 +- lib/silcutil/silcstream.h | 6 +- lib/silcutil/silcstrutil.c | 6 +- lib/silcutil/silcstrutil.h | 12 +-- lib/silcutil/silcthread.h | 8 +- lib/silcutil/silctime.c | 12 +-- lib/silcutil/silctime.h | 20 ++--- lib/silcutil/silctypes.h | 4 +- lib/silcutil/silcutf8.c | 8 +- lib/silcutil/silcutf8.h | 12 +-- lib/silcutil/silcutil.c | 28 +++--- lib/silcutil/silcutil.h | 56 ++++++------ lib/silcutil/silcvcard.c | 4 +- lib/silcutil/silcvcard.h | 6 +- lib/silcutil/stacktrace.c | 4 +- lib/silcutil/tests/test_silcasync.c | 4 +- lib/silcutil/tests/test_silcfsm.c | 6 +- lib/silcutil/tests/test_silchashtable.c | 26 +++--- lib/silcutil/tests/test_silclist.c | 2 +- lib/silcutil/tests/test_silcmime.c | 43 ++++------ lib/silcutil/tests/test_silcnet.c | 4 +- lib/silcutil/tests/test_silcschedule.c | 2 +- lib/silcutil/tests/test_silcstack.c | 2 +- lib/silcutil/tests/test_silcstringprep.c | 2 +- lib/silcutil/tests/test_silcstrutil.c | 2 +- lib/silcutil/unix/silcunixmutex.c | 2 +- lib/silcutil/unix/silcunixnet.c | 8 +- lib/silcutil/unix/silcunixschedule.c | 2 +- lib/silcutil/unix/silcunixsocketstream.c | 2 +- lib/silcutil/unix/silcunixthread.c | 4 +- lib/silcutil/win32/silcwin32mutex.c | 2 +- lib/silcutil/win32/silcwin32net.c | 4 +- lib/silcutil/win32/silcwin32sockconn.c | 2 +- lib/silcutil/win32/silcwin32thread.c | 6 +- 74 files changed, 425 insertions(+), 434 deletions(-) diff --git a/lib/silcclient/silcclient.h b/lib/silcclient/silcclient.h index d68d6a6f..27698fae 100644 --- a/lib/silcclient/silcclient.h +++ b/lib/silcclient/silcclient.h @@ -465,7 +465,7 @@ typedef void (*SilcAskPassphrase)(unsigned char *passphrase, * * SYNOPSIS * - * typedef void (*SilcVerifyPublicKey)(bool success, void *context); + * typedef void (*SilcVerifyPublicKey)(SilcBool success, void *context); * * DESCRIPTION * @@ -474,13 +474,13 @@ typedef void (*SilcAskPassphrase)(unsigned char *passphrase, * either success or failure. * ***/ -typedef void (*SilcVerifyPublicKey)(bool success, void *context); +typedef void (*SilcVerifyPublicKey)(SilcBool success, void *context); /****f* silcclient/SilcClientAPI/SilcGetAuthMeth * * SYNOPSIS * - * typedef void (*SilcGetAuthMeth)(bool success, + * typedef void (*SilcGetAuthMeth)(SilcBool success, * SilcProtocolAuthMeth auth_meth, * const unsigned char *auth_data, * SilcUInt32 auth_data_len, void *context); @@ -497,7 +497,7 @@ typedef void (*SilcVerifyPublicKey)(bool success, void *context); * context sent to the get_auth_method client operation. * ***/ -typedef void (*SilcGetAuthMeth)(bool success, +typedef void (*SilcGetAuthMeth)(SilcBool success, SilcProtocolAuthMeth auth_meth, const unsigned char *auth_data, SilcUInt32 auth_data_len, void *context); @@ -618,7 +618,7 @@ typedef struct { after application has called the command. Just to tell application that the command really was processed. */ void (*command)(SilcClient client, SilcClientConnection conn, - SilcClientCommandContext cmd_context, bool success, + SilcClientCommandContext cmd_context, SilcBool success, SilcCommand command, SilcStatus status); /* Command reply handler. This function is called always in the command reply @@ -644,7 +644,7 @@ typedef struct { ID. For example, if Client ID is receives application receives SilcClientEntry. */ void (*command_reply)(SilcClient client, SilcClientConnection conn, - SilcCommandPayload cmd_payload, bool success, + SilcCommandPayload cmd_payload, SilcBool success, SilcCommand command, SilcStatus status, ...); /* Called to indicate that connection was either successfully established @@ -708,7 +708,7 @@ typedef struct { desired (application may start it later by calling the function silc_client_perform_key_agreement). If TRUE is returned also the `completion' and `context' arguments must be set by the application. */ - bool (*key_agreement)(SilcClient client, SilcClientConnection conn, + SilcBool (*key_agreement)(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry, const char *hostname, SilcUInt16 port, SilcKeyAgreementCallback *completion, void **context); @@ -833,7 +833,7 @@ typedef struct { is employed only if the library will receive a nickname that is already saved in the cache. It is recommended to leave this to FALSE value. */ - bool nickname_force_format; + SilcBool nickname_force_format; /* A callback function provided by the application for the library to parse the nickname from the formatted nickname string. Even though @@ -851,12 +851,12 @@ typedef struct { If your application does not support Requested Attributes or you do not want to use them set this to TRUE. See SilcAttribute and silc_client_attribute_add for more information on attributes. */ - bool ignore_requested_attributes; + SilcBool ignore_requested_attributes; /* If this is set to TRUE, the silcclient library will not register and deregister the cipher, pkcs, hash and hmac algorithms. The application itself will need to handle that. */ - bool dont_register_crypto_library; + SilcBool dont_register_crypto_library; } SilcClientParams; /***/ @@ -908,7 +908,7 @@ void silc_client_free(SilcClient client); * * SYNOPSIS * - * bool silc_client_init(SilcClient client); + * SilcBool silc_client_init(SilcClient client); * * DESCRIPTION * @@ -917,7 +917,7 @@ void silc_client_free(SilcClient client); * client. Returns FALSE if error occurred, TRUE otherwise. * ***/ -bool silc_client_init(SilcClient client); +SilcBool silc_client_init(SilcClient client); /****f* silcclient/SilcClientAPI/silc_client_run * @@ -1165,14 +1165,14 @@ void silc_client_close_connection(SilcClient client, * * SYNOPSIS * - * 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); * * DESCRIPTION * @@ -1197,26 +1197,26 @@ void silc_client_close_connection(SilcClient client, * blocked). * ***/ -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); /****f* silcclient/SilcClientAPI/silc_client_send_private_message * * SYNOPSIS * - * 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); * * DESCRIPTION * @@ -1234,13 +1234,13 @@ bool silc_client_send_channel_message(SilcClient client, * Returns TRUE if the message was sent, and FALSE if error occurred. * ***/ -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); /* Client and Channel entry retrieval (idlist.c) */ @@ -1518,7 +1518,7 @@ void silc_client_get_client_by_id_resolve(SilcClient client, * * SYNOPSIS * - * bool silc_client_del_client(SilcClient client, SilcClientConnection conn, + * SilcBool silc_client_del_client(SilcClient client, SilcClientConnection conn, * SilcClientEntry client_entry) * * DESCRIPTION @@ -1527,7 +1527,7 @@ void silc_client_get_client_by_id_resolve(SilcClient client, * the `client_entry'. Returns TRUE if the deletion were successful. * ***/ -bool silc_client_del_client(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_client(SilcClient client, SilcClientConnection conn, SilcClientEntry client_entry); /****f* silcclient/SilcClientAPI/SilcGetChannelCallback @@ -1651,7 +1651,7 @@ void silc_client_get_channel_by_id_resolve(SilcClient client, * * SYNOPSIS * - * bool silc_client_del_channel(SilcClient client, + * SilcBool silc_client_del_channel(SilcClient client, * SilcClientConnection conn, * SilcChannelEntry channel) * @@ -1661,7 +1661,7 @@ void silc_client_get_channel_by_id_resolve(SilcClient client, * the `channel'. Returns TRUE if the deletion were successful. * ***/ -bool silc_client_del_channel(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_channel(SilcClient client, SilcClientConnection conn, SilcChannelEntry channel); /****f* silcclient/SilcClientAPI/silc_client_get_server @@ -1704,7 +1704,7 @@ SilcServerEntry silc_client_get_server_by_id(SilcClient client, * * SYNOPSIS * - * bool silc_client_del_server(SilcClient client, SilcClientConnection conn, + * SilcBool silc_client_del_server(SilcClient client, SilcClientConnection conn, * SilcServerEntry server); * * DESCRIPTION @@ -1713,7 +1713,7 @@ SilcServerEntry silc_client_get_server_by_id(SilcClient client, * the `server'. Returns TRUE if the deletion were successful. * ***/ -bool silc_client_del_server(SilcClient client, SilcClientConnection conn, +SilcBool silc_client_del_server(SilcClient client, SilcClientConnection conn, SilcServerEntry server); /****f* silcclient/SilcClientAPI/silc_client_on_channel @@ -1739,7 +1739,7 @@ SilcChannelUser silc_client_on_channel(SilcChannelEntry channel, * * SYNOPSIS * - * bool silc_client_command_call(SilcClient client, + * SilcBool silc_client_command_call(SilcClient client, * SilcClientConnection conn, * const char *command_line, ...); * @@ -1781,7 +1781,7 @@ SilcChannelUser silc_client_on_channel(SilcChannelEntry channel, * function instead. * ***/ -bool silc_client_command_call(SilcClient client, +SilcBool silc_client_command_call(SilcClient client, SilcClientConnection conn, const char *command_line, ...); @@ -1885,15 +1885,15 @@ void silc_client_command_pending(SilcClientConnection conn, * * SYNOPSIS * - * 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); * * DESCRIPTION * @@ -1919,21 +1919,21 @@ void silc_client_command_pending(SilcClientConnection conn, * 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); /****f* silcclient/SilcClientAPI/silc_client_add_private_message_key_ske * * SYNOPSIS * - * bool + * SilcBool * silc_client_add_private_message_key_ske(SilcClient client, * SilcClientConnection conn, * SilcClientEntry client_entry, @@ -1950,19 +1950,19 @@ bool silc_client_add_private_message_key(SilcClient client, * 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); /****f* silcclient/SilcClientAPI/silc_client_del_private_message_key * * SYNOPSIS * - * bool silc_client_del_private_message_key(SilcClient client, + * SilcBool silc_client_del_private_message_key(SilcClient client, * SilcClientConnection conn, * SilcClientEntry client_entry); * @@ -1973,7 +1973,7 @@ bool silc_client_add_private_message_key_ske(SilcClient client, * 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); @@ -2006,7 +2006,7 @@ silc_client_list_private_message_keys(SilcClient client, * * SYNOPSIS * - * bool + * SilcBool * silc_client_send_private_message_key_request(SilcClient client, * SilcClientConnection conn, * SilcClientEntry client_entry); @@ -2060,7 +2060,7 @@ void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys, * * SYNOPSIS * - * 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, @@ -2105,7 +2105,7 @@ void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys, * 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, @@ -2119,7 +2119,7 @@ bool silc_client_add_channel_private_key(SilcClient client, * * SYNOPSIS * - * bool silc_client_del_channel_private_keys(SilcClient client, + * SilcBool silc_client_del_channel_private_keys(SilcClient client, * SilcClientConnection conn, * SilcChannelEntry channel); * @@ -2130,7 +2130,7 @@ bool silc_client_add_channel_private_key(SilcClient client, * 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); @@ -2138,7 +2138,7 @@ bool silc_client_del_channel_private_keys(SilcClient client, * * SYNOPSIS * - * bool silc_client_del_channel_private_key(SilcClient client, + * SilcBool silc_client_del_channel_private_key(SilcClient client, * SilcClientConnection conn, * SilcChannelEntry channel, * SilcChannelPrivateKey key); @@ -2153,7 +2153,7 @@ bool silc_client_del_channel_private_keys(SilcClient client, * 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); @@ -2608,7 +2608,7 @@ typedef void (*SilcClientFileAskName)(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); @@ -2647,7 +2647,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); @@ -2760,7 +2760,7 @@ SilcAttributePayload silc_client_attribute_add(SilcClient client, * * SYNOPSIS * - * bool silc_client_attribute_del(SilcClient client, + * SilcBool silc_client_attribute_del(SilcClient client, * SilcClientConnection conn, * SilcAttribute attribute, * SilcAttributePayload attr); @@ -2777,7 +2777,7 @@ SilcAttributePayload silc_client_attribute_add(SilcClient client, * This function Returns TRUE if the attribute was found and deleted. * ***/ -bool silc_client_attribute_del(SilcClient client, +SilcBool silc_client_attribute_del(SilcClient client, SilcClientConnection conn, SilcAttribute attribute, SilcAttributePayload attr); @@ -2838,7 +2838,7 @@ SilcBuffer silc_client_attributes_request(SilcAttribute attribute, ...); * * SYNOPSIS * - * bool silc_client_send_packet(SilcClient client, + * SilcBool silc_client_send_packet(SilcClient client, * SilcClientConnection conn, * SilcPacketType type, * const unsigned char *data, @@ -2854,7 +2854,7 @@ SilcBuffer silc_client_attributes_request(SilcAttribute attribute, ...); * be sent. * ***/ -bool silc_client_send_packet(SilcClient client, +SilcBool silc_client_send_packet(SilcClient client, SilcClientConnection conn, SilcPacketType type, const unsigned char *data, diff --git a/lib/silcmath/mp_tma.c b/lib/silcmath/mp_tma.c index 1cae1cd8..bcfa029b 100644 --- a/lib/silcmath/mp_tma.c +++ b/lib/silcmath/mp_tma.c @@ -26,7 +26,7 @@ void silc_mp_init(SilcMPInt *mp) (void)mp_init(mp); } -bool silc_mp_sinit(SilcStack stack, SilcMPInt *mp) +SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp) { /* XXX TODO */ mp_init(mp); diff --git a/lib/silcmath/silcmath.h b/lib/silcmath/silcmath.h index e1bb9945..b1b59d19 100644 --- a/lib/silcmath/silcmath.h +++ b/lib/silcmath/silcmath.h @@ -36,7 +36,7 @@ * * SYNOPSIS * - * int silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, + * int silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, SilcBool verbose, * SilcRng); * * DESCRIPTION @@ -52,8 +52,8 @@ * number number. * ***/ -bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, - SilcRng rng); +SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, + SilcBool verbose, SilcRng rng); /****f* silcmath/SilcMathAPI/silc_math_prime_test * @@ -67,6 +67,6 @@ bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, * number is probably a prime. * ***/ -bool silc_math_prime_test(SilcMPInt *p); +SilcBool silc_math_prime_test(SilcMPInt *p); #endif diff --git a/lib/silcmath/silcmp.h b/lib/silcmath/silcmp.h index 22ad1926..4b7bff9f 100644 --- a/lib/silcmath/silcmp.h +++ b/lib/silcmath/silcmp.h @@ -79,7 +79,7 @@ void silc_mp_init(SilcMPInt *mp); * * SYNOPSIS * - * bool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); + * SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); * * DESCRIPTION * @@ -97,7 +97,7 @@ void silc_mp_init(SilcMPInt *mp); * to for example enlarge `mp' will allocate the memory from `stack'. * ***/ -bool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); +SilcBool silc_mp_sinit(SilcStack stack, SilcMPInt *mp); /****f* silcmath/SilcMPAPI/silc_mp_uninit * diff --git a/lib/silcmath/silcprimegen.c b/lib/silcmath/silcprimegen.c index 80bbf54e..4fb83231 100644 --- a/lib/silcmath/silcprimegen.c +++ b/lib/silcmath/silcprimegen.c @@ -194,14 +194,14 @@ static SilcUInt32 primetable[] = If argument verbose is TRUE this will display some status information about the progress of generation. */ -bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, - SilcRng rng) +SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, + SilcBool verbose, SilcRng rng) { unsigned char *numbuf = NULL; SilcUInt32 i, b, k; SilcUInt32 *spmods; SilcMPInt r, base, tmp, tmp2, oprime; - bool valid = FALSE; + SilcBool valid = FALSE; silc_mp_init(&r); silc_mp_init(&base); @@ -321,7 +321,7 @@ bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, /* Performs primality testings for given number. Returns TRUE if the number is probably a prime. */ -bool silc_math_prime_test(SilcMPInt *p) +SilcBool silc_math_prime_test(SilcMPInt *p) { SilcMPInt r, base, tmp; int i, ret = 0; diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index 7c04aa1f..cb471370 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -2234,7 +2234,7 @@ const char *silc_ske_map_status(SilcSKEStatus status) /* Parses remote host's version string. */ -bool silc_ske_parse_version(SilcSKE ske, +SilcBool silc_ske_parse_version(SilcSKE ske, SilcUInt32 *protocol_version, char **protocol_version_string, SilcUInt32 *software_version, diff --git a/lib/silcske/silcske.h b/lib/silcske/silcske.h index 389b5532..e1c25b85 100644 --- a/lib/silcske/silcske.h +++ b/lib/silcske/silcske.h @@ -352,7 +352,7 @@ struct SilcSKEStruct { SilcSchedule schedule; SilcFSMStruct fsm; SilcAsyncOperationStruct op; - bool aborted; + SilcBool aborted; }; /***/ @@ -579,7 +579,7 @@ silc_ske_assemble_security_properties(SilcSKE ske, * * SYNOPSIS * - * bool silc_ske_parse_version(SilcSKE ske, + * SilcBool silc_ske_parse_version(SilcSKE ske, * SilcUInt32 *protocol_version, * char **protocol_version_string, * SilcUInt32 *software_version, @@ -596,7 +596,7 @@ silc_ske_assemble_security_properties(SilcSKE ske, * string was successfully parsed. * ***/ -bool silc_ske_parse_version(SilcSKE ske, +SilcBool silc_ske_parse_version(SilcSKE ske, SilcUInt32 *protocol_version, char **protocol_version_string, SilcUInt32 *software_version, diff --git a/lib/silcutil/beos/silcbeosmutex.c b/lib/silcutil/beos/silcbeosmutex.c index fc11e00d..6e825ea7 100644 --- a/lib/silcutil/beos/silcbeosmutex.c +++ b/lib/silcutil/beos/silcbeosmutex.c @@ -28,7 +28,7 @@ struct SilcMutexStruct { sem_id sema; }; -bool silc_mutex_alloc(SilcMutex *mutex) +SilcBool silc_mutex_alloc(SilcMutex *mutex) { int ret; diff --git a/lib/silcutil/beos/silcbeossockconn.c b/lib/silcutil/beos/silcbeossockconn.c index 0786f8b0..f3ad4cae 100644 --- a/lib/silcutil/beos/silcbeossockconn.c +++ b/lib/silcutil/beos/silcbeossockconn.c @@ -116,7 +116,7 @@ int silc_socket_read(SilcSocketConnection sock) /* Returns human readable socket error message */ -bool silc_socket_get_error(SilcSocketConnection sock, char *error, +SilcBool silc_socket_get_error(SilcSocketConnection sock, char *error, SilcUInt32 error_len) { char *err; diff --git a/lib/silcutil/beos/silcbeosthread.c b/lib/silcutil/beos/silcbeosthread.c index 48e7e7e9..909a3ac7 100644 --- a/lib/silcutil/beos/silcbeosthread.c +++ b/lib/silcutil/beos/silcbeosthread.c @@ -32,7 +32,7 @@ typedef struct { thread_id thread; SilcThreadStart start_func; void *context; - bool waitable; + SilcBool waitable; } *SilcBeosThread; /* Actual routine that is called by BeOS when the thread is created. @@ -47,7 +47,7 @@ static void *silc_thread_beos_start(void *context) #endif SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable) + SilcBool waitable) { #ifdef SILC_THREADS int ret; @@ -93,7 +93,7 @@ SilcThread silc_thread_self(void) #endif } -bool silc_thread_wait(SilcThread thread, void **exit_value) +SilcBool silc_thread_wait(SilcThread thread, void **exit_value) { #ifdef SILC_THREADS status_t ret, retval; diff --git a/lib/silcutil/os2/silcos2mutex.c b/lib/silcutil/os2/silcos2mutex.c index a7981453..ba5e36f0 100644 --- a/lib/silcutil/os2/silcos2mutex.c +++ b/lib/silcutil/os2/silcos2mutex.c @@ -28,7 +28,7 @@ struct SilcMutexStruct { HMTX mutex; }; -bool silc_mutex_alloc(SilcMutex *mutex) +SilcBool silc_mutex_alloc(SilcMutex *mutex) { char name[64]; diff --git a/lib/silcutil/os2/silcos2net.c b/lib/silcutil/os2/silcos2net.c index 855fb0f4..9ec496d1 100644 --- a/lib/silcutil/os2/silcos2net.c +++ b/lib/silcutil/os2/silcos2net.c @@ -38,7 +38,7 @@ typedef union { #endif } SilcSockaddr; -static bool silc_net_set_sockaddr(SilcSockaddr *addr, const char *ip_addr, +static SilcBool silc_net_set_sockaddr(SilcSockaddr *addr, const char *ip_addr, int port) { int len; @@ -290,7 +290,7 @@ int silc_net_set_socket_nonblock(int sock) /* Converts the IP number string from numbers-and-dots notation to binary form. */ -bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) +SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) { int ret = 0; diff --git a/lib/silcutil/os2/silcos2sockconn.c b/lib/silcutil/os2/silcos2sockconn.c index 24d939be..dccc2abc 100644 --- a/lib/silcutil/os2/silcos2sockconn.c +++ b/lib/silcutil/os2/silcos2sockconn.c @@ -114,7 +114,7 @@ int silc_socket_read(SilcSocketConnection sock) /* Returns human readable socket error message */ -bool silc_socket_get_error(SilcSocketConnection sock, char *error, +SilcBool silc_socket_get_error(SilcSocketConnection sock, char *error, SilcUInt32 error_len) { /* XXX TODO */ diff --git a/lib/silcutil/os2/silcos2thread.c b/lib/silcutil/os2/silcos2thread.c index c078807a..eb209367 100644 --- a/lib/silcutil/os2/silcos2thread.c +++ b/lib/silcutil/os2/silcos2thread.c @@ -32,7 +32,7 @@ typedef struct { unsigned long thread; SilcThreadStart start_func; void *context; - bool waitable; + SilcBool waitable; } *SilcOs2Thread; /* Actual routine that is called by OS/2 when the thread is created. @@ -48,7 +48,7 @@ static void silc_thread_os2_start(void *context) #endif SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable) + SilcBool waitable) { #ifdef SILC_THREADS int ret; @@ -95,7 +95,7 @@ SilcThread silc_thread_self(void) #endif } -bool silc_thread_wait(SilcThread thread, void **exit_value) +SilcBool silc_thread_wait(SilcThread thread, void **exit_value) { #ifdef SILC_THREADS diff --git a/lib/silcutil/silcapputil.c b/lib/silcutil/silcapputil.c index 415d591f..606f2215 100644 --- a/lib/silcutil/silcapputil.c +++ b/lib/silcutil/silcapputil.c @@ -54,7 +54,7 @@ static char *silc_create_pk_identifier(void) /* Generate key pair */ -bool silc_create_key_pair(const char *pkcs_name, +SilcBool silc_create_key_pair(const char *pkcs_name, SilcUInt32 key_len_bits, const char *pub_filename, const char *prv_filename, @@ -63,7 +63,7 @@ bool silc_create_key_pair(const char *pkcs_name, SilcPKCS *return_pkcs, SilcPublicKey *return_public_key, SilcPrivateKey *return_private_key, - bool interactive) + SilcBool interactive) { SilcPKCS pkcs; SilcPublicKey pub_key; @@ -182,7 +182,7 @@ New pair of keys will be created. Please, answer to following questions.\n\ pass = strdup(""); break; } else { - bool match; + SilcBool match; printf("\n"); pass2 = silc_get_input("Retype private key passphrase: ", TRUE); if (!pass2) @@ -251,7 +251,7 @@ New pair of keys will be created. Please, answer to following questions.\n\ /* Load key pair */ -bool silc_load_key_pair(const char *pub_filename, +SilcBool silc_load_key_pair(const char *pub_filename, const char *prv_filename, const char *passphrase, SilcPKCS *return_pkcs, @@ -302,7 +302,7 @@ bool silc_load_key_pair(const char *pub_filename, /* Dump public key into stdout */ -bool silc_show_public_key(const char *pub_filename) +SilcBool silc_show_public_key(const char *pub_filename) { SilcPublicKey public_key; SilcPublicKeyIdentifier ident; @@ -363,12 +363,12 @@ bool silc_show_public_key(const char *pub_filename) /* Change private key passphrase */ -bool silc_change_private_key_passphrase(const char *prv_filename, +SilcBool silc_change_private_key_passphrase(const char *prv_filename, const char *old_passphrase, const char *new_passphrase) { SilcPrivateKey private_key; - bool base64 = FALSE; + SilcBool base64 = FALSE; char *pass; pass = old_passphrase ? strdup(old_passphrase) : NULL; diff --git a/lib/silcutil/silcapputil.h b/lib/silcutil/silcapputil.h index 4114f566..8b903931 100644 --- a/lib/silcutil/silcapputil.h +++ b/lib/silcutil/silcapputil.h @@ -39,7 +39,7 @@ * * SYNOPSIS * - * bool silc_create_key_pair(const char *pkcs_name, + * SilcBool silc_create_key_pair(const char *pkcs_name, * SilcUInt32 key_len_bits, * const char *pub_filename, * const char *prv_filename, @@ -48,7 +48,7 @@ * SilcPKCS *return_pkcs, * SilcPublicKey *return_public_key, * SilcPrivateKey *return_private_key, - * bool interactive); + * SilcBool interactive); * * DESCRIPTION * @@ -84,7 +84,7 @@ * silc_pkcs_register_default function. * ***/ -bool silc_create_key_pair(const char *pkcs_name, +SilcBool silc_create_key_pair(const char *pkcs_name, SilcUInt32 key_len_bits, const char *pub_filename, const char *prv_filename, @@ -93,13 +93,13 @@ bool silc_create_key_pair(const char *pkcs_name, SilcPKCS *return_pkcs, SilcPublicKey *return_public_key, SilcPrivateKey *return_private_key, - bool interactive); + SilcBool interactive); /****f* silcutil/SilcAppUtil/silc_load_key_pair * * SYNOPSIS * - * bool silc_load_key_pair(const char *pub_filename, + * SilcBool silc_load_key_pair(const char *pub_filename, * const char *prv_filename, * const char *passphrase, * SilcPKCS *return_pkcs, @@ -118,7 +118,7 @@ bool silc_create_key_pair(const char *pkcs_name, * which will be used to decrypt the private key file. * ***/ -bool silc_load_key_pair(const char *pub_filename, +SilcBool silc_load_key_pair(const char *pub_filename, const char *prv_filename, const char *passphrase, SilcPKCS *return_pkcs, @@ -129,7 +129,7 @@ bool silc_load_key_pair(const char *pub_filename, * * SYNOPSIS * - * bool silc_show_public_key(const char *pub_filename); + * SilcBool silc_show_public_key(const char *pub_filename); * * DESCRIPTION * @@ -138,13 +138,13 @@ bool silc_load_key_pair(const char *pub_filename, * into human readable form into stdout. Returns FALSE on error. * ***/ -bool silc_show_public_key(const char *pub_filename); +SilcBool silc_show_public_key(const char *pub_filename); /****f* silcutil/SilcAppUtil/silc_change_private_key_passphrase * * SYNOPSIS * - * bool silc_change_private_key_passphrase(const char *prv_filename, + * SilcBool silc_change_private_key_passphrase(const char *prv_filename, * const char *old_passphrase, * const char *new_passphrase); * @@ -156,7 +156,7 @@ bool silc_show_public_key(const char *pub_filename); * prompt for them. * ***/ -bool silc_change_private_key_passphrase(const char *prv_filename, +SilcBool silc_change_private_key_passphrase(const char *prv_filename, const char *old_passphrase, const char *new_passphrase); diff --git a/lib/silcutil/silcasync.c b/lib/silcutil/silcasync.c index fc0e2194..d1552cae 100644 --- a/lib/silcutil/silcasync.c +++ b/lib/silcutil/silcasync.c @@ -21,7 +21,7 @@ /* Halts async operation */ -bool silc_async_halt(SilcAsyncOperation op) +SilcBool silc_async_halt(SilcAsyncOperation op) { SILC_LOG_DEBUG(("Halting async operation")); @@ -33,7 +33,7 @@ bool silc_async_halt(SilcAsyncOperation op) /* Resumes async operation */ -bool silc_async_resume(SilcAsyncOperation op) +SilcBool silc_async_resume(SilcAsyncOperation op) { SILC_LOG_DEBUG(("Resuming async operation")); @@ -82,7 +82,7 @@ SilcAsyncOperation silc_async_alloc(SilcAsyncOperationAbort abort_cb, /* Creates new async operation */ -bool silc_async_init(SilcAsyncOperation op, +SilcBool silc_async_init(SilcAsyncOperation op, SilcAsyncOperationAbort abort_cb, SilcAsyncOperationPause pause_cb, void *context) diff --git a/lib/silcutil/silcasync.h b/lib/silcutil/silcasync.h index b60c2b97..650419a8 100644 --- a/lib/silcutil/silcasync.h +++ b/lib/silcutil/silcasync.h @@ -100,8 +100,8 @@ typedef void (*SilcAsyncOperationAbort)(SilcAsyncOperation op, * * SYNOPSIS * - * typedef bool (*SilcAsyncOperationPause)(SilcAsyncOperation op, - * bool pause_operation, + * typedef SilcBool (*SilcAsyncOperationPause)(SilcAsyncOperation op, + * SilcBool pause_operation, * void *context); * * DESCRIPTION @@ -116,8 +116,8 @@ typedef void (*SilcAsyncOperationAbort)(SilcAsyncOperation op, * was (or is going to be) halted or resumed, and FALSE on error. * ***/ -typedef bool (*SilcAsyncOperationPause)(SilcAsyncOperation op, - bool pause_operation, +typedef SilcBool (*SilcAsyncOperationPause)(SilcAsyncOperation op, + SilcBool pause_operation, void *context); /* Upper layer functions for managing asynchronous operations. Layer @@ -128,7 +128,7 @@ typedef bool (*SilcAsyncOperationPause)(SilcAsyncOperation op, * * SYNOPSIS * - * bool silc_async_halt(SilcAsyncOperation op); + * SilcBool silc_async_halt(SilcAsyncOperation op); * * DESCRIPTION * @@ -141,13 +141,13 @@ typedef bool (*SilcAsyncOperationPause)(SilcAsyncOperation op, * controls the asynchronous operation. * ***/ -bool silc_async_halt(SilcAsyncOperation op); +SilcBool silc_async_halt(SilcAsyncOperation op); /****f* silcutil/SilcAsyncOperationAPI/silc_async_resume * * SYNOPSIS * - * bool silc_async_resume(SilcAsyncOperation op); + * SilcBool silc_async_resume(SilcAsyncOperation op); * * DESCRIPTION * @@ -159,7 +159,7 @@ bool silc_async_halt(SilcAsyncOperation op); * asynchronous operation. * ***/ -bool silc_async_resume(SilcAsyncOperation op); +SilcBool silc_async_resume(SilcAsyncOperation op); /****f* silcutil/SilcAsyncOperationAPI/silc_async_abort * @@ -239,7 +239,7 @@ SilcAsyncOperation silc_async_alloc(SilcAsyncOperationAbort abort_cb, * * SYNOPSIS * - * bool silc_async_init(SilcAsyncOperation op, + * SilcBool silc_async_init(SilcAsyncOperation op, * SilcAsyncOperationAbort abort_cb, * SilcAsyncOperationPause pause_cb, * void *context); @@ -259,7 +259,7 @@ SilcAsyncOperation silc_async_alloc(SilcAsyncOperationAbort abort_cb, * not provided then these functions has no effect for this operation. * ***/ -bool silc_async_init(SilcAsyncOperation op, +SilcBool silc_async_init(SilcAsyncOperation op, SilcAsyncOperationAbort abort_cb, SilcAsyncOperationPause pause_cb, void *context); diff --git a/lib/silcutil/silcconfig.c b/lib/silcutil/silcconfig.c index 032b361e..697aae14 100644 --- a/lib/silcutil/silcconfig.c +++ b/lib/silcutil/silcconfig.c @@ -47,7 +47,7 @@ struct SilcConfigFileObject { char *p; /* the Parser poitner */ SilcUInt32 len; /* fixed length of the whole file */ SilcUInt32 line; /* current parsing line, strictly linked to p */ - bool included; /* wether this file is main or included */ + SilcBool included; /* wether this file is main or included */ }; /* We need the entity to base our block-style parsing on */ @@ -177,7 +177,7 @@ static void *silc_config_marshall(SilcConfigType type, const char *val) { void *pt; int val_int; - bool val_bool; + SilcBool val_boolean; char *val_tmp; SilcUInt32 val_size; @@ -185,16 +185,16 @@ static void *silc_config_marshall(SilcConfigType type, const char *val) case SILC_CONFIG_ARG_TOGGLE: if (!strcasecmp(val, "yes") || !strcasecmp(val, "true") || !strcasecmp(val, "on") || !strcasecmp(val, "1")) { - val_bool = TRUE; + val_boolean = TRUE; } else if (!strcasecmp(val, "no") || !strcasecmp(val, "false") || !strcasecmp(val, "off") || !strcasecmp(val, "0")) { - val_bool = FALSE; + val_boolean = FALSE; } else return NULL; - pt = silc_calloc(1, sizeof(val_bool)); - *(bool *)pt = (bool) val_bool; + pt = silc_calloc(1, sizeof(val_boolean)); + *(SilcBool *)pt = (SilcBool) val_boolean; return pt; case SILC_CONFIG_ARG_INT: val_int = (int) strtol(val, &val_tmp, 0); @@ -354,7 +354,7 @@ char *silc_config_read_current_line(SilcConfigFile *file) /* (Private) destroy a SilcConfigEntity */ -static void silc_config_destroy(SilcConfigEntity ent, bool destroy_opts) +static void silc_config_destroy(SilcConfigEntity ent, SilcBool destroy_opts) { SilcConfigOption *oldopt, *nextopt; SILC_CONFIG_DEBUG(("Freeing config entity [ent=0x%x] [opts=0x%x]", @@ -380,7 +380,7 @@ static void silc_config_destroy(SilcConfigEntity ent, bool destroy_opts) /* Registers a new option in the specified entity. * Returns TRUE on success, FALSE if already registered. */ -bool silc_config_register(SilcConfigEntity ent, const char *name, +SilcBool silc_config_register(SilcConfigEntity ent, const char *name, SilcConfigType type, SilcConfigCallback cb, const SilcConfigTable *subtable, void *context) { @@ -424,7 +424,7 @@ bool silc_config_register(SilcConfigEntity ent, const char *name, /* Register a new option table in the specified config entity */ -bool silc_config_register_table(SilcConfigEntity ent, +SilcBool silc_config_register_table(SilcConfigEntity ent, const SilcConfigTable table[], void *context) { int i; diff --git a/lib/silcutil/silcconfig.h b/lib/silcutil/silcconfig.h index 59deac80..c58bd28a 100644 --- a/lib/silcutil/silcconfig.h +++ b/lib/silcutil/silcconfig.h @@ -386,7 +386,7 @@ char *silc_config_read_current_line(SilcConfigFile *file); * * SYNOPSIS * - * bool silc_config_register(SilcConfigEntity ent, const char *name, + * SilcBool silc_config_register(SilcConfigEntity ent, const char *name, * SilcConfigType type, SilcConfigCallback cb, * const SilcConfigTable *subtable, * void *context); @@ -409,7 +409,7 @@ char *silc_config_read_current_line(SilcConfigFile *file); * silc_config_register_table * ***/ -bool silc_config_register(SilcConfigEntity ent, const char *name, +SilcBool silc_config_register(SilcConfigEntity ent, const char *name, SilcConfigType type, SilcConfigCallback cb, const SilcConfigTable *subtable, void *context); @@ -417,7 +417,7 @@ bool silc_config_register(SilcConfigEntity ent, const char *name, * * SYNOPSIS * - * bool silc_config_register_table(SilcConfigEntity ent, + * SilcBool silc_config_register_table(SilcConfigEntity ent, * const SilcConfigTable table[], * void *context); * @@ -439,7 +439,7 @@ bool silc_config_register(SilcConfigEntity ent, const char *name, * SilcConfigTable * ***/ -bool silc_config_register_table(SilcConfigEntity ent, +SilcBool silc_config_register_table(SilcConfigEntity ent, const SilcConfigTable table[], void *context); /****f* silcutil/SilcConfigAPI/silc_config_main diff --git a/lib/silcutil/silcfdstream.c b/lib/silcutil/silcfdstream.c index 258b82d5..d1fc6b53 100644 --- a/lib/silcutil/silcfdstream.c +++ b/lib/silcutil/silcfdstream.c @@ -105,7 +105,7 @@ SilcStream silc_fd_stream_create2(int read_fd, int write_fd, /* Return fds */ -bool silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd) +SilcBool silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd) { SilcFDStream fd_stream = stream; @@ -208,7 +208,7 @@ int silc_fd_stream_write(SilcStream stream, const unsigned char *data, /* Close stream */ -bool silc_fd_stream_close(SilcStream stream) +SilcBool silc_fd_stream_close(SilcStream stream) { SilcFDStream fd_stream = stream; diff --git a/lib/silcutil/silcfdstream.h b/lib/silcutil/silcfdstream.h index b83377bf..3acb8cec 100644 --- a/lib/silcutil/silcfdstream.h +++ b/lib/silcutil/silcfdstream.h @@ -68,7 +68,7 @@ SilcStream silc_fd_stream_create2(int read_fd, int write_fd, * * SYNOPSIS * - * bool + * SilcBool * silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd); * * DESCRIPTION @@ -78,7 +78,7 @@ SilcStream silc_fd_stream_create2(int read_fd, int write_fd, * function. * ***/ -bool silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd); +SilcBool silc_fd_stream_get_info(SilcStream stream, int *read_fd, int *write_fd); /****f* silcutil/SilcFDStreamAPI/silc_fd_stream_get_error * diff --git a/lib/silcutil/silcfsm.c b/lib/silcutil/silcfsm.c index 0097ac51..4d09205d 100644 --- a/lib/silcutil/silcfsm.c +++ b/lib/silcutil/silcfsm.c @@ -49,7 +49,7 @@ SilcFSM silc_fsm_alloc(void *fsm_context, /* Initialize FSM */ -bool silc_fsm_init(SilcFSM fsm, +SilcBool silc_fsm_init(SilcFSM fsm, void *fsm_context, SilcFSMDestructor destructor, void *destructor_context, @@ -76,7 +76,7 @@ SilcFSMThread silc_fsm_thread_alloc(SilcFSM fsm, void *thread_context, SilcFSMThreadDestructor destructor, void *destructor_context, - bool real_thread) + SilcBool real_thread) { SilcFSMThread thread; @@ -95,12 +95,12 @@ SilcFSMThread silc_fsm_thread_alloc(SilcFSM fsm, /* Initialize FSM thread. Internally machine and thread use same context. */ -bool silc_fsm_thread_init(SilcFSMThread thread, +SilcBool silc_fsm_thread_init(SilcFSMThread thread, SilcFSM fsm, void *thread_context, SilcFSMThreadDestructor destructor, void *destructor_context, - bool real_thread) + SilcBool real_thread) { SILC_LOG_DEBUG(("Initializing new thread %p (%s)", thread, real_thread ? "real" : "FSM")); @@ -321,7 +321,7 @@ void silc_fsm_set_context(void *fsm, void *fsm_context) /* Wait for thread to terminate */ -bool silc_fsm_thread_wait(void *fsm, void *thread) +SilcBool silc_fsm_thread_wait(void *fsm, void *thread) { SilcFSM t = thread; #if defined(SILC_DEBUG) diff --git a/lib/silcutil/silcfsm.h b/lib/silcutil/silcfsm.h index 20f8e6a7..eca74409 100644 --- a/lib/silcutil/silcfsm.h +++ b/lib/silcutil/silcfsm.h @@ -370,7 +370,7 @@ SilcFSM silc_fsm_alloc(void *fsm_context, * * SYNOPSIS * - * bool silc_fsm_init(SilcFSM fsm, + * SilcBool silc_fsm_init(SilcFSM fsm, * void *fsm_context, * SilcFSMDestructor destructor, * void *destructor_context, @@ -393,7 +393,7 @@ SilcFSM silc_fsm_alloc(void *fsm_context, * silc_fsm_start(&fsm, first_state); * ***/ -bool silc_fsm_init(SilcFSM fsm, +SilcBool silc_fsm_init(SilcFSM fsm, void *fsm_context, SilcFSMDestructor destructor, void *destructor_context, @@ -407,7 +407,7 @@ bool silc_fsm_init(SilcFSM fsm, * void *thread_context, * SilcFSMThreadDestructor destructor, * void *destructor_context, - * bool real_thread); + * SilcBool real_thread); * * DESCRIPTION * @@ -468,18 +468,18 @@ SilcFSMThread silc_fsm_thread_alloc(SilcFSM fsm, void *thread_context, SilcFSMThreadDestructor destructor, void *destructor_context, - bool real_thread); + SilcBool real_thread); /****f* silcutil/SilcFSMAPI/silc_fsm_thread_init * * SYNOPSIS * - * bool silc_fsm_thread_init(SilcFSMThread thread, + * SilcBool silc_fsm_thread_init(SilcFSMThread thread, * SilcFSM fsm, * void *thread_context, * SilcFSMThreadDestructor destructor, * void *destructor_context, - * bool real_thread); + * SilcBool real_thread); * * DESCRIPTION * @@ -503,12 +503,12 @@ SilcFSMThread silc_fsm_thread_alloc(SilcFSM fsm, * silc_fsm_start(&thread, first_state); * ***/ -bool silc_fsm_thread_init(SilcFSMThread thread, +SilcBool silc_fsm_thread_init(SilcFSMThread thread, SilcFSM fsm, void *thread_context, SilcFSMThreadDestructor destructor, void *destructor_context, - bool real_thread); + SilcBool real_thread); /****f* silcutil/SilcFSMAPI/silc_fsm_free * diff --git a/lib/silcutil/silcfsm_i.h b/lib/silcutil/silcfsm_i.h index 4c27acb8..455d8b99 100644 --- a/lib/silcutil/silcfsm_i.h +++ b/lib/silcutil/silcfsm_i.h @@ -66,9 +66,9 @@ struct SilcFSMObject { /* Used internally by the SILC_FSM_CALL macros to detect whether async call is really async or not. */ static inline -bool silc_fsm_set_call(struct SilcFSMObject *fsm, bool async_call) +SilcBool silc_fsm_set_call(struct SilcFSMObject *fsm, SilcBool async_call) { - bool old = fsm->async_call; + SilcBool old = fsm->async_call; fsm->async_call = async_call; return old; } @@ -78,7 +78,7 @@ void silc_fsm_continue(void *fsm); void silc_fsm_continue_sync(void *fsm); /* Wait for thread to terminate */ -bool silc_fsm_thread_wait(void *fsm, void *thread); +SilcBool silc_fsm_thread_wait(void *fsm, void *thread); /* Semaphores */ SilcUInt32 silc_fsm_sema_wait(SilcFSMSema sema, void *fsm); diff --git a/lib/silcutil/silchashtable.c b/lib/silcutil/silchashtable.c index 192204a4..03b1ac79 100644 --- a/lib/silcutil/silchashtable.c +++ b/lib/silcutil/silchashtable.c @@ -216,7 +216,7 @@ silc_hash_table_find_internal_all(SilcHashTable ht, void *key, void *foreach_user_context) { SilcHashTableEntry e, tmp; - bool auto_rehash, found = FALSE; + SilcBool auto_rehash, found = FALSE; SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context); SILC_HT_DEBUG(("index %d key %p", i, key)); @@ -256,7 +256,7 @@ silc_hash_table_find_internal_all(SilcHashTable ht, void *key, /* Internal routine to add new key to the hash table */ -static inline bool +static inline SilcBool silc_hash_table_add_internal(SilcHashTable ht, void *key, void *context, SilcHashFunction hash, void *hash_user_context) @@ -306,7 +306,7 @@ silc_hash_table_add_internal(SilcHashTable ht, void *key, void *context, /* Internal routine to replace old key with new one (if it exists) */ -static inline bool +static inline SilcBool silc_hash_table_replace_internal(SilcHashTable ht, void *key, void *context, SilcHashFunction hash, void *hash_user_context) @@ -355,7 +355,7 @@ SilcHashTable silc_hash_table_alloc(SilcUInt32 table_size, void *compare_user_context, SilcHashDestructor destructor, void *destructor_user_context, - bool auto_rehash) + SilcBool auto_rehash) { SilcHashTable ht; SilcUInt32 size_index = SILC_HASH_TABLE_SIZE; @@ -468,7 +468,7 @@ void silc_hash_table_replace_ext(SilcHashTable ht, void *key, void *context, call the destructor funtion for the found entry. Return TRUE if the entry was removed successfully and FALSE otherwise. */ -bool silc_hash_table_del(SilcHashTable ht, void *key) +SilcBool silc_hash_table_del(SilcHashTable ht, void *key) { SilcHashTableEntry *entry, prev, e; @@ -503,7 +503,7 @@ bool silc_hash_table_del(SilcHashTable ht, void *key) /* Same as above but with specific hash and compare functions. */ -bool silc_hash_table_del_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key, SilcHashFunction hash, void *hash_user_context, SilcHashCompare compare, @@ -556,7 +556,7 @@ bool silc_hash_table_del_ext(SilcHashTable ht, void *key, have duplicate keys. In that case the `context' may be used to check whether the correct entry is being deleted. */ -bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_by_context(SilcHashTable ht, void *key, void *context) { SilcHashTableEntry *entry, prev, e; @@ -594,7 +594,7 @@ bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, /* Same as above but with specific hash and compare functions. */ -bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, void *context, SilcHashFunction hash, void *hash_user_context, @@ -651,7 +651,7 @@ bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, respectively. If the `ret_key and `ret_context' are NULL then this maybe used only to check whether given key exists in the table. */ -bool silc_hash_table_find(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find(SilcHashTable ht, void *key, void **ret_key, void **ret_context) { return silc_hash_table_find_ext(ht, key, ret_key, ret_context, @@ -660,7 +660,7 @@ bool silc_hash_table_find(SilcHashTable ht, void *key, /* Same as above but with specified hash and comparison functions. */ -bool silc_hash_table_find_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key, void **ret_key, void **ret_context, SilcHashFunction hash, void *hash_user_context, @@ -692,7 +692,7 @@ bool silc_hash_table_find_ext(SilcHashTable ht, void *key, /* Same as silc_hash_table_find but finds with specific context. */ -bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_by_context(SilcHashTable ht, void *key, void *context, void **ret_key) { return silc_hash_table_find_by_context_ext(ht, key, context, ret_key, @@ -701,7 +701,7 @@ bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, /* Same as above but with specified hash and comparison functions. */ -bool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, void *context, void **ret_key, SilcHashFunction hash, void *hash_user_context, @@ -773,7 +773,7 @@ void silc_hash_table_foreach(SilcHashTable ht, SilcHashForeach foreach, { SilcHashTableEntry e, tmp; int i; - bool auto_rehash; + SilcBool auto_rehash; if (!foreach) return; @@ -802,7 +802,7 @@ void silc_hash_table_rehash(SilcHashTable ht, SilcUInt32 new_size) int i; SilcHashTableEntry *table, e, tmp; SilcUInt32 table_size, size_index; - bool auto_rehash; + SilcBool auto_rehash; SILC_HT_DEBUG(("Start")); @@ -857,7 +857,7 @@ void silc_hash_table_rehash_ext(SilcHashTable ht, SilcUInt32 new_size, int i; SilcHashTableEntry *table, e, tmp; SilcUInt32 table_size, size_index; - bool auto_rehash; + SilcBool auto_rehash; SILC_HT_DEBUG(("Start")); @@ -931,7 +931,7 @@ void silc_hash_table_list_reset(SilcHashTableList *htl) `context' and TRUE. If this returns FALSE then there are no anymore any entrys. Usage: while (silc_hash_table_get(&htl, &key, &context)) */ -bool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context) +SilcBool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context) { SilcHashTableEntry entry = (SilcHashTableEntry)htl->entry; diff --git a/lib/silcutil/silchashtable.h b/lib/silcutil/silchashtable.h index 61203803..012ce5ee 100644 --- a/lib/silcutil/silchashtable.h +++ b/lib/silcutil/silchashtable.h @@ -114,7 +114,7 @@ typedef SilcUInt32 (*SilcHashFunction)(void *key, void *user_context); * * SYNOPSIS * - * typedef bool (*SilcHashCompare)(void *key1, void *key2, + * typedef SilcBool (*SilcHashCompare)(void *key1, void *key2, * void *user_context); * * DESCRIPTION @@ -126,7 +126,7 @@ typedef SilcUInt32 (*SilcHashFunction)(void *key, void *user_context); * to the callback. * ***/ -typedef bool (*SilcHashCompare)(void *key1, void *key2, void *user_context); +typedef SilcBool (*SilcHashCompare)(void *key1, void *key2, void *user_context); /****f* silcutil/SilcHashTableAPI/SilcHashDestructor * @@ -175,7 +175,7 @@ typedef void (*SilcHashForeach)(void *key, void *context, void *user_context); * void *compare_user_context, * SilcHashDestructor destructor, * void *destructor_user_context, - * bool auto_rehash); + * SilcBool auto_rehash); * * DESCRIPTION * @@ -195,7 +195,7 @@ SilcHashTable silc_hash_table_alloc(SilcUInt32 table_size, void *compare_user_context, SilcHashDestructor destructor, void *destructor_user_context, - bool auto_rehash); + SilcBool auto_rehash); /****f* silcutil/SilcHashTableAPI/silc_hash_table_free * @@ -276,7 +276,7 @@ void silc_hash_table_replace(SilcHashTable ht, void *key, void *context); * * SYNOPSIS * - * bool silc_hash_table_del(SilcHashTable ht, void *key); + * SilcBool silc_hash_table_del(SilcHashTable ht, void *key); * * DESCRIPTION * @@ -285,13 +285,13 @@ void silc_hash_table_replace(SilcHashTable ht, void *key, void *context); * entry was removed successfully and FALSE otherwise. * ***/ -bool silc_hash_table_del(SilcHashTable ht, void *key); +SilcBool silc_hash_table_del(SilcHashTable ht, void *key); /****f* silcutil/SilcHashTableAPI/silc_hash_table_del_by_context * * SYNOPSIS * - * bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_del_by_context(SilcHashTable ht, void *key, * void *context); * * DESCRIPTION @@ -302,14 +302,14 @@ bool silc_hash_table_del(SilcHashTable ht, void *key); * be used to check whether the correct entry is being deleted. * ***/ -bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_by_context(SilcHashTable ht, void *key, void *context); /****f* silcutil/SilcHashTableAPI/silc_hash_table_find * * SYNOPSIS * - * bool silc_hash_table_find(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_find(SilcHashTable ht, void *key, * void **ret_key, void **ret_context); * * DESCRIPTION @@ -321,14 +321,14 @@ bool silc_hash_table_del_by_context(SilcHashTable ht, void *key, * maybe used only to check whether given key exists in the table. * ***/ -bool silc_hash_table_find(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find(SilcHashTable ht, void *key, void **ret_key, void **ret_context); /****f* silcutil/SilcHashTableAPI/silc_hash_table_find_by_context * * SYNOPSIS * - * bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_find_by_context(SilcHashTable ht, void *key, * void *context, void **ret_key); * * DESCRIPTION @@ -342,7 +342,7 @@ bool silc_hash_table_find(SilcHashTable ht, void *key, * the caller already knows the context. * ***/ -bool silc_hash_table_find_by_context(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_by_context(SilcHashTable ht, void *key, void *context, void **ret_key); /****f* silcutil/SilcHashTableAPI/silc_hash_table_find_foreach @@ -450,7 +450,7 @@ void silc_hash_table_list_reset(SilcHashTableList *htl); * * SYNOPSIS * - * bool silc_hash_table_get(SilcHashTableList *htl, void **key, + * SilcBool silc_hash_table_get(SilcHashTableList *htl, void **key, * void **context); * * DESCRIPTION @@ -460,7 +460,7 @@ void silc_hash_table_list_reset(SilcHashTableList *htl); * any entrys. * ***/ -bool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context); +SilcBool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context); /* Extended hash table interface (same as above but with specific @@ -516,7 +516,7 @@ void silc_hash_table_replace_ext(SilcHashTable ht, void *key, void *context, * * SYNOPSIS * - * bool silc_hash_table_del_ext(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key, * SilcHashFunction hash, * void *hash_user_context, * SilcHashCompare compare, @@ -538,7 +538,7 @@ void silc_hash_table_replace_ext(SilcHashTable ht, void *key, void *context, * specific destructor function. * ***/ -bool silc_hash_table_del_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key, SilcHashFunction hash, void *hash_user_context, SilcHashCompare compare, @@ -550,7 +550,7 @@ bool silc_hash_table_del_ext(SilcHashTable ht, void *key, * * SYNOPSIS * - * bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, * void *context, * SilcHashFunction hash, * void *hash_user_context, @@ -574,7 +574,7 @@ bool silc_hash_table_del_ext(SilcHashTable ht, void *key, * specific destructor function. * ***/ -bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, void *context, SilcHashFunction hash, void *hash_user_context, @@ -587,7 +587,7 @@ bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, * * SYNOPSIS * - * bool silc_hash_table_find_ext(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key, * void **ret_key, void **ret_context, * SilcHashFunction hash, * void *hash_user_context, @@ -608,7 +608,7 @@ bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key, * comparing function. If not provided the hash table's default is used. * ***/ -bool silc_hash_table_find_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key, void **ret_key, void **ret_context, SilcHashFunction hash, void *hash_user_context, @@ -619,7 +619,7 @@ bool silc_hash_table_find_ext(SilcHashTable ht, void *key, * * SYNOPSIS * - * bool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, + * SilcBool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, * void *context, void **ret_key, * SilcHashFunction hash, * void *hash_user_context, @@ -642,7 +642,7 @@ bool silc_hash_table_find_ext(SilcHashTable ht, void *key, * comparing function. If not provided the hash table's default is used. * ***/ -bool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, +SilcBool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key, void *context, void **ret_key, SilcHashFunction hash, void *hash_user_context, diff --git a/lib/silcutil/silclog.c b/lib/silcutil/silclog.c index 453049a1..0f017449 100644 --- a/lib/silcutil/silclog.c +++ b/lib/silcutil/silclog.c @@ -216,7 +216,7 @@ void silc_log_output(SilcLogType type, char *string) /* Set and initialize the specified log file. */ -bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize, +SilcBool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize, SilcSchedule scheduler) { FILE *fp = NULL; @@ -406,7 +406,7 @@ void silc_log_set_debug_string(const char *debug_string) /* Set timestamp */ -void silc_log_timestamp(bool enable) +void silc_log_timestamp(SilcBool enable) { silclog.timestamp = enable; } @@ -420,21 +420,21 @@ void silc_log_flushdelay(SilcUInt32 flushdelay) /* Set quick logging */ -void silc_log_quick(bool enable) +void silc_log_quick(SilcBool enable) { silclog.quick = enable; } /* Set debugging */ -void silc_log_debug(bool enable) +void silc_log_debug(SilcBool enable) { silclog.debug = enable; } /* Set debug hexdump */ -void silc_log_debug_hexdump(bool enable) +void silc_log_debug_hexdump(SilcBool enable) { silclog.debug_hexdump = enable; } diff --git a/lib/silcutil/silclog.h b/lib/silcutil/silclog.h index af835850..acf6ed33 100644 --- a/lib/silcutil/silclog.h +++ b/lib/silcutil/silclog.h @@ -55,7 +55,7 @@ typedef enum { * * SYNOPSIS * - * typedef bool (*SilcLogCb)(SilcLogType type, char *message, + * typedef SilcBool (*SilcLogCb)(SilcLogType type, char *message, * void *context); * * DESCRIPTION @@ -72,13 +72,13 @@ typedef enum { * silc_log_set_callback * ***/ -typedef bool (*SilcLogCb)(SilcLogType type, char *message, void *context); +typedef SilcBool (*SilcLogCb)(SilcLogType type, char *message, void *context); /****f* silcutil/SilcLogAPI/SilcLogDebugCb * * SYNOPSIS * - * typedef bool (*SilcLogDebugCb)(char *file, char *function, int line, + * typedef SilcBool (*SilcLogDebugCb)(char *file, char *function, int line, * char *message, void *context); * * DESCRIPTION @@ -97,14 +97,14 @@ typedef bool (*SilcLogCb)(SilcLogType type, char *message, void *context); * silc_debug, silc_log_set_debug_callbacks * ***/ -typedef bool (*SilcLogDebugCb)(char *file, char *function, int line, +typedef SilcBool (*SilcLogDebugCb)(char *file, char *function, int line, char *message, void *context); /****f* silcutil/SilcLogAPI/SilcLogHexdumpCb * * SYNOPSIS * - * typedef bool (*SilcDebugHexdumpCb)(char *file, char *function, int line, + * typedef SilcBool (*SilcDebugHexdumpCb)(char *file, char *function, int line, * unsigned char *data, * SilcUInt32 data_len, * char *message, void *context; @@ -127,7 +127,7 @@ typedef bool (*SilcLogDebugCb)(char *file, char *function, int line, * silc_debug_hexdump, silc_log_set_debug_callbacks * ***/ -typedef bool (*SilcLogHexdumpCb)(char *file, char *function, int line, +typedef SilcBool (*SilcLogHexdumpCb)(char *file, char *function, int line, unsigned char *data, SilcUInt32 data_len, char *message, void *context); @@ -291,7 +291,7 @@ typedef bool (*SilcLogHexdumpCb)(char *file, char *function, int line, * * SYNOPSIS * - * bool silc_log_set_file(SilcLogType type, char *filename, + * SilcBool silc_log_set_file(SilcLogType type, char *filename, * SilcUInt32 maxsize, * SilcSchedule scheduler); * @@ -308,7 +308,7 @@ typedef bool (*SilcLogHexdumpCb)(char *file, char *function, int line, * save HD activity. * ***/ -bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize, +SilcBool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize, SilcSchedule scheduler); /****f* silcutil/SilcLogAPI/silc_log_get_file @@ -465,7 +465,7 @@ void silc_log_set_debug_string(const char *debug_string); * * NAME * - * void silc_log_timestamp(bool enable); + * void silc_log_timestamp(SilcBool enable); * * DESCRIPTION * @@ -473,7 +473,7 @@ void silc_log_set_debug_string(const char *debug_string); * timestamp and to FALSE to disable it. Default is TRUE. * ***/ -void silc_log_timestamp(bool enable); +void silc_log_timestamp(SilcBool enable); /****f* silcutil/SilcLogAPI/silc_log_flushdelay * @@ -492,7 +492,7 @@ void silc_log_flushdelay(SilcUInt32 flushdelay); * * NAME * - * void silc_log_quick(bool enable); + * void silc_log_quick(SilcBool enable); * * DESCRIPTION * @@ -510,13 +510,13 @@ void silc_log_flushdelay(SilcUInt32 flushdelay); * Default is FALSE. * ***/ -void silc_log_quick(bool enable); +void silc_log_quick(SilcBool enable); /****v* silcutil/SilcLogAPI/silc_log_debug * * NAME * - * void silc_log_debug(bool enable); + * void silc_log_debug(SilcBool enable); * * DESCRIPTION * @@ -528,13 +528,13 @@ void silc_log_quick(bool enable); * SILC_LOG_DEBUG * ***/ -void silc_log_debug(bool enable); +void silc_log_debug(SilcBool enable); /****v* silcutil/SilcLogAPI/silc_log_debug_hexdump * * NAME * - * void silc_log_debug_hexdump(bool enable); + * void silc_log_debug_hexdump(SilcBool enable); * * DESCRIPTION * @@ -546,6 +546,6 @@ void silc_log_debug(bool enable); * SILC_LOG_HEXDUMP * ***/ -void silc_log_debug_hexdump(bool enable); +void silc_log_debug_hexdump(SilcBool enable); #endif /* !SILCLOG_H */ diff --git a/lib/silcutil/silcmime.c b/lib/silcutil/silcmime.c index d347d735..d7d2ddc2 100644 --- a/lib/silcutil/silcmime.c +++ b/lib/silcutil/silcmime.c @@ -701,7 +701,7 @@ const unsigned char *silc_mime_get_data(SilcMime mime, SilcUInt32 *data_len) return mime->data; } -bool silc_mime_is_partial(SilcMime mime) +SilcBool silc_mime_is_partial(SilcMime mime) { const char *type = silc_mime_get_field(mime, "Content-Type"); if (!type) @@ -732,7 +732,7 @@ void silc_mime_set_multipart(SilcMime mime, const char *type, mime->multiparts = silc_dlist_init(); } -bool silc_mime_add_multipart(SilcMime mime, SilcMime part) +SilcBool silc_mime_add_multipart(SilcMime mime, SilcMime part) { if (!mime || !mime->multiparts || !part) return FALSE; @@ -741,7 +741,7 @@ bool silc_mime_add_multipart(SilcMime mime, SilcMime part) return TRUE; } -bool silc_mime_is_multipart(SilcMime mime) +SilcBool silc_mime_is_multipart(SilcMime mime) { if (!mime) return FALSE; diff --git a/lib/silcutil/silcmime.h b/lib/silcutil/silcmime.h index 90684e17..62ebdefc 100644 --- a/lib/silcutil/silcmime.h +++ b/lib/silcutil/silcmime.h @@ -290,14 +290,14 @@ const unsigned char *silc_mime_get_data(SilcMime mime, SilcUInt32 *data_len); * * SYNOPSIS * - * bool silc_mime_is_partial(SilcMime mime); + * SilcBool silc_mime_is_partial(SilcMime mime); * * DESCRIPTION * * Returns TRUE if the MIME message `mime' is a partial MIME fragment. * ***/ -bool silc_mime_is_partial(SilcMime mime); +SilcBool silc_mime_is_partial(SilcMime mime); /****f* silcutil/SILCMIMEAPI/silc_mime_set_multipart * @@ -320,7 +320,7 @@ void silc_mime_set_multipart(SilcMime mime, const char *type, * * SYNOPSIS * - * bool silc_mime_add_multipart(SilcMime mime, SilcMime part); + * SilcBool silc_mime_add_multipart(SilcMime mime, SilcMime part); * * DESCRIPTION * @@ -344,13 +344,13 @@ void silc_mime_set_multipart(SilcMime mime, const char *type, * silc_mime_add_multipart(mime, part); * ***/ -bool silc_mime_add_multipart(SilcMime mime, SilcMime part); +SilcBool silc_mime_add_multipart(SilcMime mime, SilcMime part); /****f* silcutil/SILCMIMEAPI/silc_mime_is_multipart * * SYNOPSIS * - * bool silc_mime_is_multipart(SilcMime mime); + * SilcBool silc_mime_is_multipart(SilcMime mime); * * DESCRIPTION * @@ -358,7 +358,7 @@ bool silc_mime_add_multipart(SilcMime mime, SilcMime part); * Its parts can be get by calling silc_mime_get_multiparts. * ***/ -bool silc_mime_is_multipart(SilcMime mime); +SilcBool silc_mime_is_multipart(SilcMime mime); /****f* silcutil/SILCMIMEAPI/silc_mime_get_multiparts * diff --git a/lib/silcutil/silcmutex.h b/lib/silcutil/silcmutex.h index 19b4863f..c92a23c5 100644 --- a/lib/silcutil/silcmutex.h +++ b/lib/silcutil/silcmutex.h @@ -66,7 +66,7 @@ typedef struct SilcMutexStruct *SilcMutex; * * SYNOPSIS * - * bool silc_mutex_alloc(SilcMutex *mutex); + * SilcBool silc_mutex_alloc(SilcMutex *mutex); * * DESCRIPTION * @@ -76,7 +76,7 @@ typedef struct SilcMutexStruct *SilcMutex; * on error. * ***/ -bool silc_mutex_alloc(SilcMutex *mutex); +SilcBool silc_mutex_alloc(SilcMutex *mutex); /****f* silcutil/SilcMutexAPI/silc_mutex_free * diff --git a/lib/silcutil/silcnet.c b/lib/silcutil/silcnet.c index d7781351..c4686c6e 100644 --- a/lib/silcutil/silcnet.c +++ b/lib/silcutil/silcnet.c @@ -44,7 +44,7 @@ int silc_net_get_socket_opt(int sock, int level, int option, /* Checks whether IP address sent as argument is valid IPv4 address. */ -bool silc_net_is_ip4(const char *addr) +SilcBool silc_net_is_ip4(const char *addr) { int count = 0; @@ -64,7 +64,7 @@ bool silc_net_is_ip4(const char *addr) /* Checks whether IP address sent as argument is valid IPv6 address. */ -bool silc_net_is_ip6(const char *addr) +SilcBool silc_net_is_ip6(const char *addr) { /* XXX does this work with all kinds of IPv6 addresses? */ while (*addr) { @@ -78,7 +78,7 @@ bool silc_net_is_ip6(const char *addr) /* Checks whether IP address sent as argument is valid IP address. */ -bool silc_net_is_ip(const char *addr) +SilcBool silc_net_is_ip(const char *addr) { if (silc_net_is_ip4(addr)) return TRUE; @@ -89,7 +89,7 @@ bool silc_net_is_ip(const char *addr) typedef struct { SilcNetResolveCallback completion; void *context; - bool prefer_ipv6; + SilcBool prefer_ipv6; SilcSchedule schedule; char *input; char *result; @@ -144,7 +144,7 @@ static void *silc_net_gethostbyaddr_thread(void *context) /* Resolves IP address for hostname. */ -bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, +SilcBool silc_net_gethostbyname(const char *name, SilcBool prefer_ipv6, char *address, SilcUInt32 address_len) { #ifdef HAVE_IPV6 @@ -208,7 +208,7 @@ bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, /* Resolves IP address for hostname async. */ void silc_net_gethostbyname_async(const char *name, - bool prefer_ipv6, + SilcBool prefer_ipv6, SilcSchedule schedule, SilcNetResolveCallback completion, void *context) @@ -226,7 +226,7 @@ void silc_net_gethostbyname_async(const char *name, /* Resolves hostname by IP address. */ -bool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len) +SilcBool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len) { #ifdef HAVE_IPV6 struct addrinfo req, *ai; @@ -281,7 +281,7 @@ void silc_net_gethostbyaddr_async(const char *addr, /* Performs lookups for remote name and IP address. This peforms reverse lookup as well to verify that the IP has FQDN. */ -bool silc_net_check_host_by_sock(int sock, char **hostname, char **ip) +SilcBool silc_net_check_host_by_sock(int sock, char **hostname, char **ip) { char host[1024]; int rval, len; @@ -359,7 +359,7 @@ bool silc_net_check_host_by_sock(int sock, char **hostname, char **ip) /* Performs lookups for local name and IP address. This peforms reverse lookup as well to verify that the IP has FQDN. */ -bool silc_net_check_local_by_sock(int sock, char **hostname, char **ip) +SilcBool silc_net_check_local_by_sock(int sock, char **hostname, char **ip) { char host[1024]; int rval, len; diff --git a/lib/silcutil/silcnet.h b/lib/silcutil/silcnet.h index f5525d07..08168fa3 100644 --- a/lib/silcutil/silcnet.h +++ b/lib/silcutil/silcnet.h @@ -109,7 +109,7 @@ typedef void (*SilcNetCallback)(SilcNetStatus status, * SilcNetServer * silc_net_create_server(const char **local_ip_addr, * SilcUInt32 local_ip_count, - * int port, bool require_fqdn, + * int port, SilcBool require_fqdn, * SilcSchedule schedule, * SilcNetCallback callback, void *context); * @@ -127,7 +127,7 @@ typedef void (*SilcNetCallback)(SilcNetStatus status, ***/ SilcNetServer silc_net_create_server(const char **local_ip_addr, SilcUInt32 local_ip_count, - int port, bool require_fqdn, SilcSchedule schedule, + int port, SilcBool require_fqdn, SilcSchedule schedule, SilcNetCallback callback, void *context); /****f* silcutil/SilcNetAPI/silc_net_close_server @@ -259,33 +259,33 @@ int silc_net_get_socket_opt(int sock, int level, int option, * * SYNOPSIS * - * bool silc_net_is_ip4(const char *addr); + * SilcBool silc_net_is_ip4(const char *addr); * * DESCRIPTION * * Checks whether IP address sent as argument is valid IPv4 address. * ***/ -bool silc_net_is_ip4(const char *addr); +SilcBool silc_net_is_ip4(const char *addr); /****f* silcutil/SilcNetAPI/silc_net_is_ip6 * * SYNOPSIS * - * bool silc_net_is_ip6(const char *addr); + * SilcBool silc_net_is_ip6(const char *addr); * * DESCRIPTION * * Checks whether IP address sent as argument is valid IPv6 address. * ***/ -bool silc_net_is_ip6(const char *addr); +SilcBool silc_net_is_ip6(const char *addr); /****f* silcutil/SilcNetAPI/silc_net_is_ip * * SYNOPSIS * - * bool silc_net_is_ip(const char *addr); + * SilcBool silc_net_is_ip(const char *addr); * * DESCRIPTION * @@ -293,13 +293,13 @@ bool silc_net_is_ip6(const char *addr); * This supports both IPv4 and IPv6 addresses. * ***/ -bool silc_net_is_ip(const char *addr); +SilcBool silc_net_is_ip(const char *addr); /****f* silcutil/SilcNetAPI/silc_net_addr2bin * * SYNOPSIS * - * bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len); + * SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len); * * DESCRIPTION * @@ -308,7 +308,7 @@ bool silc_net_is_ip(const char *addr); * IPv4 or IPv6 address. * ***/ -bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len); +SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len); /****f* silcutil/SilcNetAPI/SilcNetResolveCallback * @@ -330,7 +330,7 @@ typedef void (*SilcNetResolveCallback)(const char *result, void *context); * * SYNOPSIS * - * bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, + * SilcBool silc_net_gethostbyname(const char *name, SilcBool prefer_ipv6, * char *address, SilcUInt32 address_len); * * DESCRIPTION @@ -344,7 +344,7 @@ typedef void (*SilcNetResolveCallback)(const char *result, void *context); * address also. * ***/ -bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, +SilcBool silc_net_gethostbyname(const char *name, SilcBool prefer_ipv6, char *address, SilcUInt32 address_len); /****f* silcutil/SilcNetAPI/silc_net_gethostbyname_async @@ -352,7 +352,7 @@ bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, * SYNOPSIS * * void silc_net_gethostbyname_async(const char *name, - * bool prefer_ipv6, + * SilcBool prefer_ipv6, * SilcSchedule schedule, * SilcNetResolveCallback completion, * void *context) @@ -370,7 +370,7 @@ bool silc_net_gethostbyname(const char *name, bool prefer_ipv6, char *address, * ***/ void silc_net_gethostbyname_async(const char *name, - bool prefer_ipv6, + SilcBool prefer_ipv6, SilcSchedule schedule, SilcNetResolveCallback completion, void *context); @@ -379,7 +379,7 @@ void silc_net_gethostbyname_async(const char *name, * * SYNOPSIS * - * bool silc_net_gethostbyaddr(const char *addr, char *name, + * SilcBool silc_net_gethostbyaddr(const char *addr, char *name, * SilcUInt32 name_len); * * DESCRIPTION @@ -390,7 +390,7 @@ void silc_net_gethostbyname_async(const char *name, * This is synchronous function and will block the calling process. * ***/ -bool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len); +SilcBool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len); /****f* silcutil/SilcNetAPI/silc_net_gethostbyaddr_async * @@ -418,7 +418,7 @@ void silc_net_gethostbyaddr_async(const char *addr, * * SYNOPSIS * - * bool silc_net_check_host_by_sock(int sock, char **hostname, char **ip); + * SilcBool silc_net_check_host_by_sock(int sock, char **hostname, char **ip); * * DESCRIPTION * @@ -426,13 +426,13 @@ void silc_net_gethostbyaddr_async(const char *addr, * lookup as well to verify that the IP has FQDN. * ***/ -bool silc_net_check_host_by_sock(int sock, char **hostname, char **ip); +SilcBool silc_net_check_host_by_sock(int sock, char **hostname, char **ip); /****f* silcutil/SilcNetAPI/silc_net_check_local_by_sock * * SYNOPSIS * - * bool silc_net_check_local_by_sock(int sock, char **hostname, char **ip); + * SilcBool silc_net_check_local_by_sock(int sock, char **hostname, char **ip); * * DESCRIPTION * @@ -440,7 +440,7 @@ bool silc_net_check_host_by_sock(int sock, char **hostname, char **ip); * lookup as well to verify that the IP has FQDN. * ***/ -bool silc_net_check_local_by_sock(int sock, char **hostname, char **ip); +SilcBool silc_net_check_local_by_sock(int sock, char **hostname, char **ip); /****f* silcutil/SilcNetAPI/silc_net_get_remote_port * @@ -501,7 +501,7 @@ char *silc_net_localip(void); * * SYNOPSIS * - * bool silc_net_win32_init(void); + * SilcBool silc_net_win32_init(void); * * DESCRIPTION * @@ -518,7 +518,7 @@ char *silc_net_localip(void); * This routines is available only on Win32 platform. * ***/ -bool silc_net_win32_init(void); +SilcBool silc_net_win32_init(void); /****f* silcutil/SilcNetAPI/silc_net_win32_uninit * diff --git a/lib/silcutil/silcschedule.c b/lib/silcutil/silcschedule.c index f0590225..c7ce66dc 100644 --- a/lib/silcutil/silcschedule.c +++ b/lib/silcutil/silcschedule.c @@ -26,7 +26,7 @@ extern const SilcScheduleOps schedule_ops; static void silc_schedule_task_remove(SilcSchedule schedule, SilcTask task); static void silc_schedule_dispatch_fd(SilcSchedule schedule); static void silc_schedule_dispatch_timeout(SilcSchedule schedule, - bool dispatch_all); + SilcBool dispatch_all); /* Fd task hash table destructor */ @@ -78,7 +78,7 @@ SilcSchedule silc_schedule_init(int max_tasks, void *app_context) scheduler could not be uninitialized. This happens when the scheduler is still valid and silc_schedule_stop has not been called. */ -bool silc_schedule_uninit(SilcSchedule schedule) +SilcBool silc_schedule_uninit(SilcSchedule schedule) { SILC_LOG_DEBUG(("Uninitializing scheduler")); @@ -172,7 +172,7 @@ static void silc_schedule_dispatch_fd(SilcSchedule schedule) tasks are removed here. */ static void silc_schedule_dispatch_timeout(SilcSchedule schedule, - bool dispatch_all) + SilcBool dispatch_all) { SilcTask t; SilcTaskTimeout task; @@ -220,7 +220,7 @@ static void silc_schedule_select_timeout(SilcSchedule schedule) SilcTask t; SilcTaskTimeout task; struct timeval curtime; - bool dispatch = TRUE; + SilcBool dispatch = TRUE; /* Get the current time */ silc_gettimeofday(&curtime); @@ -278,7 +278,7 @@ static void silc_schedule_select_timeout(SilcSchedule schedule) /* Runs the scheduler once and then returns. */ -bool silc_schedule_one(SilcSchedule schedule, int timeout_usecs) +SilcBool silc_schedule_one(SilcSchedule schedule, int timeout_usecs) { struct timeval timeout; int ret; @@ -688,7 +688,7 @@ static void silc_schedule_task_remove(SilcSchedule schedule, SilcTask task) descriptor to set different iomasks. */ void silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd, - SilcTaskEvent mask, bool send_events) + SilcTaskEvent mask, SilcBool send_events) { SilcTaskFd task; diff --git a/lib/silcutil/silcschedule.h b/lib/silcutil/silcschedule.h index 7d8abc98..ec456dd8 100644 --- a/lib/silcutil/silcschedule.h +++ b/lib/silcutil/silcschedule.h @@ -246,7 +246,7 @@ SilcSchedule silc_schedule_init(int max_tasks, void *app_context); * * SYNOPSIS * - * bool silc_schedule_uninit(SilcSchedule schedule); + * SilcBool silc_schedule_uninit(SilcSchedule schedule); * * DESCRIPTION * @@ -256,7 +256,7 @@ SilcSchedule silc_schedule_init(int max_tasks, void *app_context); * is still valid and silc_schedule_stop has not been called. * ***/ -bool silc_schedule_uninit(SilcSchedule schedule); +SilcBool silc_schedule_uninit(SilcSchedule schedule); /****f* silcutil/SilcScheduleAPI/silc_schedule_stop * @@ -295,7 +295,7 @@ void silc_schedule(SilcSchedule schedule); * * SYNOPSIS * - * bool silc_schedule_one(SilcSchedule schedule, int block); + * SilcBool silc_schedule_one(SilcSchedule schedule, int block); * * DESCRIPTION * @@ -307,7 +307,7 @@ void silc_schedule(SilcSchedule schedule); * some other event occurs. * ***/ -bool silc_schedule_one(SilcSchedule schedule, int timeout_usecs); +SilcBool silc_schedule_one(SilcSchedule schedule, int timeout_usecs); /****f* silcutil/SilcScheduleAPI/silc_schedule_wakeup * @@ -528,7 +528,7 @@ void silc_schedule_task_del_by_all(SilcSchedule schedule, int fd, * SYNOPSIS * * void silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd, - * SilcTaskEvent mask, bool send_events); + * SilcTaskEvent mask, SilcBool send_events); * * DESCRIPTION * @@ -548,7 +548,7 @@ void silc_schedule_task_del_by_all(SilcSchedule schedule, int fd, * ***/ void silc_schedule_set_listen_fd(SilcSchedule schedule, SilcUInt32 fd, - SilcTaskEvent mask, bool send_events); + SilcTaskEvent mask, SilcBool send_events); /****f* silcutil/SilcScheduleAPI/silc_schedule_unset_listen_fd * diff --git a/lib/silcutil/silcsocketstream.c b/lib/silcutil/silcsocketstream.c index e3521a1f..815bbdb1 100644 --- a/lib/silcutil/silcsocketstream.c +++ b/lib/silcutil/silcsocketstream.c @@ -28,7 +28,7 @@ int silc_socket_stream_read(SilcStream stream, unsigned char *buf, SilcUInt32 buf_len); int silc_socket_stream_write(SilcStream stream, const unsigned char *data, SilcUInt32 data_len); -bool silc_socket_stream_close(SilcStream stream); +SilcBool silc_socket_stream_close(SilcStream stream); void silc_socket_stream_destroy(SilcStream stream); /* Internal async host lookup context. */ @@ -166,7 +166,7 @@ static void silc_socket_host_lookup_abort(SilcAsyncOperation op, /* Creates socket stream */ SilcAsyncOperation -silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, +silc_socket_stream_create(int sock, SilcBool lookup, SilcBool require_fqdn, SilcSchedule schedule, SilcSocketStreamCallback callback, void *context) @@ -227,7 +227,7 @@ silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, /* Returns socket stream information */ -bool silc_socket_stream_get_info(SilcStream stream, +SilcBool silc_socket_stream_get_info(SilcStream stream, int *sock, const char **hostname, const char **ip, SilcUInt16 *port) { @@ -250,7 +250,7 @@ bool silc_socket_stream_get_info(SilcStream stream, /* Set socket information */ -bool silc_socket_stream_set_info(SilcStream stream, +SilcBool silc_socket_stream_set_info(SilcStream stream, const char *hostname, const char *ip, SilcUInt16 port) { @@ -291,7 +291,7 @@ int silc_socket_stream_get_error(SilcStream stream) /* Set QoS for socket stream */ -bool silc_socket_stream_set_qos(SilcStream stream, +SilcBool silc_socket_stream_set_qos(SilcStream stream, SilcUInt32 read_rate, SilcUInt32 read_limit_bytes, SilcUInt32 limit_sec, @@ -337,7 +337,7 @@ bool silc_socket_stream_set_qos(SilcStream stream, /* Closes socket */ -bool silc_socket_stream_close(SilcStream stream) +SilcBool silc_socket_stream_close(SilcStream stream) { SilcSocketStream socket_stream = stream; diff --git a/lib/silcutil/silcsocketstream.h b/lib/silcutil/silcsocketstream.h index c75394a0..dec14019 100644 --- a/lib/silcutil/silcsocketstream.h +++ b/lib/silcutil/silcsocketstream.h @@ -82,7 +82,7 @@ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, * SYNOPSIS * * SilcAsyncOperation - * silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, + * silc_socket_stream_create(int sock, SilcBool lookup, SilcBool require_fqdn, * SilcSchedule schedule, * SilcSocketStreamCallback callback, * void *context); @@ -107,7 +107,7 @@ typedef void (*SilcSocketStreamCallback)(SilcSocketStreamStatus status, * ***/ SilcAsyncOperation -silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, +silc_socket_stream_create(int sock, SilcBool lookup, SilcBool require_fqdn, SilcSchedule schedule, SilcSocketStreamCallback callback, void *context); @@ -116,7 +116,7 @@ silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, * * SYNOPSIS * - * bool + * SilcBool * silc_socket_stream_get_info(SilcStream stream, * int *sock, const char **hostname, * const char **ip, SilcUInt16 *port); @@ -128,7 +128,7 @@ silc_socket_stream_create(int sock, bool lookup, bool require_fqdn, * if these informations are not available. * ***/ -bool silc_socket_stream_get_info(SilcStream stream, +SilcBool silc_socket_stream_get_info(SilcStream stream, int *sock, const char **hostname, const char **ip, SilcUInt16 *port); @@ -136,7 +136,7 @@ bool silc_socket_stream_get_info(SilcStream stream, * * SYNOPSIS * - * bool + * SilcBool * silc_socket_stream_set_info(SilcStream stream, * const char *hostname, * const char *ip, SilcUInt16 port); @@ -152,7 +152,7 @@ bool silc_socket_stream_get_info(SilcStream stream, * silc_socket_stream_get_info to get the information from the stream. * ***/ -bool silc_socket_stream_set_info(SilcStream stream, +SilcBool silc_socket_stream_set_info(SilcStream stream, const char *hostname, const char *ip, SilcUInt16 port); @@ -174,7 +174,7 @@ int silc_socket_stream_get_error(SilcStream stream); * * SYNOPSIS * - * bool silc_socket_stream_set_qos(SilcStream stream, + * SilcBool silc_socket_stream_set_qos(SilcStream stream, * SilcUInt32 read_rate, * SilcUInt32 read_limit_bytes, * SilcUInt32 limit_sec, @@ -194,7 +194,7 @@ int silc_socket_stream_get_error(SilcStream stream); * this socket stream that may be pending will be cancelled. * ***/ -bool silc_socket_stream_set_qos(SilcStream stream, +SilcBool silc_socket_stream_set_qos(SilcStream stream, SilcUInt32 read_rate, SilcUInt32 read_limit_bytes, SilcUInt32 limit_sec, diff --git a/lib/silcutil/silcstack.c b/lib/silcutil/silcstack.c index 30565e1f..387f0a26 100644 --- a/lib/silcutil/silcstack.c +++ b/lib/silcutil/silcstack.c @@ -145,7 +145,7 @@ SilcUInt32 silc_stack_pop(SilcStack stack) memory, otherwise memory is aligned. Returns pointer to the memory or NULL on error. */ -void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, bool aligned) +void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, SilcBool aligned) { void *ptr; SilcUInt32 bsize, bsize2; @@ -231,7 +231,7 @@ void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, bool aligned) the old memory remains intact. */ void *silc_stack_realloc(SilcStack stack, SilcUInt32 old_size, - void *ptr, SilcUInt32 size, bool aligned) + void *ptr, SilcUInt32 size, SilcBool aligned) { SilcUInt32 si = stack->frame->si; SilcUInt32 bsize; diff --git a/lib/silcutil/silcstack_i.h b/lib/silcutil/silcstack_i.h index 962821b5..33c90323 100644 --- a/lib/silcutil/silcstack_i.h +++ b/lib/silcutil/silcstack_i.h @@ -93,7 +93,7 @@ struct SilcStackStruct { /* Allocate memory. If the `aligned' is FALSE this allocates unaligned memory, otherwise memory is aligned. Returns pointer to the memory or NULL on error. */ -void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, bool aligned); +void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, SilcBool aligned); /* Attempts to reallocate memory by changing the size of the `ptr' into `size'. This routine works only if the previous allocation to `stack' @@ -102,7 +102,7 @@ void *silc_stack_malloc(SilcStack stack, SilcUInt32 size, bool aligned); if the `size' does not fit into the current block. If NULL is returned the old memory remains intact. */ void *silc_stack_realloc(SilcStack stack, SilcUInt32 old_size, - void *ptr, SilcUInt32 size, bool aligned); + void *ptr, SilcUInt32 size, SilcBool aligned); #ifdef SILC_DIST_INPLACE /* Prints statistics of the usage of SilcStack to stdout. */ diff --git a/lib/silcutil/silcstream.c b/lib/silcutil/silcstream.c index c32e15a4..ca293fca 100644 --- a/lib/silcutil/silcstream.c +++ b/lib/silcutil/silcstream.c @@ -37,7 +37,7 @@ int silc_stream_write(SilcStream stream, const unsigned char *data, return h->ops->write(stream, data, data_len); } -bool silc_stream_close(SilcStream stream) +SilcBool silc_stream_close(SilcStream stream) { SilcStreamHeader h = stream; return h->ops->close(stream); diff --git a/lib/silcutil/silcstream.h b/lib/silcutil/silcstream.h index cb7b93f0..31c6d078 100644 --- a/lib/silcutil/silcstream.h +++ b/lib/silcutil/silcstream.h @@ -134,7 +134,7 @@ typedef struct { /* This is called to close the stream. This is called when the silc_stream_close function was called. */ - bool (*close)(SilcStream stream); + SilcBool (*close)(SilcStream stream); /* This is called to destroy the stream. This is called when the silc_stream_destroy function was called. */ @@ -191,7 +191,7 @@ int silc_stream_write(SilcStream stream, const unsigned char *data, * * SYNOPSIS * - * bool silc_stream_close(SilcStream stream); + * SilcBool silc_stream_close(SilcStream stream); * * DESCRIPTION * @@ -201,7 +201,7 @@ int silc_stream_write(SilcStream stream, const unsigned char *data, * callback will be called with an error status. * ***/ -bool silc_stream_close(SilcStream stream); +SilcBool silc_stream_close(SilcStream stream); /****f* silcutil/SilcStreamAPI/silc_stream_destroy * diff --git a/lib/silcutil/silcstrutil.c b/lib/silcutil/silcstrutil.c index c387ffc4..8fddd0b2 100644 --- a/lib/silcutil/silcstrutil.c +++ b/lib/silcutil/silcstrutil.c @@ -205,7 +205,7 @@ do { \ /* Parses MIME object and MIME header in it. */ -bool +SilcBool silc_mime_parse(const unsigned char *mime, SilcUInt32 mime_len, char *version, SilcUInt32 version_size, char *content_type, SilcUInt32 content_type_size, @@ -313,7 +313,7 @@ unsigned char *silc_identifier_check(const unsigned char *identifier, /* Same as above but does not allocate memory, just checks the validity of the string. */ -bool silc_identifier_verify(const unsigned char *identifier, +SilcBool silc_identifier_verify(const unsigned char *identifier, SilcUInt32 identifier_len, SilcStringEncoding identifier_encoding, SilcUInt32 max_allowed_length) @@ -370,7 +370,7 @@ unsigned char *silc_channel_name_check(const unsigned char *identifier, /* Same as above but does not allocate memory, just checks the validity of the string. */ -bool silc_channel_name_verify(const unsigned char *identifier, +SilcBool silc_channel_name_verify(const unsigned char *identifier, SilcUInt32 identifier_len, SilcStringEncoding identifier_encoding, SilcUInt32 max_allowed_length) diff --git a/lib/silcutil/silcstrutil.h b/lib/silcutil/silcstrutil.h index 43ad42fb..23451d50 100644 --- a/lib/silcutil/silcstrutil.h +++ b/lib/silcutil/silcstrutil.h @@ -115,7 +115,7 @@ unsigned char *silc_pem_decode(unsigned char *pem, SilcUInt32 pem_len, * * SYNOPSIS * - * bool + * SilcBool * silc_mime_parse(const unsigned char *mime, SilcUInt32 mime_len, * char *version, SilcUInt32 version_size, * char *content_type, SilcUInt32 content_type_size, @@ -143,7 +143,7 @@ unsigned char *silc_pem_decode(unsigned char *pem, SilcUInt32 pem_len, * NULL terminating the buffers it provides. * ***/ -bool +SilcBool silc_mime_parse(const unsigned char *mime, SilcUInt32 mime_len, char *version, SilcUInt32 version_size, char *content_type, SilcUInt32 content_type_size, @@ -217,7 +217,7 @@ unsigned char *silc_identifier_check(const unsigned char *identifier, * * SYNOPSIS * - * bool + * SilcBool * silc_identifier_check(const unsigned char *identifier, * SilcUInt32 identifier_len, * SilcStringEncoding identifier_encoding, @@ -240,7 +240,7 @@ unsigned char *silc_identifier_check(const unsigned char *identifier, * Returns TRUE if the string is valid and FALSE if it is prohibited. * ***/ -bool silc_identifier_verify(const unsigned char *identifier, +SilcBool silc_identifier_verify(const unsigned char *identifier, SilcUInt32 identifier_len, SilcStringEncoding identifier_encoding, SilcUInt32 max_allowed_length); @@ -291,7 +291,7 @@ unsigned char *silc_channel_name_check(const unsigned char *identifier, * * SYNOPSIS * - * bool + * SilcBool * silc_channel_name_check(const unsigned char *identifier, * SilcUInt32 identifier_len, * SilcStringEncoding identifier_encoding, @@ -310,7 +310,7 @@ unsigned char *silc_channel_name_check(const unsigned char *identifier, * Returns TRUE if the string is valid and FALSE if it is prohibited. * ***/ -bool silc_channel_name_verify(const unsigned char *identifier, +SilcBool silc_channel_name_verify(const unsigned char *identifier, SilcUInt32 identifier_len, SilcStringEncoding identifier_encoding, SilcUInt32 max_allowed_length); diff --git a/lib/silcutil/silcthread.h b/lib/silcutil/silcthread.h index c1ecf92d..b13e31ba 100644 --- a/lib/silcutil/silcthread.h +++ b/lib/silcutil/silcthread.h @@ -72,7 +72,7 @@ typedef void *(*SilcThreadStart)(void *context); * SYNOPSIS * * SilcThread silc_thread_create(SilcThreadStart start_func, - * void *context, bool waitable); + * void *context, SilcBool waitable); * DESCRIPTION * * Creates a new thread. The `start_func' with `context' will be @@ -94,7 +94,7 @@ typedef void *(*SilcThreadStart)(void *context); * ***/ SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable); + SilcBool waitable); /****f* silcutil/SilcThreadAPI/silc_thread_exit * @@ -130,7 +130,7 @@ SilcThread silc_thread_self(void); * * SYNOPSIS * - * bool silc_thread_wait(SilcThread thread, void **exit_value); + * SilcBool silc_thread_wait(SilcThread thread, void **exit_value); * * DESCRIPTION * @@ -142,6 +142,6 @@ SilcThread silc_thread_self(void); * FALSE value. * ***/ -bool silc_thread_wait(SilcThread thread, void **exit_value); +SilcBool silc_thread_wait(SilcThread thread, void **exit_value); #endif diff --git a/lib/silcutil/silctime.c b/lib/silcutil/silctime.c index 02f0db39..9eb3ae43 100644 --- a/lib/silcutil/silctime.c +++ b/lib/silcutil/silctime.c @@ -47,7 +47,7 @@ const char *silc_time_string(SilcInt64 timeval) /* Returns time as SilcTime structure */ -bool silc_time_value(SilcInt64 timeval, SilcTime ret_time) +SilcBool silc_time_value(SilcInt64 timeval, SilcTime ret_time) { struct tm *time; @@ -91,7 +91,7 @@ bool silc_time_value(SilcInt64 timeval, SilcTime ret_time) /* Fills the SilcTime structure with correct values */ -static bool silc_time_fill(SilcTime time, +static SilcBool silc_time_fill(SilcTime time, unsigned int year, unsigned int month, unsigned int day, @@ -124,7 +124,7 @@ static bool silc_time_fill(SilcTime time, /* Returns time from universal time string into SilcTime */ -bool silc_time_universal(const char *universal_time, SilcTime ret_time) +SilcBool silc_time_universal(const char *universal_time, SilcTime ret_time) { int ret; unsigned int year, month, day, hour = 0, minute = 0, second = 0; @@ -180,7 +180,7 @@ bool silc_time_universal(const char *universal_time, SilcTime ret_time) /* Encode universal time string. */ -bool silc_time_universal_string(SilcTime timeval, char *ret_string, +SilcBool silc_time_universal_string(SilcTime timeval, char *ret_string, SilcUInt32 ret_string_size) { int ret, len = 0; @@ -212,7 +212,7 @@ bool silc_time_universal_string(SilcTime timeval, char *ret_string, /* Returns time from generalized time string into SilcTime */ -bool silc_time_generalized(const char *generalized_time, SilcTime ret_time) +SilcBool silc_time_generalized(const char *generalized_time, SilcTime ret_time) { int ret, i; unsigned int year, month, day, hour = 0, minute = 0, second = 0; @@ -290,7 +290,7 @@ bool silc_time_generalized(const char *generalized_time, SilcTime ret_time) /* Encode generalized time string */ -bool silc_time_generalized_string(SilcTime timeval, char *ret_string, +SilcBool silc_time_generalized_string(SilcTime timeval, char *ret_string, SilcUInt32 ret_string_size) { int len = 0, ret; diff --git a/lib/silcutil/silctime.h b/lib/silcutil/silctime.h index c72f0a98..5b21aa7f 100644 --- a/lib/silcutil/silctime.h +++ b/lib/silcutil/silctime.h @@ -94,7 +94,7 @@ const char *silc_time_string(SilcInt64 timeval); * * SYNOPSIS * - * bool silc_time_value(SilcInt64 timeval, SilcTime ret_time); + * SilcBool silc_time_value(SilcInt64 timeval, SilcTime ret_time); * * DESCRIPTION * @@ -103,13 +103,13 @@ const char *silc_time_string(SilcInt64 timeval); * Returns FALSE on error, TRUE otherwise. * ***/ -bool silc_time_value(SilcInt64 timeval, SilcTime ret_time); +SilcBool silc_time_value(SilcInt64 timeval, SilcTime ret_time); /****f* silcutil/SilcTimeAPI/silc_time_universal * * SYNOPSIS * - * bool silc_time_universal(const char *universal_time, + * SilcBool silc_time_universal(const char *universal_time, * SilcTime ret_time); * * DESCRIPTION @@ -129,13 +129,13 @@ bool silc_time_value(SilcInt64 timeval, SilcTime ret_time); * silc_time_universal("030219190403Z", &ret_time); * ***/ -bool silc_time_universal(const char *universal_time, SilcTime ret_time); +SilcBool silc_time_universal(const char *universal_time, SilcTime ret_time); /****f* silcutil/SilcTimeAPI/silc_time_universal_string * * SYNOPSIS * - * bool silc_time_universal_string(SilcTime timeval, char *ret_string, + * SilcBool silc_time_universal_string(SilcTime timeval, char *ret_string, * SilcUInt32 ret_string_size); * * DESCRIPTION @@ -144,14 +144,14 @@ bool silc_time_universal(const char *universal_time, SilcTime ret_time); * `ret_string' buffer. Returns FALSE if the buffer is too small. * ***/ -bool silc_time_universal_string(SilcTime timeval, char *ret_string, +SilcBool silc_time_universal_string(SilcTime timeval, char *ret_string, SilcUInt32 ret_string_size); /****f* silcutil/SilcTimeAPI/silc_time_generalized * * SYNOPSIS * - * bool silc_time_generalized(const char *generalized_time, + * SilcBool silc_time_generalized(const char *generalized_time, * SilcTime ret_time); * * DESCRIPTION @@ -175,13 +175,13 @@ bool silc_time_universal_string(SilcTime timeval, char *ret_string, * silc_time_generalized("20030219190510.212Z", &ret_time); * ***/ -bool silc_time_generalized(const char *generalized_time, SilcTime ret_time); +SilcBool silc_time_generalized(const char *generalized_time, SilcTime ret_time); /****f* silcutil/SilcTimeAPI/silc_time_generalized_string * * SYNOPSIS * - * bool silc_time_generalized_string(SilcTime timeval, char *ret_string, + * SilcBool silc_time_generalized_string(SilcTime timeval, char *ret_string, * SilcUInt32 ret_string_size); * * DESCRIPTION @@ -190,7 +190,7 @@ bool silc_time_generalized(const char *generalized_time, SilcTime ret_time); * `ret_string' buffer. Returns FALSE if the buffer is too small. * ***/ -bool silc_time_generalized_string(SilcTime timeval, char *ret_string, +SilcBool silc_time_generalized_string(SilcTime timeval, char *ret_string, SilcUInt32 ret_string_size); #endif /* SILCTIME_H */ diff --git a/lib/silcutil/silctypes.h b/lib/silcutil/silctypes.h index fbbc6d1d..d64c1a13 100644 --- a/lib/silcutil/silctypes.h +++ b/lib/silcutil/silctypes.h @@ -69,7 +69,7 @@ * * NAME * - * #define bool ... + * #define SilcBool ... * * DESCRIPTION * @@ -105,7 +105,7 @@ * Boolean value, and is always 8-bits. Represents value 0 or 1. * ***/ -typedef unigned char SilcBool; +typedef unsigned char SilcBool; #define silc_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) diff --git a/lib/silcutil/silcutf8.c b/lib/silcutil/silcutf8.c index af6cac3e..9b364558 100644 --- a/lib/silcutil/silcutf8.c +++ b/lib/silcutil/silcutf8.c @@ -536,14 +536,14 @@ SilcUInt32 silc_utf8_decoded_len(const unsigned char *bin, SilcUInt32 bin_len, /* Returns TRUE if the `utf8' string of length of `utf8_len' is valid UTF-8 encoded string, FALSE if it is not UTF-8 encoded string. */ -bool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len) +SilcBool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len) { return silc_utf8_decode(utf8, utf8_len, 0, NULL, 0) != 0; } /* Pretty close strcasecmp */ -bool silc_utf8_strcasecmp(const char *s1, const char *s2) +SilcBool silc_utf8_strcasecmp(const char *s1, const char *s2) { if (s1 == s2) return TRUE; @@ -555,12 +555,12 @@ bool silc_utf8_strcasecmp(const char *s1, const char *s2) /* Pretty close strcasecmp */ -bool silc_utf8_strncasecmp(const char *s1, const char *s2, SilcUInt32 n) +SilcBool silc_utf8_strncasecmp(const char *s1, const char *s2, SilcUInt32 n) { unsigned char *s1u, *s2u; SilcUInt32 s1u_len, s2u_len; SilcStringprepStatus status; - bool ret; + SilcBool ret; if (s1 == s2) return TRUE; diff --git a/lib/silcutil/silcutf8.h b/lib/silcutil/silcutf8.h index ba09b4e9..f82142d1 100644 --- a/lib/silcutil/silcutf8.h +++ b/lib/silcutil/silcutf8.h @@ -114,7 +114,7 @@ SilcUInt32 silc_utf8_decoded_len(const unsigned char *bin, SilcUInt32 bin_len, * * SYNOPSIS * - * bool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len); + * SilcBool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len); * * DESCRIPTION * @@ -122,13 +122,13 @@ SilcUInt32 silc_utf8_decoded_len(const unsigned char *bin, SilcUInt32 bin_len, * UTF-8 encoded string, FALSE if it is not UTF-8 encoded string. * ***/ -bool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len); +SilcBool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len); /****f* silcutil/SilcStrUtilAPI/silc_utf8_strcasecmp * * SYNOPSIS * - * bool silc_utf8_strcasecmp(const char *s1, const char *s2); + * SilcBool silc_utf8_strcasecmp(const char *s1, const char *s2); * * DESCRIPTION * @@ -141,13 +141,13 @@ bool silc_utf8_valid(const unsigned char *utf8, SilcUInt32 utf8_len); * Unicode characters will be ignored when comparing. * ***/ -bool silc_utf8_strcasecmp(const char *s1, const char *s2); +SilcBool silc_utf8_strcasecmp(const char *s1, const char *s2); /****f* silcutil/SilcStrUtilAPI/silc_utf8_strncasecmp * * SYNOPSIS * - * bool silc_utf8_strcasecmp(const char *s1, const char *s2, + * SilcBool silc_utf8_strcasecmp(const char *s1, const char *s2, * SilcUInt32 n); * * DESCRIPTION @@ -161,6 +161,6 @@ bool silc_utf8_strcasecmp(const char *s1, const char *s2); * Unicode characters will be ignored when comparing. * ***/ -bool silc_utf8_strncasecmp(const char *s1, const char *s2, SilcUInt32 n); +SilcBool silc_utf8_strncasecmp(const char *s1, const char *s2, SilcUInt32 n); #endif /* SILCUTF8_H */ diff --git a/lib/silcutil/silcutil.c b/lib/silcutil/silcutil.c index 3a6742cd..b4472beb 100644 --- a/lib/silcutil/silcutil.c +++ b/lib/silcutil/silcutil.c @@ -99,7 +99,7 @@ const char *silc_get_time(SilcUInt32 timeval) /* Converts string to capital characters. */ -bool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size) +SilcBool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size) { int i; @@ -114,7 +114,7 @@ bool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size) /* Converts string to lower letter characters. */ -bool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size) +SilcBool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size) { int i; @@ -129,7 +129,7 @@ bool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size) /* Parse userfqdn string which is in user@fqdn format. */ -bool silc_parse_userfqdn(const char *string, char **left, char **right) +SilcBool silc_parse_userfqdn(const char *string, char **left, char **right) { SilcUInt32 tlen; @@ -596,7 +596,7 @@ SilcUInt32 silc_hash_public_key(void *key, void *user_context) /* Compares two strings. It may be used as SilcHashTable comparison function. */ -bool silc_hash_string_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_string_compare(void *key1, void *key2, void *user_context) { return !strcasecmp((char *)key1, (char *)key2); } @@ -605,7 +605,7 @@ bool silc_hash_string_compare(void *key1, void *key2, void *user_context) The Client ID's compares only the hash of the Client ID not any other part of the Client ID. Other ID's are fully compared. */ -bool silc_hash_id_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_id_compare(void *key1, void *key2, void *user_context) { SilcIdType id_type = (SilcIdType)SILC_PTR_TO_32(user_context); return (id_type == SILC_ID_CLIENT ? @@ -615,14 +615,14 @@ bool silc_hash_id_compare(void *key1, void *key2, void *user_context) /* Compare two Client ID's entirely and not just the hash from the ID. */ -bool silc_hash_client_id_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_client_id_compare(void *key1, void *key2, void *user_context) { return SILC_ID_COMPARE_TYPE(key1, key2, SILC_ID_CLIENT); } /* Compares binary data. May be used as SilcHashTable comparison function. */ -bool silc_hash_data_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_data_compare(void *key1, void *key2, void *user_context) { SilcUInt32 len = SILC_PTR_TO_32(user_context); return !memcmp(key1, key2, len); @@ -630,7 +630,7 @@ bool silc_hash_data_compare(void *key1, void *key2, void *user_context) /* Compares UTF-8 string. */ -bool silc_hash_utf8_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context) { int l1 = strlen((char *)key1); int l2 = strlen((char *)key2); @@ -642,7 +642,7 @@ bool silc_hash_utf8_compare(void *key1, void *key2, void *user_context) /* Compares two SILC Public keys. It may be used as SilcHashTable comparison function. */ -bool silc_hash_public_key_compare(void *key1, void *key2, void *user_context) +SilcBool silc_hash_public_key_compare(void *key1, void *key2, void *user_context) { return silc_pkcs_public_key_compare(key1, key2); } @@ -801,7 +801,7 @@ char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len) /* Return TRUE if the `data' is ASCII string. */ -bool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len) +SilcBool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len) { int i; @@ -815,7 +815,7 @@ bool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len) /* Parses SILC protocol style version string. */ -bool silc_parse_version_string(const char *version, +SilcBool silc_parse_version_string(const char *version, SilcUInt32 *protocol_version, char **protocol_version_string, SilcUInt32 *software_version, @@ -911,7 +911,7 @@ SilcUInt32 silc_version_to_num(const char *version) /* Displays input prompt on command line and takes input data from user */ -char *silc_get_input(const char *prompt, bool echo_off) +char *silc_get_input(const char *prompt, SilcBool echo_off) { #ifdef SILC_UNIX int fd; @@ -1000,7 +1000,7 @@ char *silc_get_input(const char *prompt, bool echo_off) /* Return mode list */ -bool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, +SilcBool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, SilcUInt32 **list) { int i; @@ -1190,7 +1190,7 @@ const char *silc_get_command_name(unsigned char command) /* Return TRUE if `smaller' is smaller than `bigger'. */ -bool silc_compare_timeval(struct timeval *smaller, +SilcBool silc_compare_timeval(struct timeval *smaller, struct timeval *bigger) { if ((smaller->tv_sec < bigger->tv_sec) || diff --git a/lib/silcutil/silcutil.h b/lib/silcutil/silcutil.h index 72aac63e..4ab33142 100644 --- a/lib/silcutil/silcutil.h +++ b/lib/silcutil/silcutil.h @@ -78,40 +78,40 @@ const char *silc_get_time(SilcUInt32 timeval); * * SYNOPSIS * - * bool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size); + * SilcBool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size); * * DESCRIPTION * * Converts string to capital characters. * ***/ -bool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size); +SilcBool silc_to_upper(const char *string, char *dest, SilcUInt32 dest_size); /****f* silcutil/SilcUtilAPI/silc_to_lower * * SYNOPSIS * - * bool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size); + * SilcBool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size); * * DESCRIPTION * * Converts string to capital characters. * ***/ -bool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size); +SilcBool silc_to_lower(const char *string, char *dest, SilcUInt32 dest_size); /****f* silcutil/SilcUtilAPI/silc_parse_userfqdn * * SYNOPSIS * - * bool silc_parse_userfqdn(const char *string, char **left, char **right); + * SilcBool silc_parse_userfqdn(const char *string, char **left, char **right); * * DESCRIPTION * * Parse userfqdn string which is in user@fqdn format. * ***/ -bool silc_parse_userfqdn(const char *string, char **left, char **right); +SilcBool silc_parse_userfqdn(const char *string, char **left, char **right); /****f* silcutil/SilcUtilAPI/silc_parse_command_line * @@ -293,7 +293,7 @@ SilcUInt32 silc_hash_public_key(void *key, void *user_context); * * SYNOPSIS * - * bool silc_hash_string_compare(void *key1, void *key2, + * SilcBool silc_hash_string_compare(void *key1, void *key2, * void *user_context); * * DESCRIPTION @@ -302,13 +302,13 @@ SilcUInt32 silc_hash_public_key(void *key, void *user_context); * function. * ***/ -bool silc_hash_string_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_string_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_hash_id_compare * * SYNOPSIS * - * bool silc_hash_id_compare(void *key1, void *key2, void *user_context); + * SilcBool silc_hash_id_compare(void *key1, void *key2, void *user_context); * * DESCRIPTION * @@ -317,39 +317,39 @@ bool silc_hash_string_compare(void *key1, void *key2, void *user_context); * part of the Client ID. Other ID's are fully compared. * ***/ -bool silc_hash_id_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_id_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_hash_client_id_compare * * SYNOPSIS * - * bool silc_hash_client_id_compare(void *key1, void *key2, void *user_context); + * SilcBool silc_hash_client_id_compare(void *key1, void *key2, void *user_context); * * DESCRIPTION * * Compare two Client ID's entirely and not just the hash from the ID. * ***/ -bool silc_hash_client_id_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_client_id_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_hash_data_compare * * SYNOPSIS * - * bool silc_hash_data_compare(void *key1, void *key2, void *user_context); + * SilcBool silc_hash_data_compare(void *key1, void *key2, void *user_context); * * DESCRIPTION * * Compares binary data. May be used as SilcHashTable comparison function. * ***/ -bool silc_hash_data_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_data_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_hash_utf8_compare * * SYNOPSIS * - * bool silc_hash_utf8_compare(void *key1, void *key2, void *user_context); + * SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context); * * DESCRIPTION * @@ -357,13 +357,13 @@ bool silc_hash_data_compare(void *key1, void *key2, void *user_context); * expected. May be used as SilcHashTable comparison function. * ***/ -bool silc_hash_utf8_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_hash_public_key_compare * * SYNOPSIS * - * bool silc_hash_public_key_compare(void *key1, void *key2, + * SilcBool silc_hash_public_key_compare(void *key1, void *key2, * void *user_context); * * DESCRIPTION @@ -372,7 +372,7 @@ bool silc_hash_utf8_compare(void *key1, void *key2, void *user_context); * comparison function. * ***/ -bool silc_hash_public_key_compare(void *key1, void *key2, void *user_context); +SilcBool silc_hash_public_key_compare(void *key1, void *key2, void *user_context); /****f* silcutil/SilcUtilAPI/silc_client_chmode * @@ -433,7 +433,7 @@ char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len); * * SYNOPSIS * - * bool silc_string_is_ascii(const unsigned char *data, + * SilcBool silc_string_is_ascii(const unsigned char *data, * SilcUInt32 data_len); * * DESCRIPTION @@ -441,13 +441,13 @@ char *silc_fingerprint(const unsigned char *data, SilcUInt32 data_len); * Return TRUE if the `data' is ASCII string. * ***/ -bool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len); +SilcBool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len); /****f* silcutil/SilcUtilAPI/silc_parse_version_string * * SYNOPSIS * - * bool silc_parse_version_string(const char *version, + * SilcBool silc_parse_version_string(const char *version, * SilcUInt32 *protocol_version, * char **protocol_version_string, * SilcUInt32 *software_version, @@ -459,7 +459,7 @@ bool silc_string_is_ascii(const unsigned char *data, SilcUInt32 data_len); * Parses SILC protocol style version string. * ***/ -bool silc_parse_version_string(const char *version, +SilcBool silc_parse_version_string(const char *version, SilcUInt32 *protocol_version, char **protocol_version_string, SilcUInt32 *software_version, @@ -483,14 +483,14 @@ SilcUInt32 silc_version_to_num(const char *version); * * SYNOPSIS * - * char *silc_get_input(const char *prompt, bool echo_off); + * char *silc_get_input(const char *prompt, SilcBool echo_off); * * DESCRIPTION * * Displays input prompt on command line and takes input data from user. * ***/ -char *silc_get_input(const char *prompt, bool echo_off); +char *silc_get_input(const char *prompt, SilcBool echo_off); /* System dependant prototypes */ @@ -512,7 +512,7 @@ int silc_gettimeofday(struct timeval *p); * * SYNOPSIS * - * bool silc_compare_timeval(struct timeval *smaller, + * SilcBool silc_compare_timeval(struct timeval *smaller, * struct timeval *bigger) * * DESCRIPTION @@ -521,7 +521,7 @@ int silc_gettimeofday(struct timeval *p); * time value is smaller than the second time value. * ***/ -bool silc_compare_timeval(struct timeval *smaller, +SilcBool silc_compare_timeval(struct timeval *smaller, struct timeval *bigger); /****f* silcutil/SilcUtilAPI/silc_string_regexify @@ -609,7 +609,7 @@ char *silc_get_real_name(); * * SYNOPSIS * - * bool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, + * SilcBool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, * SilcUInt32 **list); * * DESCRIPTION @@ -620,7 +620,7 @@ char *silc_get_real_name(); * there is error parsing the list. * ***/ -bool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, +SilcBool silc_get_mode_list(SilcBuffer mode_list, SilcUInt32 mode_list_count, SilcUInt32 **list); /****f* silcutil/SilcUtilAPI/silc_get_status_message diff --git a/lib/silcutil/silcvcard.c b/lib/silcutil/silcvcard.c index 47a26c61..4509f280 100644 --- a/lib/silcutil/silcvcard.c +++ b/lib/silcutil/silcvcard.c @@ -168,11 +168,11 @@ do { \ /* Decode VCard */ -bool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, +SilcBool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, SilcVCard vcard) { unsigned char *val; - bool has_begin = FALSE, has_end = FALSE; + SilcBool has_begin = FALSE, has_end = FALSE; int len, i, off = 0; val = (unsigned char *)data; diff --git a/lib/silcutil/silcvcard.h b/lib/silcutil/silcvcard.h index 7f9666c5..e0ee3a83 100644 --- a/lib/silcutil/silcvcard.h +++ b/lib/silcutil/silcvcard.h @@ -97,7 +97,7 @@ typedef struct { char *note; /* a note, string */ char *rev; /* revision of card, UTC date string */ - bool dynamic; /* TRUE when dynamically allocated */ + SilcBool dynamic; /* TRUE when dynamically allocated */ } SilcVCardStruct, *SilcVCard; /***/ @@ -122,7 +122,7 @@ unsigned char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len); * * SYNOPSIS * - * bool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, + * SilcBool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, * SilcVCard vcard); * * DESCRIPTION @@ -134,7 +134,7 @@ unsigned char *silc_vcard_encode(SilcVCard vcard, SilcUInt32 *vcard_len); * is freed with silc_vcard_free function when it is not needed anymore. * ***/ -bool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, +SilcBool silc_vcard_decode(const unsigned char *data, SilcUInt32 data_len, SilcVCard vcard); /****f* silcutil/SilcVCard/silc_vcard_alloc diff --git a/lib/silcutil/stacktrace.c b/lib/silcutil/stacktrace.c index 38aae954..c4bf086a 100644 --- a/lib/silcutil/stacktrace.c +++ b/lib/silcutil/stacktrace.c @@ -23,8 +23,8 @@ static void *st_blocks = NULL; static unsigned long st_blocks_count = 0; -static bool dump = FALSE; -static bool malloc_check = FALSE; +static SilcBool dump = FALSE; +static SilcBool malloc_check = FALSE; #define SILC_ST_DEPTH 10 diff --git a/lib/silcutil/tests/test_silcasync.c b/lib/silcutil/tests/test_silcasync.c index 836daecb..0e11b868 100644 --- a/lib/silcutil/tests/test_silcasync.c +++ b/lib/silcutil/tests/test_silcasync.c @@ -14,7 +14,7 @@ typedef struct { SilcAsyncOperation op; Callback cb; void *cb_context; - bool aborted; + SilcBool aborted; } *Foo; SILC_FSM_STATE(test_st_start); @@ -112,7 +112,7 @@ static void destructor(SilcFSM fsm, void *fsm_context, int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcFSM fsm; Foo f; diff --git a/lib/silcutil/tests/test_silcfsm.c b/lib/silcutil/tests/test_silcfsm.c index 9b735007..be2cd48d 100644 --- a/lib/silcutil/tests/test_silcfsm.c +++ b/lib/silcutil/tests/test_silcfsm.c @@ -12,13 +12,13 @@ typedef struct FooStruct *Foo; typedef struct { SilcFSMThreadStruct thread; SilcFSMSemaStruct sema; - bool finished; + SilcBool finished; int rounds; Foo f; } T; struct FooStruct { - bool error; + SilcBool error; SilcFSM fsm; SilcFSMThreadStruct thread; int timeout; @@ -374,7 +374,7 @@ static void destructor(SilcFSM fsm, void *fsm_context, int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcSchedule schedule; SilcFSM fsm; Foo f; diff --git a/lib/silcutil/tests/test_silchashtable.c b/lib/silcutil/tests/test_silchashtable.c index 11ac71fc..380f6182 100644 --- a/lib/silcutil/tests/test_silchashtable.c +++ b/lib/silcutil/tests/test_silchashtable.c @@ -7,8 +7,8 @@ typedef struct entry_struct { int val; } *entry; -bool dump = FALSE; -bool auto_rehash = TRUE; +SilcBool dump = FALSE; +SilcBool auto_rehash = TRUE; int count = 2000; SilcHashTable t = NULL; @@ -18,7 +18,7 @@ SilcUInt32 hash_entry(void *key, void *user_context) return e->val + silc_hash_string(e->name, NULL); } -bool hash_compare(void *key1, void *key2, void *user_context) +SilcBool hash_compare(void *key1, void *key2, void *user_context) { entry e = key1; entry e2 = key2; @@ -38,7 +38,7 @@ void hash_destructor(void *key, void *context, void *user_context) silc_free(e); } -bool add_entries() +SilcBool add_entries() { entry e; int i; @@ -60,7 +60,7 @@ bool add_entries() return TRUE; } -bool del_entries_with_list() +SilcBool del_entries_with_list() { SilcHashTableList htl; entry e; @@ -90,7 +90,7 @@ void del_foreach(void *key, void *context, void *user_context) silc_hash_table_del(t, key); } -bool del_n_entries_foreach() +SilcBool del_n_entries_foreach() { struct entry_struct f; int i; @@ -108,14 +108,14 @@ bool del_n_entries_foreach() return TRUE; } -bool del_entries_foreach() +SilcBool del_entries_foreach() { SILC_LOG_DEBUG(("Deleting all entries with foreach")); silc_hash_table_foreach(t, del_foreach, NULL); return TRUE; } -bool alloc_table() +SilcBool alloc_table() { SILC_LOG_DEBUG(("Allocating hash table with %d entries (%s)", count, auto_rehash ? "auto rehash" : "no auto rehash")); @@ -137,7 +137,7 @@ bool alloc_table() return TRUE; } -bool delete_table_with_list() +SilcBool delete_table_with_list() { SILC_LOG_DEBUG(("Deleting entries with SilcHashTableList")); @@ -158,7 +158,7 @@ bool delete_table_with_list() return TRUE; } -bool find_entries() +SilcBool find_entries() { struct entry_struct f; entry e; @@ -184,12 +184,12 @@ bool find_entries() return TRUE; } -bool dump_table() +SilcBool dump_table() { SilcHashTableList htl; entry e; char *name; - bool dumpped = FALSE; + SilcBool dumpped = FALSE; SILC_LOG_DEBUG(("Dumping hash table entries")); @@ -207,7 +207,7 @@ bool dump_table() int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; int i; if (argc > 1 && !strcmp(argv[1], "-d")) { diff --git a/lib/silcutil/tests/test_silclist.c b/lib/silcutil/tests/test_silclist.c index d8ba2715..da34e1b9 100644 --- a/lib/silcutil/tests/test_silclist.c +++ b/lib/silcutil/tests/test_silclist.c @@ -10,7 +10,7 @@ struct foo { int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcList list; struct foo *f, *f1, *f2, *f3, *f4; diff --git a/lib/silcutil/tests/test_silcmime.c b/lib/silcutil/tests/test_silcmime.c index 01e7fdd1..a514d55b 100644 --- a/lib/silcutil/tests/test_silcmime.c +++ b/lib/silcutil/tests/test_silcmime.c @@ -3,29 +3,9 @@ #include "silcincludes.h" #include "silcmime.h" -struct foo { - int i; - struct foo *next; -}; - -static void ass_complete(SilcMime mime, void *context) -{ - unsigned char *enc; - SilcUInt32 enc_len; - - SILC_LOG_DEBUG(("Defragmentation completed")); - SILC_LOG_DEBUG(("Encoding MIME context")); - enc = silc_mime_encode(mime, &enc_len); - if (!enc) - SILC_LOG_DEBUG(("Error encoding")); - SILC_LOG_DEBUG(("Encoded MIME message: \n%s", enc)); - silc_free(enc); - silc_mime_free(mime); -} - int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcMime mime, part, part2; SilcMimeAssembler ass; int i; @@ -34,6 +14,7 @@ int main(int argc, char **argv) SilcUInt32 enc_len; SilcDList frag; SilcBuffer buf; + const char *mtype; if (argc > 1 && !strcmp(argv[1], "-d")) { silc_log_debug(TRUE); @@ -173,9 +154,10 @@ int main(int argc, char **argv) SILC_LOG_DEBUG(("Re-encoded MIME message: \n%s", enc)); silc_free(enc); SILC_LOG_DEBUG(("Get multiparts")); - frag = silc_mime_get_multiparts(mime); + frag = silc_mime_get_multiparts(mime, &mtype); if (!frag) goto err; + SILC_LOG_DEBUG(("Multipart type '%s'", mtype)); silc_dlist_start(frag); while ((part = silc_dlist_get(frag)) != SILC_LIST_END) { SILC_LOG_DEBUG(("Encoding MIME part")); @@ -191,7 +173,7 @@ int main(int argc, char **argv) /* Fragmentation test */ SILC_LOG_DEBUG(("Allocating MIME assembler")); - ass = silc_mime_assembler_alloc(ass_complete, NULL); + ass = silc_mime_assembler_alloc(); if (!ass) goto err; SILC_LOG_DEBUG(("Allocating MIME message context")); @@ -224,14 +206,23 @@ int main(int argc, char **argv) goto err; silc_dlist_start(frag); while ((buf = silc_dlist_get(frag)) != SILC_LIST_END) - SILC_LOG_DEBUG(("Fragment \n%s", buf->data, buf->len)); + SILC_LOG_DEBUG(("Fragment \n%s", buf->data, silc_buffer_len(buf))); SILC_LOG_DEBUG(("Defragment")); silc_dlist_start(frag); while ((buf = silc_dlist_get(frag)) != SILC_LIST_END) { - part = silc_mime_decode(buf->data, buf->len); + part = silc_mime_decode(buf->data, silc_buffer_len(buf)); if (!silc_mime_is_partial(part)) goto err; - silc_mime_assemble(ass, part); + part = silc_mime_assemble(ass, part); + if (part) { + SILC_LOG_DEBUG(("Defragmentation completed")); + SILC_LOG_DEBUG(("Encoding MIME context")); + enc = silc_mime_encode(mime, &enc_len); + if (!enc) + SILC_LOG_DEBUG(("Error encoding")); + SILC_LOG_DEBUG(("Encoded MIME message: \n%s", enc)); + silc_free(enc); + } } silc_mime_partial_free(frag); silc_mime_assembler_free(ass); diff --git a/lib/silcutil/tests/test_silcnet.c b/lib/silcutil/tests/test_silcnet.c index 95c8e986..f678b255 100644 --- a/lib/silcutil/tests/test_silcnet.c +++ b/lib/silcutil/tests/test_silcnet.c @@ -13,7 +13,7 @@ typedef struct { SilcNetStatus client_status; SilcStream server_stream; SilcNetStatus server_status; - bool success; + SilcBool success; } *Foo; SILC_FSM_STATE(test_st_start); @@ -161,7 +161,7 @@ static void destructor(SilcFSM fsm, void *fsm_context, int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcFSM fsm; Foo f; diff --git a/lib/silcutil/tests/test_silcschedule.c b/lib/silcutil/tests/test_silcschedule.c index 9aa575fd..eaf74cb8 100644 --- a/lib/silcutil/tests/test_silcschedule.c +++ b/lib/silcutil/tests/test_silcschedule.c @@ -49,7 +49,7 @@ SILC_TASK_CALLBACK(start) int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; if (argc > 1 && !strcmp(argv[1], "-d")) { silc_log_debug(TRUE); diff --git a/lib/silcutil/tests/test_silcstack.c b/lib/silcutil/tests/test_silcstack.c index 3b917b0a..3a50a1cd 100644 --- a/lib/silcutil/tests/test_silcstack.c +++ b/lib/silcutil/tests/test_silcstack.c @@ -6,7 +6,7 @@ int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; SilcStack stack; void *ptr, *ptr2; int i; diff --git a/lib/silcutil/tests/test_silcstringprep.c b/lib/silcutil/tests/test_silcstringprep.c index affbb4ee..4810cf9a 100644 --- a/lib/silcutil/tests/test_silcstringprep.c +++ b/lib/silcutil/tests/test_silcstringprep.c @@ -70,7 +70,7 @@ const test_st tests_norm[] = { int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; int i, enc; unsigned char *out = NULL; SilcUInt32 out_len; diff --git a/lib/silcutil/tests/test_silcstrutil.c b/lib/silcutil/tests/test_silcstrutil.c index 34812620..dd3354a6 100644 --- a/lib/silcutil/tests/test_silcstrutil.c +++ b/lib/silcutil/tests/test_silcstrutil.c @@ -50,7 +50,7 @@ utf8fail(30, "\xf0\x20\xf9\x20\xfa\x20\xfb\x20", 8); int main(int argc, char **argv) { - bool success = FALSE; + SilcBool success = FALSE; unsigned char *s1, *s2, *s3, *s4; int l, opt; diff --git a/lib/silcutil/unix/silcunixmutex.c b/lib/silcutil/unix/silcunixmutex.c index 1336eaee..f3681165 100644 --- a/lib/silcutil/unix/silcunixmutex.c +++ b/lib/silcutil/unix/silcunixmutex.c @@ -30,7 +30,7 @@ struct SilcMutexStruct { #endif /* SILC_THREADS */ }; -bool silc_mutex_alloc(SilcMutex *mutex) +SilcBool silc_mutex_alloc(SilcMutex *mutex) { #ifdef SILC_THREADS *mutex = silc_calloc(1, sizeof(**mutex)); diff --git a/lib/silcutil/unix/silcunixnet.c b/lib/silcutil/unix/silcunixnet.c index be2d8760..654d8bbe 100644 --- a/lib/silcutil/unix/silcunixnet.c +++ b/lib/silcutil/unix/silcunixnet.c @@ -36,7 +36,7 @@ typedef union { #endif } SilcSockaddr; -static bool silc_net_set_sockaddr(SilcSockaddr *addr, const char *ip_addr, +static SilcBool silc_net_set_sockaddr(SilcSockaddr *addr, const char *ip_addr, int port) { int len; @@ -120,7 +120,7 @@ SILC_TASK_CALLBACK(silc_net_accept) SilcNetServer silc_net_create_server(const char **local_ip_addr, SilcUInt32 local_ip_count, - int port, bool require_fqdn, SilcSchedule schedule, + int port, SilcBool require_fqdn, SilcSchedule schedule, SilcNetCallback callback, void *context) { SilcNetServer netserver = NULL; @@ -273,7 +273,7 @@ SILC_FSM_STATE(silc_net_connect_st_start) SilcNetConnect conn = fsm_context; int sock, rval; SilcSockaddr desthost; - bool prefer_ipv6 = TRUE; + SilcBool prefer_ipv6 = TRUE; if (conn->aborted) { /** Aborted */ @@ -572,7 +572,7 @@ int silc_net_set_socket_nonblock(int sock) /* Converts the IP number string from numbers-and-dots notation to binary form. */ -bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) +SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) { int ret = 0; diff --git a/lib/silcutil/unix/silcunixschedule.c b/lib/silcutil/unix/silcunixschedule.c index 8b1ffa0e..c0393c73 100644 --- a/lib/silcutil/unix/silcunixschedule.c +++ b/lib/silcutil/unix/silcunixschedule.c @@ -32,7 +32,7 @@ typedef struct { SilcUInt32 signal; SilcTaskCallback callback; void *context; - bool call; + SilcBool call; } SilcUnixSignal; /* Internal context. */ diff --git a/lib/silcutil/unix/silcunixsocketstream.c b/lib/silcutil/unix/silcunixsocketstream.c index 6fb8719b..10e6e841 100644 --- a/lib/silcutil/unix/silcunixsocketstream.c +++ b/lib/silcutil/unix/silcunixsocketstream.c @@ -177,7 +177,7 @@ int silc_socket_stream_write(SilcStream stream, const unsigned char *data, #if 0 /* Returns human readable socket error message */ -bool silc_socket_get_error(SilcStream sock, char *error, +SilcBool silc_socket_get_error(SilcStream sock, char *error, SilcUInt32 error_len) { char *err; diff --git a/lib/silcutil/unix/silcunixthread.c b/lib/silcutil/unix/silcunixthread.c index 94f23f16..80e1a8e6 100644 --- a/lib/silcutil/unix/silcunixthread.c +++ b/lib/silcutil/unix/silcunixthread.c @@ -21,7 +21,7 @@ #include "silcincludes.h" SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable) + SilcBool waitable) { #ifdef SILC_THREADS pthread_attr_t attr; @@ -83,7 +83,7 @@ SilcThread silc_thread_self(void) #endif } -bool silc_thread_wait(SilcThread thread, void **exit_value) +SilcBool silc_thread_wait(SilcThread thread, void **exit_value) { #ifdef SILC_THREADS SILC_LOG_DEBUG(("Waiting for thread %p", thread)); diff --git a/lib/silcutil/win32/silcwin32mutex.c b/lib/silcutil/win32/silcwin32mutex.c index 09e8e90a..9037505a 100644 --- a/lib/silcutil/win32/silcwin32mutex.c +++ b/lib/silcutil/win32/silcwin32mutex.c @@ -30,7 +30,7 @@ struct SilcMutexStruct { #endif /* SILC_THREADS */ }; -bool silc_mutex_alloc(SilcMutex *mutex) +SilcBool silc_mutex_alloc(SilcMutex *mutex) { #ifdef SILC_THREADS *mutex = silc_calloc(1, sizeof(**mutex)); diff --git a/lib/silcutil/win32/silcwin32net.c b/lib/silcutil/win32/silcwin32net.c index 0bcd038d..6cdad249 100644 --- a/lib/silcutil/win32/silcwin32net.c +++ b/lib/silcutil/win32/silcwin32net.c @@ -223,7 +223,7 @@ void silc_net_close_connection(int sock) /* Converts the IP number string from numbers-and-dots notation to binary form. */ -bool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) +SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len) { unsigned long ret; @@ -246,7 +246,7 @@ int silc_net_set_socket_nonblock(int sock) /* Init Winsock2. */ -bool silc_net_win32_init(void) +SilcBool silc_net_win32_init(void) { int ret, sopt = SO_SYNCHRONOUS_NONALERT; WSADATA wdata; diff --git a/lib/silcutil/win32/silcwin32sockconn.c b/lib/silcutil/win32/silcwin32sockconn.c index abc35237..8adef30b 100644 --- a/lib/silcutil/win32/silcwin32sockconn.c +++ b/lib/silcutil/win32/silcwin32sockconn.c @@ -129,7 +129,7 @@ int silc_socket_read(SilcSocketConnection sock) /* Returns human readable socket error message */ -bool silc_socket_get_error(SilcSocketConnection sock, char *error, +SilcBool silc_socket_get_error(SilcSocketConnection sock, char *error, SilcUInt32 error_len) { /* XXX TODO */ diff --git a/lib/silcutil/win32/silcwin32thread.c b/lib/silcutil/win32/silcwin32thread.c index 7d5c62d2..1fe4bb94 100644 --- a/lib/silcutil/win32/silcwin32thread.c +++ b/lib/silcutil/win32/silcwin32thread.c @@ -27,7 +27,7 @@ typedef struct { HANDLE thread; SilcThreadStart start_func; void *context; - bool waitable; + SilcBool waitable; } *SilcWin32Thread; static DWORD silc_thread_tls; @@ -48,7 +48,7 @@ unsigned __stdcall silc_thread_win32_start(void *context) #endif SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable) + SilcBool waitable) { #ifdef SILC_THREADS SilcWin32Thread thread; @@ -119,7 +119,7 @@ SilcThread silc_thread_self(void) #endif } -bool silc_thread_wait(SilcThread thread, void **exit_value) +SilcBool silc_thread_wait(SilcThread thread, void **exit_value) { #ifdef SILC_THREADS SilcWin32Thread self = (SilcWin32Thread)thread; -- 2.24.0