bool -> SilcBool.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 26 Nov 2005 15:44:49 +0000 (15:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 26 Nov 2005 15:44:49 +0000 (15:44 +0000)
74 files changed:
lib/silcclient/silcclient.h
lib/silcmath/mp_tma.c
lib/silcmath/silcmath.h
lib/silcmath/silcmp.h
lib/silcmath/silcprimegen.c
lib/silcske/silcske.c
lib/silcske/silcske.h
lib/silcutil/beos/silcbeosmutex.c
lib/silcutil/beos/silcbeossockconn.c
lib/silcutil/beos/silcbeosthread.c
lib/silcutil/os2/silcos2mutex.c
lib/silcutil/os2/silcos2net.c
lib/silcutil/os2/silcos2sockconn.c
lib/silcutil/os2/silcos2thread.c
lib/silcutil/silcapputil.c
lib/silcutil/silcapputil.h
lib/silcutil/silcasync.c
lib/silcutil/silcasync.h
lib/silcutil/silcconfig.c
lib/silcutil/silcconfig.h
lib/silcutil/silcfdstream.c
lib/silcutil/silcfdstream.h
lib/silcutil/silcfsm.c
lib/silcutil/silcfsm.h
lib/silcutil/silcfsm_i.h
lib/silcutil/silchashtable.c
lib/silcutil/silchashtable.h
lib/silcutil/silclog.c
lib/silcutil/silclog.h
lib/silcutil/silcmime.c
lib/silcutil/silcmime.h
lib/silcutil/silcmutex.h
lib/silcutil/silcnet.c
lib/silcutil/silcnet.h
lib/silcutil/silcschedule.c
lib/silcutil/silcschedule.h
lib/silcutil/silcsocketstream.c
lib/silcutil/silcsocketstream.h
lib/silcutil/silcstack.c
lib/silcutil/silcstack_i.h
lib/silcutil/silcstream.c
lib/silcutil/silcstream.h
lib/silcutil/silcstrutil.c
lib/silcutil/silcstrutil.h
lib/silcutil/silcthread.h
lib/silcutil/silctime.c
lib/silcutil/silctime.h
lib/silcutil/silctypes.h
lib/silcutil/silcutf8.c
lib/silcutil/silcutf8.h
lib/silcutil/silcutil.c
lib/silcutil/silcutil.h
lib/silcutil/silcvcard.c
lib/silcutil/silcvcard.h
lib/silcutil/stacktrace.c
lib/silcutil/tests/test_silcasync.c
lib/silcutil/tests/test_silcfsm.c
lib/silcutil/tests/test_silchashtable.c
lib/silcutil/tests/test_silclist.c
lib/silcutil/tests/test_silcmime.c
lib/silcutil/tests/test_silcnet.c
lib/silcutil/tests/test_silcschedule.c
lib/silcutil/tests/test_silcstack.c
lib/silcutil/tests/test_silcstringprep.c
lib/silcutil/tests/test_silcstrutil.c
lib/silcutil/unix/silcunixmutex.c
lib/silcutil/unix/silcunixnet.c
lib/silcutil/unix/silcunixschedule.c
lib/silcutil/unix/silcunixsocketstream.c
lib/silcutil/unix/silcunixthread.c
lib/silcutil/win32/silcwin32mutex.c
lib/silcutil/win32/silcwin32net.c
lib/silcutil/win32/silcwin32sockconn.c
lib/silcutil/win32/silcwin32thread.c

index d68d6a6fa4479499814a70d0d8539ffe94c2daa6..27698faed2218472102ecf86aa4893af597e2541 100644 (file)
@@ -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,
index 1cae1cd819a05b85576421f6c5f1ab25d4190dff..bcfa029ba7a4f9c39eefd964e5e5f3571ada5510 100644 (file)
@@ -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);
index e1bb9945aaaa5e5334653f470258727204d14a0a..b1b59d19440f6500e40381dc2cf4fc7d2d05167e 100644 (file)
@@ -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
index 22ad1926e8671030f37aa07123ce7e55a975bba2..4b7bff9fdb9a537b86cf32bf55f510367ca12ebf 100644 (file)
@@ -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
  *
index 80bbf54eaea4a0124df4ddac6f1b3f1a56133dd8..4fb83231c3aab547fddf3a1b8e0c678b61ca4133 100644 (file)
@@ -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;
index 7c04aa1fc56ab3d7bc4bf4a0a8794af855d4654e..cb4713708ae0305eb360d7ec167310bee3d46f41 100644 (file)
@@ -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,
index 389b5532237705efcc76c354205537692a52b5fc..e1c25b8539afac74ba0c4ae0044bdf329a1820f4 100644 (file)
@@ -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,
index fc11e00d6e62c5091bd02e89558edc5498343ec6..6e825ea75bc30f405178389eddb7e1687a92069e 100644 (file)
@@ -28,7 +28,7 @@ struct SilcMutexStruct {
   sem_id sema;
 };
 
-bool silc_mutex_alloc(SilcMutex *mutex)
+SilcBool silc_mutex_alloc(SilcMutex *mutex)
 {
   int ret;
 
index 0786f8b01cf7941b1e81e00c83328be106c1eb95..f3ad4cae3dcb0c941ce61f2a290527b9290f1f59 100644 (file)
@@ -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;
index 48e7e7e931f92eb15370c18cbf578a8d507e42e1..909a3ac726a29b0f9a8cb601a5e789ede5c17c6d 100644 (file)
@@ -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;
index a798145336d27d7c0f995f526da87da0a471d6ae..ba5e36f094863b27548ee6ba1b0dfb7644b23423 100644 (file)
@@ -28,7 +28,7 @@ struct SilcMutexStruct {
   HMTX mutex;
 };
 
-bool silc_mutex_alloc(SilcMutex *mutex)
+SilcBool silc_mutex_alloc(SilcMutex *mutex)
 {
   char name[64];
 
index 855fb0f4aa7e2ad18f66a5648bf5613a3cabc151..9ec496d18277fc4da6dbf36d5bb22a5aca237f98 100644 (file)
@@ -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;
 
index 24d939bee35be8f16bbe3a2380795283f5d1fca7..dccc2abc85cce79e6e7812cef2d92c6d1f89b9ea 100644 (file)
@@ -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 */
index c078807ad9482cefd4d0e27f4316a8f76c6848ec..eb2093672520ffdea9f51f3a27bd79a439401c18 100644 (file)
@@ -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
 
index 415d591fd22691142a3d606bc02deff916ce7554..606f2215539d25395c629cdac6c590eefdfc44df 100644 (file)
@@ -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;
index 4114f56657a7f8bd0e368bfeb843d17d4391815f..8b9039313f17acec81de992019a38708b01e17f9 100644 (file)
@@ -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);
 
index fc0e2194a6d04637a8de2940261ed6d76ccc19c6..d1552cae52d67acda487c199bcec953b85a7d7ef 100644 (file)
@@ -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)
index b60c2b97c3ab0f3f802e715e8ee5258a40d1ad68..650419a836646fac93a9cbf448817373a390ae2c 100644 (file)
@@ -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);
index 032b361e8019209bf651185c1d5dad4730b6bdc4..697aae14adf39ec9a89bf10979757bda538d2016 100644 (file)
@@ -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;
index 59deac80b1a30a00da3802aa5963dc05611bc81b..c58bd28a32c4cbe6901036814126c4c697146324 100644 (file)
@@ -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
index 258b82d503c10714559f0e4c83c721b9ec4b591d..d1fc6b534dd942660b52cd8e7cb46b36d492476b 100644 (file)
@@ -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;
 
index b83377bf67aeb3c900ffda419a5bc7fafd58d332..3acb8cecaf78a135f1c50ddb05c781d818b5014f 100644 (file)
@@ -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
  *
index 0097ac51e0e9bf586429c7e749aa94188311cbfb..4d09205db4e9043e5eac1b0679d5c57e2b156701 100644 (file)
@@ -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)
index 20f8e6a75ab0e0e7286a777e1f04a48d9dcb26f8..eca7440929ca0a57fa195a1317c3c9457adf1136 100644 (file)
@@ -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
  *
index 4c27acb8d5c3cbfc02303c197ba84fbe4f3462a0..455d8b9975d5b2ffe9558d593bfadc863669fbbd 100644 (file)
@@ -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);
index 192204a4d08e90781eb76a6d2cd47d986dd63de1..03b1ac796505d34693c930349d779c76b0d3477a 100644 (file)
@@ -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;
 
index 612038034c9f4c38414c0e8e2f9e75cd4f87d860..012ce5ee36c121f3aecd0e7baadaf2fc0a3b5929 100644 (file)
@@ -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,
index 453049a13dfc3f8ddf231169e1e3f66bb953b7a6..0f017449d195e9eb2af2950ddc039b12dcda157b 100644 (file)
@@ -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;
 }
index af8358501e4d3bc849d6900ef031f02492b85546..acf6ed3342910f1ec51e36ad94e797db30afa5f4 100644 (file)
@@ -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 */
index d347d7350490f4f9a8b967d24c5b6aa0045abe71..d7d2ddc24b727d632abea52f0d150e665446f4b0 100644 (file)
@@ -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;
index 90684e17986e3f8fe9915d2542d4ec0b3b622bbe..62ebdefcef82efb8631863f21c06dd58b019c102 100644 (file)
@@ -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
  *
index 19b4863f61790e8be92b5f40b67cd27b880cc0e9..c92a23c53613bb56fcdfa194b36a0f408b11497f 100644 (file)
@@ -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
  *
index d778135107a8baed4365faf4e69eedb470e702de..c4686c6ef791a20e82b17d0b6f7372b1e415f4e3 100644 (file)
@@ -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;
index f5525d077e2c05c8944f1dccf72eccf831d8116f..08168fa31f794e90b6ffcec3e4dafcf09d175798 100644 (file)
@@ -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
  *
index f05902259eae347d379cf46ff0d36d35e8362d6f..c7ce66dcc190ef795fbfb96ebc93db1c18476345 100644 (file)
@@ -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;
 
index 7d8abc98bc34fa0847d6a1dc3174a24fc2429d21..ec456dd8bf17a037edb3fe2913eab25807dd0c4a 100644 (file)
@@ -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
  *
index e3521a1f48d3c65f3ccdc0cb3487a78997be111d..815bbdb1796fc9c43e9d798b127e9cc75c2c66cb 100644 (file)
@@ -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;
 
index c75394a01d431ccac2c69c5fa4da1601398273e3..dec1401912fbe6dd614aecba3997bbfd32399e6f 100644 (file)
@@ -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,
index 30565e1fb4a759b87869d9d7afd1847379483508..387f0a263d7efe0a26654d304c0fb6064815fbac 100644 (file)
@@ -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;
index 962821b595350ff09e1ff46e2de4a80b7504057f..33c90323a16828c8df404afb0de9cba8c52d4ccd 100644 (file)
@@ -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. */
index c32e15a4075be4b63f879f6cdb3c9fb0a95fd6f8..ca293fca1848c59440159a1c59bfbbd32a60bc10 100644 (file)
@@ -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);
index cb7b93f0d4219b2250f1418b78aeccefd0fb0e6e..31c6d078942933daa27f1286945951ba4e545cc5 100644 (file)
@@ -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
  *
index c387ffc4fe012b4a0136455f115f4731890a420d..8fddd0b22a7ebdebdeabbfbcd54cebce110eb3fb 100644 (file)
@@ -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)
index 43ad42fbd498ee5502fbdfc91e97365fc3c3fad3..23451d50c3ab86aaf59597a585f27b6967b93d7b 100644 (file)
@@ -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);
index c1ecf92d4801e0b58c45c9d0a9f1b1ba5d2057a7..b13e31ba655a7a67d0a530a22e23a52f8395accf 100644 (file)
@@ -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
index 02f0db393c70dd1a343acb77c30bc3b76e996c8e..9eb3ae43b1bbb9be3197215464c03e7f790d2123 100644 (file)
@@ -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;
index c72f0a9854670341d21c7962203284c9d32e23da..5b21aa7f0cecfefb5f213438227c244db5b1b09b 100644 (file)
@@ -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 */
index fbbc6d1dba22e736b61d3fea5863231f19ccada3..d64c1a13d46b6c53e989a9bc172a7fdb5cdf75be 100644 (file)
@@ -69,7 +69,7 @@
  *
  * NAME
  *
- *    #define bool ...
+ *    #define SilcBool ...
  *
  * DESCRIPTION
  *
  *    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)
 
index af6cac3e502d33fe9cbc9e69411a873612f70d38..9b3645586057bfa9a07eca28da71bf0e6b178a39 100644 (file)
@@ -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;
index ba09b4e91f4f48dd2c8bf14001db6da6784f937e..f82142d1f6479dea6dc3e5475e9858308cde26eb 100644 (file)
@@ -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 */
index 3a6742cd90bc5ef10a83fbf1f0b2d9980806e7f9..b4472bebe38b2a018b7d80aa5a5b51c25b6fa773 100644 (file)
@@ -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) ||
index 72aac63e4aad830e7325ed8a067b726e985bd05e..4ab331427992c7422565f24caa4324922ef699f8 100644 (file)
@@ -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
index 47a26c61997f9192adf2868940ac0f91a0511785..4509f28078aba26e16c94a9b16c229cdd2a55fb6 100644 (file)
@@ -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;
index 7f9666c528257d3a70bcb92f25070157a2c58b2f..e0ee3a832ee29cc30c2aba75b5289ad0acdb0097 100644 (file)
@@ -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
index 38aae9545c22c0ee88f259f0a4e8b0ccdb6757b2..c4bf086af63b3bc760d92d32571d6e11a8aaeae0 100644 (file)
@@ -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
 
index 836daecbee1d8ec840f8d53b85227148dc9f47c7..0e11b868362517491b9f14352a7e227d2cb1ac97 100644 (file)
@@ -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;
 
index 9b7350074727dd5964e274e3a0c492e9f73f6d17..be2cd48d9a2a2322767d5aaa691bfd33c9bc7be8 100644 (file)
@@ -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;
index 11ac71fc2c570003c30217d2c9402e5f6d637a27..380f618228377f5256332de352285010ae48d48d 100644 (file)
@@ -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")) {
index d8ba271525bfc5b641d3771d6564a0cd32deffa5..da34e1b9a8d21cecbf10d28ac52f5606c01cdd07 100644 (file)
@@ -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;
 
index 01e7fdd1b6827aa779ddf365e6b353802ac16d05..a514d55bdd8bc43843fc4350a116893ad5e34d70 100644 (file)
@@ -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);
index 95c8e98695a5e6bb2a8c90e82e32c0fc8118f127..f678b255a23c199090077a9852dbb733757d10b3 100644 (file)
@@ -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;
 
index 9aa575fdf2fa97f8197675d4c2f3c51281736ceb..eaf74cb89088ab69f7640c151134d73ed34416f9 100644 (file)
@@ -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);
index 3b917b0a9f95baa91046171347b02afc9121f9a2..3a50a1cda5ebbc3918237a9d00cb49ce4168bb29 100644 (file)
@@ -6,7 +6,7 @@
 
 int main(int argc, char **argv)
 {
-  bool success = FALSE;
+  SilcBool success = FALSE;
   SilcStack stack;
   void *ptr, *ptr2;
   int i;
index affbb4eebf03af9b153d54260d11914d15a62b05..4810cf9abd895d8cc4a6b368d7da479b64b3fe74 100644 (file)
@@ -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;
index 348126208b4c9619319ecc5275793d1544640f7e..dd3354a64e5d5fad6dc2d9a5dd28031da0784ec7 100644 (file)
@@ -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;
 
index 1336eaeea7d57592db62d2983d3f4dda6efca471..f368116547d8e873e1799ceebb1a27ef4484ee92 100644 (file)
@@ -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));
index be2d876013064847998ed6733c3b49366b161a84..654d8bbef7294989422f0bff702b35bbb6b99c12 100644 (file)
@@ -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;
 
index 8b1ffa0e9c91be563c15c679ea5d4ac70b6238a4..c0393c7349793a0efd6eb7cddb034304312f7e29 100644 (file)
@@ -32,7 +32,7 @@ typedef struct {
   SilcUInt32 signal;
   SilcTaskCallback callback;
   void *context;
-  bool call;
+  SilcBool call;
 } SilcUnixSignal;
 
 /* Internal context. */
index 6fb8719b09846dbe6a899427019c66d176851e3b..10e6e8418fd0a963d37bdf7ae8ee1974886cf77a 100644 (file)
@@ -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;
index 94f23f168ff50b4f4e7a04b474302cbcc3032899..80e1a8e62f30164fc1fa05a37f79b0e243ce5642 100644 (file)
@@ -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));
index 09e8e90ab01774d1edd5db1f1d13d80cb14c85eb..9037505ad42690487b989ee3887e523018125862 100644 (file)
@@ -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));
index 0bcd038dcc130de44b798611fa7bd1c3c3fb11ff..6cdad249f2f171fa22949c9a18a8ed6b64f49bc6 100644 (file)
@@ -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;
index abc3523721cb9b294314290dfe9e41b93e88d544..8adef30b28cee62841bc3589ffd1c91857134323 100644 (file)
@@ -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 */
index 7d5c62d2f7dde3784e1cbd6911c3f78dd0cb2d05..1fe4bb94e9f8805ad3a9c2b35e105c367c94ec2c 100644 (file)
@@ -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;