Commit a72c23ed authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

winhlp32: Use BOOL type where appropriate.

parent 4ef76cd7
...@@ -763,7 +763,7 @@ static BOOL HLPFILE_RtfAddHexBytes(struct RtfData* rd, const void* _ptr, unsigne ...@@ -763,7 +763,7 @@ static BOOL HLPFILE_RtfAddHexBytes(struct RtfData* rd, const void* _ptr, unsigne
static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie, static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie,
const char* str, unsigned len, LONG hash, const char* str, unsigned len, LONG hash,
unsigned clrChange, unsigned bHotSpot, unsigned wnd); BOOL clrChange, BOOL bHotSpot, unsigned wnd);
/****************************************************************** /******************************************************************
* HLPFILE_AddHotSpotLinks * HLPFILE_AddHotSpotLinks
...@@ -805,7 +805,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file, ...@@ -805,7 +805,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file,
{ {
case 0xC8: case 0xC8:
hslink = (HLPFILE_HOTSPOTLINK*) hslink = (HLPFILE_HOTSPOTLINK*)
HLPFILE_AllocLink(rd, hlp_link_macro, str, -1, 0, 0, 1, -1); HLPFILE_AllocLink(rd, hlp_link_macro, str, -1, 0, FALSE, TRUE, -1);
break; break;
case 0xE6: case 0xE6:
...@@ -813,7 +813,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file, ...@@ -813,7 +813,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file,
hslink = (HLPFILE_HOTSPOTLINK*) hslink = (HLPFILE_HOTSPOTLINK*)
HLPFILE_AllocLink(rd, (start[7 + 15 * i + 0] & 1) ? hlp_link_link : hlp_link_popup, HLPFILE_AllocLink(rd, (start[7 + 15 * i + 0] & 1) ? hlp_link_link : hlp_link_popup,
file->lpszPath, -1, HLPFILE_Hash(str), file->lpszPath, -1, HLPFILE_Hash(str),
0, 1, -1); FALSE, TRUE, -1);
break; break;
case 0xEE: case 0xEE:
...@@ -839,7 +839,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file, ...@@ -839,7 +839,7 @@ static void HLPFILE_AddHotSpotLinks(struct RtfData* rd, HLPFILE* file,
} }
hslink = (HLPFILE_HOTSPOTLINK*) hslink = (HLPFILE_HOTSPOTLINK*)
HLPFILE_AllocLink(rd, (start[7 + 15 * i + 0] & 1) ? hlp_link_link : hlp_link_popup, HLPFILE_AllocLink(rd, (start[7 + 15 * i + 0] & 1) ? hlp_link_link : hlp_link_popup,
file->lpszPath, -1, HLPFILE_Hash(tgt ? tgt : str), 0, 1, wnd); file->lpszPath, -1, HLPFILE_Hash(tgt ? tgt : str), FALSE, TRUE, wnd);
HeapFree(GetProcessHeap(), 0, tgt); HeapFree(GetProcessHeap(), 0, tgt);
break; break;
} }
...@@ -1162,7 +1162,7 @@ static BOOL HLPFILE_RtfAddGfxByIndex(struct RtfData* rd, HLPFILE *hlpfile, ...@@ -1162,7 +1162,7 @@ static BOOL HLPFILE_RtfAddGfxByIndex(struct RtfData* rd, HLPFILE *hlpfile,
*/ */
static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie, static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie,
const char* str, unsigned len, LONG hash, const char* str, unsigned len, LONG hash,
unsigned clrChange, unsigned bHotSpot, unsigned wnd) BOOL clrChange, BOOL bHotSpot, unsigned wnd)
{ {
HLPFILE_LINK* link; HLPFILE_LINK* link;
char* link_str; char* link_str;
...@@ -1180,7 +1180,7 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie, ...@@ -1180,7 +1180,7 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie,
memcpy(link_str, str, len); memcpy(link_str, str, len);
link_str[len] = '\0'; link_str[len] = '\0';
link->hash = hash; link->hash = hash;
link->bClrChange = clrChange ? 1 : 0; link->bClrChange = clrChange;
link->bHotSpot = bHotSpot; link->bHotSpot = bHotSpot;
link->window = wnd; link->window = wnd;
link->next = rd->first_link; link->next = rd->first_link;
...@@ -1599,7 +1599,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, ...@@ -1599,7 +1599,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
case 0xCC: case 0xCC:
WINE_TRACE("macro => %s\n", format + 3); WINE_TRACE("macro => %s\n", format + 3);
HLPFILE_AllocLink(rd, hlp_link_macro, (const char*)format + 3, HLPFILE_AllocLink(rd, hlp_link_macro, (const char*)format + 3,
GET_USHORT(format, 1), 0, !(*format & 4), 0, -1); GET_USHORT(format, 1), 0, !(*format & 4), FALSE, -1);
format += 3 + GET_USHORT(format, 1); format += 3 + GET_USHORT(format, 1);
break; break;
...@@ -1607,7 +1607,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, ...@@ -1607,7 +1607,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
case 0xE1: case 0xE1:
WINE_WARN("jump topic 1 => %u\n", GET_UINT(format, 1)); WINE_WARN("jump topic 1 => %u\n", GET_UINT(format, 1));
HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup, HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup,
page->file->lpszPath, -1, GET_UINT(format, 1), 1, 0, -1); page->file->lpszPath, -1, GET_UINT(format, 1), TRUE, FALSE, -1);
format += 5; format += 5;
...@@ -1619,7 +1619,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, ...@@ -1619,7 +1619,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
case 0xE7: case 0xE7:
HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup, HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup,
page->file->lpszPath, -1, GET_UINT(format, 1), page->file->lpszPath, -1, GET_UINT(format, 1),
!(*format & 4), 0, -1); !(*format & 4), FALSE, -1);
format += 5; format += 5;
break; break;
...@@ -1656,7 +1656,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, ...@@ -1656,7 +1656,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
break; break;
} }
HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup, HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup,
ptr, -1, GET_UINT(format, 4), !(*format & 4), 0, wnd); ptr, -1, GET_UINT(format, 4), !(*format & 4), FALSE, wnd);
} }
format += 3 + GET_USHORT(format, 1); format += 3 + GET_USHORT(format, 1);
break; break;
...@@ -1980,22 +1980,22 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile) ...@@ -1980,22 +1980,22 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
if (minor <= 16) if (minor <= 16)
{ {
hlpfile->tbsize = 0x800; hlpfile->tbsize = 0x800;
hlpfile->compressed = 0; hlpfile->compressed = FALSE;
} }
else if (flags == 0) else if (flags == 0)
{ {
hlpfile->tbsize = 0x1000; hlpfile->tbsize = 0x1000;
hlpfile->compressed = 0; hlpfile->compressed = FALSE;
} }
else if (flags == 4) else if (flags == 4)
{ {
hlpfile->tbsize = 0x1000; hlpfile->tbsize = 0x1000;
hlpfile->compressed = 1; hlpfile->compressed = TRUE;
} }
else else
{ {
hlpfile->tbsize = 0x800; hlpfile->tbsize = 0x800;
hlpfile->compressed = 1; hlpfile->compressed = TRUE;
} }
if (hlpfile->compressed) if (hlpfile->compressed)
......
...@@ -124,9 +124,9 @@ typedef struct tagHlpFileFile ...@@ -124,9 +124,9 @@ typedef struct tagHlpFileFile
unsigned short charset; unsigned short charset;
unsigned short tbsize; /* topic block size */ unsigned short tbsize; /* topic block size */
unsigned short dsize; /* decompress size */ unsigned short dsize; /* decompress size */
unsigned short compressed; BOOL compressed;
unsigned hasPhrases; /* file has |Phrases */ BOOL hasPhrases; /* file has |Phrases */
unsigned hasPhrases40; /* file has |PhrIndex/|PhrImage */ BOOL hasPhrases40; /* file has |PhrIndex/|PhrImage */
UINT num_phrases; UINT num_phrases;
unsigned* phrases_offsets; unsigned* phrases_offsets;
char* phrases_buffer; char* phrases_buffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment