From 6e7a2bb2dc02f20250d13c1b21d74c4fcce1b1f5 Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Mon, 22 Nov 2010 09:28:17 -0200 Subject: [PATCH] Remove the "xboolean" typedef from the code base. --- upnp/src/gena/gena_callback2.c | 2 +- upnp/src/genlib/net/http/parsetools.c | 2 +- upnp/src/genlib/net/http/statcodes.c | 2 +- upnp/src/genlib/util/strintmap.c | 4 ++-- upnp/src/inc/httpparser.h | 6 +++--- upnp/src/inc/parsetools.h | 2 +- upnp/src/inc/strintmap.h | 4 ++-- upnp/src/inc/upnputil.h | 4 ---- upnp/src/ssdp/ssdp_server.c | 4 ++-- upnp/src/urlconfig/urlconfig.c | 2 +- 10 files changed, 14 insertions(+), 18 deletions(-) diff --git a/upnp/src/gena/gena_callback2.c b/upnp/src/gena/gena_callback2.c index e193c60..a5a21fd 100644 --- a/upnp/src/gena/gena_callback2.c +++ b/upnp/src/gena/gena_callback2.c @@ -90,7 +90,7 @@ genaCallback( IN http_parser_t * parser, IN http_message_t * request, INOUT SOCKINFO * info ) { - xboolean found_function = FALSE; + int found_function = FALSE; if( request->method == HTTPMETHOD_SUBSCRIBE ) { #ifdef INCLUDE_DEVICE_APIS diff --git a/upnp/src/genlib/net/http/parsetools.c b/upnp/src/genlib/net/http/parsetools.c index 5ed30e1..0b294e9 100644 --- a/upnp/src/genlib/net/http/parsetools.c +++ b/upnp/src/genlib/net/http/parsetools.c @@ -44,7 +44,7 @@ #include "statcodes.h" #include "parsetools.h" -xboolean has_xml_content_type(http_message_t *hmsg) +int has_xml_content_type(http_message_t *hmsg) { memptr hdr_value; diff --git a/upnp/src/genlib/net/http/statcodes.c b/upnp/src/genlib/net/http/statcodes.c index 385ad09..67ae4c4 100644 --- a/upnp/src/genlib/net/http/statcodes.c +++ b/upnp/src/genlib/net/http/statcodes.c @@ -96,7 +96,7 @@ static const char *Http5xxStr = "Service Unavailable\0" "Gateway Timeout\0" "HTTP Version Not Supported\0"; -static xboolean gInitialized = FALSE; +static int gInitialized = FALSE; /************************************************************************ ************************* Functions ************************************* diff --git a/upnp/src/genlib/util/strintmap.c b/upnp/src/genlib/util/strintmap.c index 183a5b3..0d4695c 100644 --- a/upnp/src/genlib/util/strintmap.c +++ b/upnp/src/genlib/util/strintmap.c @@ -48,7 +48,7 @@ * matched. * IN int num_entries ; number of entries in the table that need * to be searched. -* IN xboolean case_sensitive ; whether the case should be case +* IN int case_sensitive ; whether the case should be case * sensitive or not * * Description : Match the given name with names from the entries in the @@ -65,7 +65,7 @@ map_str_to_int( IN const char *name, IN size_t name_len, IN str_int_entry * table, IN int num_entries, - IN xboolean case_sensitive ) + IN int case_sensitive ) { int top, mid, diff --git a/upnp/src/inc/httpparser.h b/upnp/src/inc/httpparser.h index e4ec967..0df16be 100644 --- a/upnp/src/inc/httpparser.h +++ b/upnp/src/inc/httpparser.h @@ -64,7 +64,7 @@ typedef struct size_t cursor; /*! set this to TRUE if the entire msg is loaded in 'msg'; * else FALSE if only partial msg in 'msg' (default is FALSE). */ - xboolean entire_msg_loaded; + int entire_msg_loaded; } scanner_t; typedef enum @@ -185,7 +185,7 @@ typedef struct { membuffer status_msg; /* fields used in both request or response messages. */ /*! if TRUE, msg is a request, else response. */ - xboolean is_request; + int is_request; /* http major version. */ int major_version; /* http minor version. */ @@ -210,7 +210,7 @@ typedef struct { int http_error_code; /*! read-only; this is set to true if a NOTIFY request has no * content-length. used to read valid sspd notify msg. */ - xboolean valid_ssdp_notify_hack; + int valid_ssdp_notify_hack; /* private data -- don't touch. */ parser_pos_t position; int ent_position; diff --git a/upnp/src/inc/parsetools.h b/upnp/src/inc/parsetools.h index 40fae2c..88851ba 100644 --- a/upnp/src/inc/parsetools.h +++ b/upnp/src/inc/parsetools.h @@ -49,7 +49,7 @@ extern "C" { * * \return boolean. */ -xboolean has_xml_content_type( +int has_xml_content_type( /*! HTTP Message object. */ IN http_message_t *hmsg); diff --git a/upnp/src/inc/strintmap.h b/upnp/src/inc/strintmap.h index 1110850..cb0788e 100644 --- a/upnp/src/inc/strintmap.h +++ b/upnp/src/inc/strintmap.h @@ -57,7 +57,7 @@ extern "C" { * matched. * IN int num_entries ; number of entries in the table that need * to be searched. -* IN xboolean case_sensitive ; whether the case should be case +* IN int case_sensitive ; whether the case should be case * sensitive or not * * Description : Match the given name with names from the entries in the @@ -71,7 +71,7 @@ extern "C" { ************************************************************************/ int map_str_to_int( IN const char* name, IN size_t name_len, IN str_int_entry* table, IN int num_entries, - IN xboolean case_sensitive ); + IN int case_sensitive ); /************************************************************************ diff --git a/upnp/src/inc/upnputil.h b/upnp/src/inc/upnputil.h index f0d2801..03c92d7 100644 --- a/upnp/src/inc/upnputil.h +++ b/upnp/src/inc/upnputil.h @@ -56,14 +56,10 @@ #define EVENT_TIMEDOUT -2 #define EVENT_TERMINATE -3 - /*! boolean type in C. */ -typedef char xboolean; - #ifndef TRUE #define TRUE 1 #endif - #ifndef FALSE #define FALSE 0 #endif diff --git a/upnp/src/ssdp/ssdp_server.c b/upnp/src/ssdp/ssdp_server.c index 952c4cc..19e77d2 100644 --- a/upnp/src/ssdp/ssdp_server.c +++ b/upnp/src/ssdp/ssdp_server.c @@ -628,10 +628,10 @@ static void free_ssdp_event_handler_data(void *the_data) * Description: * This function do some quick checking of the ssdp msg * - * Returns: xboolean + * Returns: int * returns TRUE if msg is valid else FALSE ***************************************************************************/ -static UPNP_INLINE xboolean valid_ssdp_msg(IN http_message_t *hmsg) +static UPNP_INLINE int valid_ssdp_msg(IN http_message_t *hmsg) { memptr hdr_value; diff --git a/upnp/src/urlconfig/urlconfig.c b/upnp/src/urlconfig/urlconfig.c index d48d67e..e5a26d9 100644 --- a/upnp/src/urlconfig/urlconfig.c +++ b/upnp/src/urlconfig/urlconfig.c @@ -214,7 +214,7 @@ static int config_description_doc( IN const char *ip_str, OUT char **root_path_str ) { - xboolean addNew = FALSE; + int addNew = FALSE; IXML_NodeList *baseList; IXML_Element *element = NULL; IXML_Element *newElement = NULL;