83 WINE_ERR(
"Invalid magic in B+ tree: 0x%x\n", magic);
95 for (
i = 0;
i < entries;
i++)
97 if (comp(
ptr,
key, 0, (
void **)&newptr) > 0)
break;
105 for (
i = 0;
i < entries;
i++)
107 ret = comp(
ptr,
key, 1, (
void **)&newptr);
137 WINE_ERR(
"Invalid magic in B+ tree: 0x%x\n", magic);
143 pages =
buf + 9 + 38;
149 while (cur_page != 0xFFFF)
154 for (
i = 0;
i < entries;
i++)
175 for (
i = 0; i < 8 && ptr < end; i++, mask >>= 1)
184 else newsize++,
ptr++;
202 for (
i = 0; i < 8 && ptr < end; i++, mask >>= 1)
218 for (;
len>0;
len--, newptr++) *newptr = *(newptr-
offset-1);
221 else *newptr++ = *
ptr++;
239 while (
ptr <
end && newptr < newend)
241 if (!*
ptr || *
ptr >= 0x10)
251 if (newptr + (phend - phptr) > newend)
253 WINE_FIXME(
"buffer overflow %p > %p for %lu bytes\n",
254 newptr, newend, (
SIZE_T)(phend - phptr));
257 memcpy(newptr, phptr, phend - phptr);
258 newptr += phend - phptr;
259 if (
code & 1) *newptr++ =
' ';
264 if (newptr > newend)
WINE_FIXME(
"buffer overflow %p > %p\n", newptr, newend);
277 for (;
src < src_end;
src++)
294 else if ((*
src & 0x03) == 0x01)
310 else if ((*
src & 0x07) == 0x03)
346 if (
dst + ch <= sdst)
352 if (
dst + ch <= sdst)
359 WINE_WARN(
"Buffer X-flow: d(%lu) instead of d(%u)\n",
374 if (!hlpfile)
return 0;
390 WINE_ERR(
"Page of offset %u not found in file %s\n",
403 if (!hlpfile)
return NULL;
421 int leaf,
void**
next)
426 *
next = (
char *)
p+(leaf?8:6);
427 WINE_TRACE(
"Comparing '%d' with '%d'\n", lKey, lTest);
428 if (lTest < lKey)
return -1;
429 if (lTest > lKey)
return 1;
441 if (!hlpfile)
return NULL;
471 if (!hlpfile)
return 0;
492 int leaf,
void**
next)
529 *subend = *subbuf +
GET_UINT(*subbuf, 0);
552 while ((
c = *lpszContext++))
555 if (
c >=
'A' &&
c <=
'Z')
x =
c -
'A' + 17;
556 if (
c >=
'a' &&
c <=
'z')
x =
c -
'a' + 17;
557 if (
c >=
'1' &&
c <=
'9')
x =
c -
'0';
558 if (
c ==
'0')
x = 10;
559 if (
c ==
'.')
x = 12;
560 if (
c ==
'_')
x = 13;
561 if (
x) lHash = lHash * 43 +
x;
607 ret = (*(
const unsigned short*)(*
ptr) - 0x8000) / 2;
612 ret = (*(
const unsigned char*)(*
ptr) - 0x80) / 2;
624 ret = *(
const unsigned short*)(*
ptr) / 2;
629 ret = *(
const unsigned char*)(*
ptr) / 2;
647 WINE_TRACE(
"Unpacking (%d) from %u bytes to %u bytes\n", packing, csz, sz);
653 WINE_WARN(
"Bogus gfx sizes (uncompressed): %u / %u\n", sz, csz);
668 WINE_WARN(
"Bogus gfx sizes (LZ77): %u / %u\n", sz77, sz);
673 if (!tmp)
return FALSE;
685 WINE_FIXME(
"Unsupported packing %u\n", packing);
693 if (
rd->ptr + sz >=
rd->data +
rd->allocated)
696 if (!
new)
return FALSE;
697 rd->ptr =
new + (
rd->ptr -
rd->data);
710 else if (*
str ==
'}')
rd->in_text =
TRUE;
736 case '{': rlen = 2;
replace =
"\\{";
break;
737 case '}': rlen = 2;
replace =
"\\}";
break;
738 case '\\': rlen = 2;
replace =
"\\\\";
break;
757 static const char* _2hex =
"0123456789abcdef";
764 for (; sz; sz -= step)
767 for (
i = 0;
i < step;
i++)
769 tmp[2 *
i + 0] = _2hex[*
ptr >> 4];
770 tmp[2 *
i + 1] = _2hex[*
ptr++ & 0xF];
779 BOOL clrChange,
BOOL bHotSpot,
unsigned wnd);
792 if (hs_size == 0 || hs_offset == 0)
return;
799 str = (
const char*)
start + 7 + 15 * hs_num + hs_macro;
801 for (
i = 0;
i < hs_num;
i++)
814 switch (
start[7 + 15 *
i + 0])
841 for (wnd =
file->numWindows - 1; wnd >= 0; wnd--)
881 const void* pict,
unsigned nc)
964 const BYTE* pict_beg;
972 unsigned hs_size, hs_offset;
975 if (!bi)
return FALSE;
1015 if (!bi)
return FALSE;
1016 for (
i = 0;
i < nc;
i++)
1027 if (clrImportant == 1 && nc > 0)
1035 sprintf(tmp,
"\\dibitmap0\\picw%d\\pich%d",
1042 sprintf(tmp,
"\\wbitmap0\\wbmbitspixel%d\\wbmplanes%d\\picw%d\\pich%d",
1064 ULONG size, csize, off, hs_offset, hs_size;
1077 sprintf(tmp,
"{\\pict\\wmetafile%u\\picw%u\\pich%u",
1091 WINE_TRACE(
"sz=%u csz=%u offs=%u/%u,%u/%u\n",
1092 size, csize, off, (
ULONG)(
ptr - beg), hs_size, hs_offset);
1112 unsigned i, numpict;
1117 for (
i = 0;
i < numpict;
i++)
1144 if (numpict != 1)
WINE_FIXME(
"Supporting only one bitmap format per logical bitmap (for now). Using first format\n");
1178 BOOL clrChange,
BOOL bHotSpot,
unsigned wnd)
1192 link->string = link_str = (
char*)
link + asz;
1194 link_str[
len] =
'\0';
1196 link->bClrChange = clrChange;
1197 link->bHotSpot = bHotSpot;
1199 link->next =
rd->first_link;
1201 link->cpMin =
rd->char_pos;
1202 rd->force_color = clrChange;
1205 link->cpMax =
rd->char_pos;
1216 return pts *
page->file->scale -
page->file->rounderr;
1228 char *
text, *text_base, *text_end;
1230 unsigned short bits;
1232 short nc, lastcol, table_width;
1247 if (
page->file->hasPhrases)
1249 else if (
page->file->hasPhrases40)
1253 WINE_FIXME(
"Text size is too long, splitting\n");
1289 table_width = 32767;
1290 WINE_TRACE(
"New table: cols=%d type=%x width=%d\n",
1291 ncol,
type, table_width);
1295 sprintf(tmp,
"\\trgaph%d\\trleft%d",
1300 for (nc = 0; nc < ncol; nc++)
1302 WINE_TRACE(
"column(%d/%d) gap=%d width=%d\n",
1315 sprintf(tmp,
"\\trleft%d\\cellx%d ",
1324 for (nc = 0; nc < ncol; )
1405 for (
i = 0;
i < ntab;
i++)
1411 default:
WINE_FIXME(
"Unknown tab style %x\n", ts);
1413 case 0: kind =
"";
break;
1414 case 1: kind =
"\\tqr";
break;
1415 case 2: kind =
"\\tqc";
break;
1423 switch (
bits & 0xc00)
1425 default:
WINE_FIXME(
"Unsupported alignment 0xC00\n");
break;
1433 if ((
bits & 0xE080) != 0)
1434 WINE_FIXME(
"Unsupported bits %04x, potential trouble ahead\n",
bits);
1436 while (
text < text_end &&
format < format_end)
1442 if (
rd->force_color)
1444 if ((
rd->current_link->cookie == hlp_link_popup) ?
1450 rd->char_pos += textsize;
1453 text += textsize + 1;
1483 switch (
rd->font_scale)
1485 case 0:
fs =
page->file->fonts[
font].LogFont.lfHeight - 4;
break;
1487 case 1:
fs =
page->file->fonts[
font].LogFont.lfHeight;
break;
1488 case 2:
fs =
page->file->fonts[
font].LogFont.lfHeight + 4;
break;
1492 sprintf(tmp,
"\\f%u\\cf%u\\fs%u%s%s%s%s",
1494 page->file->fonts[
font].LogFont.lfWeight > 400 ?
"\\b" :
"\\b0",
1495 page->file->fonts[
font].LogFont.lfItalic ?
"\\i" :
"\\i0",
1496 page->file->fonts[
font].LogFont.lfUnderline ?
"\\ul" :
"\\ul0",
1497 page->file->fonts[
font].LogFont.lfStrikeOut ?
"\\strike" :
"\\strike0");
1593 if (!
rd->current_link)
1595 rd->current_link->cpMax =
rd->char_pos;
1653 const char*
ptr = (
const char*)
format + 8;
1666 for (wnd =
page->file->numWindows - 1; wnd >= 0; wnd--)
1704 unsigned font_scale,
unsigned relative)
1710 unsigned cpg, parlen;
1712 const char* ck =
NULL;
1717 rd->first_link =
rd->current_link =
NULL;
1719 rd->font_scale = font_scale;
1720 rd->relative = relative;
1721 rd->char_pos_rel = 0;
1748 sprintf(tmp,
"{\\rtf1\\%s\\deff0", ck);
1753 sprintf(tmp,
"{\\rtf1\\ansi\\ansicpg%d\\deff0", cpg);
1764 case FF_MODERN: family =
"modern";
break;
1765 case FF_ROMAN: family =
"roman";
break;
1766 case FF_SWISS: family =
"swiss";
break;
1767 case FF_SCRIPT: family =
"script";
break;
1769 default: family =
"nil";
break;
1771 sprintf(tmp,
"{\\f%d\\f%s\\fprq%d\\fcharset%d %s;}",
1783 sprintf(tmp,
"\\red%d\\green%d\\blue%d;",
1804 if (hlpfile->
version <= 16 &&
index != old_index && old_index != -1)
1815 if (
index != old_index) {offs = 0; old_index =
index;}
1820 if (
count++)
goto done;
1826 if (relative >
index * 0x8000 + offs)
1827 rd->char_pos_rel =
rd->char_pos;
1841 }
while (
ref != 0xffffffff);
1843 page->first_link =
rd->first_link;
1856 unsigned face_num, dscr_num, face_offset, dscr_offset;
1874 WINE_TRACE(
"Got NumFacenames=%u@%u NumDesc=%u@%u\n",
1875 face_num, face_offset, dscr_num, dscr_offset);
1880 len = (dscr_offset - face_offset) / face_num;
1883 if (face_offset >= 16)
1891 if (face_offset >= 12)
1899 hlpfile->
scale = 10;
1903 for (
i = 0;
i < dscr_num;
i++)
1905 flag =
ref[dscr_offset +
i * 11 + 0];
1906 family =
ref[dscr_offset +
i * 11 + 2];
1929 default:
WINE_FIXME(
"Unknown family %u\n", family);
1945 ref[dscr_offset +
i * 11 + 6],
1946 ref[dscr_offset +
i * 11 + 7]);
1947#define X(b,s) ((flag & (1 << b)) ? "-"s: "")
1948 WINE_TRACE(
"Font[%d]: flags=%02x%s%s%s%s%s%s pSize=%u family=%u face=%s[%u] color=%08x\n",
1954 X(4,
"dblUnderline"),
1956 ref[dscr_offset +
i * 11 + 1],
2013 WINE_TRACE(
"Got system header: magic=%04x version=%d.%d flags=%04x\n",
2015 if (magic != 0x036C ||
major != 1)
2022 else if (
flags == 0)
2024 hlpfile->
tbsize = 0x1000;
2027 else if (
flags == 4)
2029 hlpfile->
tbsize = 0x1000;
2039 hlpfile->
dsize = 0x4000;
2049 char *
str = (
char*)
buf + 0x15;
2060 char *
str = (
char*)
ptr + 4;
2098 WINE_FIXME(
"More than one icon, picking up first\n");
2121 else wi->
type[0] =
'\0';
2123 else wi->
name[0] =
'\0';
2134 WINE_TRACE(
"System-Window: flags=%c%c%c%c%c%c%c%c type=%s name=%s caption=%s (%d,%d)x(%d,%d)\n",
2135 flags & 0x0001 ?
'T' :
't',
2136 flags & 0x0002 ?
'N' :
'n',
2137 flags & 0x0004 ?
'C' :
'c',
2138 flags & 0x0008 ?
'X' :
'x',
2139 flags & 0x0010 ?
'Y' :
'y',
2140 flags & 0x0020 ?
'W' :
'w',
2141 flags & 0x0040 ?
'H' :
'h',
2142 flags & 0x0080 ?
'S' :
's',
2200 WINE_ERR(
"corrupted help file: kwbtree present but kwdata absent\n");
2223 unsigned entries,
i;
2232 for (
i = 0;
i < entries;
i++)
2252 clen = cend - cbuf - 9;
2301 if (!hlpfile || --hlpfile->
wRefCount > 0)
return;
2303 if (hlpfile->
next) hlpfile->
next->prev = hlpfile->
prev;
2304 if (hlpfile->
prev) hlpfile->
prev->next = hlpfile->
next;
2375 for (
i = 0;
i <=
num;
i++)
2394 INT dec_size, cpr_size;
2395 BYTE *buf_idx, *end_idx;
2396 BYTE *buf_phs, *end_phs;
2399 unsigned short bc,
n;
2408 WINE_TRACE(
"Index: Magic=%08x #entries=%u CpsdSize=%u PhrImgSize=%u\n"
2409 "\tPhrImgCprsdSize=%u 0=%u bc=%x ukn=%x\n",
2419 dec_size =
GET_UINT(buf_idx, 9 + 12);
2420 cpr_size =
GET_UINT(buf_idx, 9 + 16);
2422 if (dec_size != cpr_size &&
2439#define getbit() ((mask <<= 1) ? (*ptr & mask) != 0: (*++ptr & (mask=1)) != 0)
2443 for (
i = 0;
i <
num;
i++)
2455 if (dec_size == cpr_size)
2471 unsigned int i, newsize = 0;
2472 unsigned int topic_size;
2518 hlpfile->
topic_end = newptr + topic_size;
2551 if (titlesize > blocksize -
datalen)
2560 WINE_FIXME(
"Text size is too long, splitting\n");
2561 titlesize = blocksize -
datalen;
2568 page->lpszTitle[titlesize] =
'\0';
2583 page->file = hlpfile;
2596 if (
page->browse_bwd == 0xFFFF ||
page->browse_bwd == 0xFFFFFFFF)
2597 page->browse_bwd = 0xFFFFFFFF;
2601 if (
page->browse_fwd == 0xFFFF ||
page->browse_fwd == 0xFFFFFFFF)
2602 page->browse_fwd = 0xFFFFFFFF;
2607 WINE_TRACE(
"Added page[%d]: title=%s %08x << %08x >> %08x\n",
2613 while (ptr < page->lpszTitle + titlesize)
2620 macro->
lpszMacro = macro_str = (
char*)(macro + 1);
2626 page->first_macro = macro;
2703 if (hlpfile->
version <= 16 &&
index != old_index && old_index != -1)
2716 if (
index != old_index) {offs = 0; old_index =
index;}
2724 topicoffset =
index * 0x8000 + offs;
2747 }
while (
ref != 0xffffffff);
2774 if (!hlpfile)
return 0;
2784 if (hlpfile->
next) hlpfile->
next->prev = hlpfile;
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static BOOL HLPFILE_Uncompress_Topic(HLPFILE *hlpfile)
BOOL HLPFILE_BrowsePage(HLPFILE_PAGE *page, struct RtfData *rd, unsigned font_scale, unsigned relative)
static const BYTE * HLPFILE_DecompressGfx(const BYTE *src, unsigned csz, unsigned sz, BYTE packing, BYTE **alloc)
static LONG fetch_long(const BYTE **ptr)
static BOOL HLPFILE_RtfAddHexBytes(struct RtfData *rd, const void *_ptr, unsigned sz)
static BOOL HLPFILE_RtfAddMetaFile(struct RtfData *rd, HLPFILE *file, const BYTE *beg, BYTE pack)
static short fetch_short(const BYTE **ptr)
static BOOL HLPFILE_RtfAddText(struct RtfData *rd, const char *str)
static BOOL HLPFILE_SkipParagraph(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end, unsigned *len)
static unsigned short fetch_ushort(const BYTE **ptr)
static void * HLPFILE_BPTreeSearch(BYTE *buf, const void *key, HLPFILE_BPTreeCompare comp)
static unsigned GET_UINT(const BYTE *buffer, unsigned i)
static BOOL HLPFILE_GetTOMap(HLPFILE *hlpfile)
HLPFILE_PAGE * HLPFILE_PageByMap(HLPFILE *hlpfile, LONG lMap, ULONG *relative)
static unsigned short GET_USHORT(const BYTE *buffer, unsigned i)
static void HLPFILE_DeletePage(HLPFILE_PAGE *page)
static BOOL HLPFILE_GetContext(HLPFILE *hlpfile)
void HLPFILE_BPTreeEnum(BYTE *buf, HLPFILE_BPTreeCallback cb, void *cookie)
static BOOL HLPFILE_ReadFont(HLPFILE *hlpfile)
static BOOL HLPFILE_RtfAddControl(struct RtfData *rd, const char *str)
static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE *hlpfile)
HLPFILE_PAGE * HLPFILE_PageByHash(HLPFILE *hlpfile, LONG lHash, ULONG *relative)
LONG HLPFILE_Hash(LPCSTR lpszContext)
static INT HLPFILE_UncompressedLZ77_Size(const BYTE *ptr, const BYTE *end)
static HLPFILE_PAGE * HLPFILE_Contents(HLPFILE *hlpfile, ULONG *relative)
static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
static BOOL HLPFILE_RtfAddGfxByAddr(struct RtfData *rd, HLPFILE *hlpfile, const BYTE *ref, ULONG size)
static BOOL HLPFILE_Uncompress3(HLPFILE *hlpfile, char *dst, const char *dst_end, const BYTE *src, const BYTE *src_end)
static void HLPFILE_Uncompress2(HLPFILE *hlpfile, const BYTE *ptr, const BYTE *end, BYTE *newptr, const BYTE *newend)
static ULONG fetch_ulong(const BYTE **ptr)
static BOOL HLPFILE_RtfAddGfxByIndex(struct RtfData *rd, HLPFILE *hlpfile, unsigned index)
static int comp_FindSubFile(void *p, const void *key, int leaf, void **next)
void HLPFILE_FreeHlpFile(HLPFILE *hlpfile)
static HLPFILE_LINK * HLPFILE_AllocLink(struct RtfData *rd, int cookie, const char *str, unsigned len, LONG hash, BOOL clrChange, BOOL bHotSpot, unsigned wnd)
static short GET_SHORT(const BYTE *buffer, unsigned i)
static BOOL HLPFILE_RtfAddBitmap(struct RtfData *rd, HLPFILE *file, const BYTE *beg, BYTE type, BYTE pack)
static BOOL HLPFILE_FindSubFile(HLPFILE *hlpfile, LPCSTR name, BYTE **subbuf, BYTE **subend)
static void HLPFILE_UncompressRLE(const BYTE *src, const BYTE *end, BYTE *dst, unsigned dstsz)
HLPFILE_PAGE * HLPFILE_PageByOffset(HLPFILE *hlpfile, LONG offset, ULONG *relative)
static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end, unsigned ref, unsigned offset)
static BOOL HLPFILE_RtfAddRawString(struct RtfData *rd, const char *str, size_t sz)
static int comp_PageByHash(void *p, const void *key, int leaf, void **next)
static BOOL HLPFILE_GetMap(HLPFILE *hlpfile)
static BOOL HLPFILE_SystemCommands(HLPFILE *hlpfile)
static BOOL HLPFILE_GetKeywords(HLPFILE *hlpfile)
static unsigned HLPFILE_HalfPointsScale(HLPFILE_PAGE *page, unsigned pts)
static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE *page, struct RtfData *rd, BYTE *buf, BYTE *end, unsigned *parlen)
static void HLPFILE_AddHotSpotLinks(struct RtfData *rd, HLPFILE *file, const BYTE *start, ULONG hs_size, ULONG hs_offset)
HLPFILE * HLPFILE_ReadHlpFile(LPCSTR lpszPath)
static BOOL HLPFILE_ReadFileToBuffer(HLPFILE *hlpfile, HFILE hFile)
static HLPFILE * first_hlpfile
static void HLPFILE_DeleteMacro(HLPFILE_MACRO *macro)
static BOOL HLPFILE_UncompressLZ77_Phrases(HLPFILE *hlpfile)
static BOOL HLPFILE_RtfAddTransparentBitmap(struct RtfData *rd, const BITMAPINFO *bi, const void *pict, unsigned nc)
static BYTE * HLPFILE_UncompressLZ77(const BYTE *ptr, const BYTE *end, BYTE *newptr)
struct tagHlpFileHotSpotLink HLPFILE_HOTSPOTLINK
int(* HLPFILE_BPTreeCompare)(void *p, const void *key, int leaf, void **next)
void(* HLPFILE_BPTreeCallback)(void *p, void **next, void *cookie)
int const JOCTET unsigned int datalen
int WINAPI _lclose(HFILE hFile)
long WINAPI _hread(HFILE hFile, LPVOID lpBuffer, long lBytes)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static HMODULE MODULEINFO DWORD cb
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define WS_OVERLAPPEDWINDOW
static unsigned __int64 next
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
CHAR lfFaceName[LF_FACESIZE]
BITMAPINFOHEADER bmiHeader
unsigned * phrases_offsets
struct tagHlpFileFile * prev
HLPFILE_PAGE * first_page
unsigned long contents_start
HLPFILE_WINDOWINFO * windows
HLPFILE_MACRO * first_macro
struct tagHlpFileFile * next
struct tagHlpFileMacro * next
struct tagHlpFilePage * next
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateEnhMetaFileW(_In_opt_ HDC, _In_opt_ LPCWSTR, _In_opt_ LPCRECT, _In_opt_ LPCWSTR)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define CHINESEBIG5_CHARSET
#define OUT_DEFAULT_PRECIS
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
#define CLIP_DEFAULT_PRECIS
#define VIETNAMESE_CHARSET
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HICON WINAPI CreateIconFromResourceEx(_In_reads_bytes_(dwResSize) PBYTE presbits, _In_ DWORD dwResSize, _In_ BOOL fIcon, _In_ DWORD dwVer, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT Flags)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)