char *buf = NULL;
DWORD size = PARSER_BUF_SIZE, offset = 0, last_end = 0;
HRESULT hr;
- int done = 0;
+ BOOL done = FALSE;
*ptr = NULL;
offset += read;
buf[offset] = '\0';
- if(read == 0) done = 1;
+ if(read == 0) done = TRUE;
while(!done && (end = strstr(buf + last_end, "\r\n")))
{
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;
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);
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);