=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: inetcomm: Use BOOL type where appropriate.
Alexandre Julliard
julliard at winehq.org
Mon Oct 7 14:17:11 CDT 2013
Module: wine
Branch: master
Commit: da2a97fc0678029ed4a045703fbc787db2542d49
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da2a97fc0678029ed4a045703fbc787db2542d49
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Fri Oct 4 23:32:12 2013 +0200
inetcomm: Use BOOL type where appropriate.
---
dlls/inetcomm/mimeole.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c
index 38acd49..6a6cbd8 100644
--- a/dlls/inetcomm/mimeole.c
+++ b/dlls/inetcomm/mimeole.c
@@ -137,7 +137,7 @@ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr)
char *buf = NULL;
DWORD size = PARSER_BUF_SIZE, offset = 0, last_end = 0;
HRESULT hr;
- int done = 0;
+ BOOL done = FALSE;
*ptr = NULL;
@@ -165,7 +165,7 @@ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr)
offset += read;
buf[offset] = '\0';
- if(read == 0) done = 1;
+ if(read == 0) done = TRUE;
while(!done && (end = strstr(buf + last_end, "\r\n")))
{
@@ -176,7 +176,7 @@ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr)
off.QuadPart = new_end;
IStream_Seek(stm, off, STREAM_SEEK_SET, NULL);
buf[new_end] = '\0';
- done = 1;
+ done = TRUE;
}
else
last_end = new_end;
@@ -271,14 +271,14 @@ static void unfold_header(char *header, int len)
static char *unquote_string(const char *str)
{
- int quoted = 0;
+ BOOL quoted = FALSE;
char *ret, *cp;
while(*str == ' ' || *str == '\t') str++;
if(*str == '"')
{
- quoted = 1;
+ quoted = TRUE;
str++;
}
ret = strdupA(str);
@@ -334,20 +334,19 @@ static void add_param(header_t *header, const char *p)
static void split_params(header_t *header, char *value)
{
char *cp = value, *start = value;
- int in_quote = 0;
- int done_value = 0;
+ BOOL in_quotes = FALSE, done_value = FALSE;
while(*cp)
{
- if(!in_quote && *cp == ';')
+ if(!in_quotes && *cp == ';')
{
*cp = '\0';
if(done_value) add_param(header, start);
- done_value = 1;
+ done_value = TRUE;
start = cp + 1;
}
else if(*cp == '"')
- in_quote = !in_quote;
+ in_quotes = !in_quotes;
cp++;
}
if(done_value) add_param(header, start);
More information about the wine-cvs
mailing list