Author: akhaldi Date: Sun Jun 5 18:34:33 2016 New Revision: 71536 URL: http://svn.reactos.org/svn/reactos?rev=71536&view=rev Log: [WINHLP32] Sync with Wine Staging 1.9.11. CORE-11368
Modified: trunk/reactos/base/applications/winhlp32/callback.c trunk/reactos/base/applications/winhlp32/hlpfile.c trunk/reactos/base/applications/winhlp32/hlpfile.h trunk/reactos/base/applications/winhlp32/macro.c trunk/reactos/base/applications/winhlp32/macro.lex.l trunk/reactos/base/applications/winhlp32/macro.lex.yy.c trunk/reactos/base/applications/winhlp32/winhelp.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/base/applications/winhlp32/callback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/callback.c?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/callback.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/callback.c [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -30,7 +30,7 @@ { unsigned mode = 0; - WINE_FIXME("(%s %x)\n", wine_dbgstr_a(name), flags); + WINE_FIXME("(%s %x)\n", debugstr_a(name), flags); switch (flags) { case 0: mode = GENERIC_READ | GENERIC_WRITE; break; @@ -50,7 +50,7 @@ static HANDLE CALLBACK WHD_OpenBag(HANDLE fs, LPSTR name, BYTE flags) { - WINE_FIXME("(%p %s %x)\n", fs, name, flags); + WINE_FIXME("(%p %s %x)\n", fs, debugstr_a(name), flags); return NULL; } Modified: trunk/reactos/base/applications/winhlp32/hlpfile.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/hlpfile.c?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/hlpfile.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/hlpfile.c [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -361,7 +361,7 @@ if (!hlpfile) return 0; - WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, offset); + WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), offset); if (offset == 0xFFFFFFFF) return NULL; page = NULL; @@ -376,7 +376,7 @@ } if (!found) WINE_ERR("Page of offset %u not found in file %s\n", - offset, hlpfile->lpszPath); + offset, debugstr_a(hlpfile->lpszPath)); return found; } @@ -429,7 +429,7 @@ if (!hlpfile) return NULL; if (!lHash) return HLPFILE_Contents(hlpfile, relative); - WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, lHash); + WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), lHash); /* For win 3.0 files hash values are really page numbers */ if (hlpfile->version <= 16) @@ -441,7 +441,7 @@ ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), comp_PageByHash); if (!ptr) { - WINE_ERR("Page of hash %x not found in file %s\n", lHash, hlpfile->lpszPath); + WINE_ERR("Page of hash %x not found in file %s\n", lHash, debugstr_a(hlpfile->lpszPath)); return NULL; } @@ -458,7 +458,7 @@ if (!hlpfile) return 0; - WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, lMap); + WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), lMap); for (i = 0; i < hlpfile->wMapLen; i++) { @@ -466,7 +466,7 @@ return HLPFILE_PageByOffset(hlpfile, hlpfile->Map[i].offset, relative); } - WINE_ERR("Page of Map %x not found in file %s\n", lMap, hlpfile->lpszPath); + WINE_ERR("Page of Map %x not found in file %s\n", lMap, debugstr_a(hlpfile->lpszPath)); return NULL; } @@ -480,7 +480,7 @@ int leaf, void** next) { *next = (char *)p+strlen(p)+(leaf?5:3); - WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (const char *)key); + WINE_TRACE("Comparing %s with %s\n", debugstr_a((char *)p), debugstr_a((const char *)key)); return strcmp(p, key); } @@ -492,25 +492,37 @@ { BYTE *ptr; - WINE_TRACE("looking for file '%s'\n", name); + WINE_TRACE("looking for file %s\n", debugstr_a(name)); ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer + GET_UINT(hlpfile->file_buffer, 4), name, comp_FindSubFile); + if (!ptr) + { /* Subfiles with bitmap images are usually prefixed with '|', but sometimes not. + Unfortunately, there is no consensus among different pieces of unofficial + documentation. So remove leading '|' and try again. */ + CHAR c = *name++; + if (c == '|') + { + WINE_TRACE("not found. try %s\n", debugstr_a(name)); + ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer + GET_UINT(hlpfile->file_buffer, 4), + name, comp_FindSubFile); + } + } if (!ptr) return FALSE; *subbuf = hlpfile->file_buffer + GET_UINT(ptr, strlen(name)+1); if (*subbuf >= hlpfile->file_buffer + hlpfile->file_buffer_size) { - WINE_ERR("internal file %s does not fit\n", name); + WINE_ERR("internal file %s does not fit\n", debugstr_a(name)); return FALSE; } *subend = *subbuf + GET_UINT(*subbuf, 0); if (*subend > hlpfile->file_buffer + hlpfile->file_buffer_size) { - WINE_ERR("internal file %s does not fit\n", name); + WINE_ERR("internal file %s does not fit\n", debugstr_a(name)); return FALSE; } if (GET_UINT(*subbuf, 0) < GET_UINT(*subbuf, 4) + 9) { - WINE_ERR("invalid size provided for internal file %s\n", name); + WINE_ERR("invalid size provided for internal file %s\n", debugstr_a(name)); return FALSE; } return TRUE; @@ -681,6 +693,7 @@ static BOOL HLPFILE_RtfAddControl(struct RtfData* rd, const char* str) { + WINE_TRACE("%s\n", debugstr_a(str)); if (*str == '\\' || *str == '{') rd->in_text = FALSE; else if (*str == '}') rd->in_text = TRUE; return HLPFILE_RtfAddRawString(rd, str, strlen(str)); @@ -779,7 +792,7 @@ WINE_TRACE("%02x-%02x%02x {%s,%s}\n", start[7 + 15 * i + 0], start[7 + 15 * i + 1], start[7 + 15 * i + 2], - str, str + strlen(str) + 1); + debugstr_a(str), debugstr_a(str + strlen(str) + 1)); /* str points to two null terminated strings: * hotspot name, then link name */ @@ -818,7 +831,7 @@ if (!strcmp(win + 1, file->windows[wnd].name)) break; } if (wnd == -1) - WINE_WARN("Couldn't find window info for %s\n", win); + WINE_WARN("Couldn't find window info for %s\n", debugstr_a(win)); if ((tgt = HeapAlloc(GetProcessHeap(), 0, win - str + 1))) { memcpy(tgt, str, win - str); @@ -1182,20 +1195,13 @@ rd->current_link = link; WINE_TRACE("Link[%d] to %s@%08x:%d\n", - link->cookie, link->string, link->hash, link->window); + link->cookie, debugstr_a(link->string), link->hash, link->window); return link; } -static unsigned HLPFILE_HalfPointsToTwips(unsigned pts) -{ - static unsigned logPxY; - if (!logPxY) - { - HDC hdc = GetDC(NULL); - logPxY = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(NULL, hdc); - } - return MulDiv(pts, 72 * 10, logPxY); +static unsigned HLPFILE_HalfPointsScale(HLPFILE_PAGE* page, unsigned pts) +{ + return pts * page->file->scale - page->file->rounderr; } /*********************************************************************** @@ -1210,9 +1216,8 @@ char *text, *text_base, *text_end; LONG size, blocksize, datalen; unsigned short bits; - unsigned nc, ncol = 1; - short table_width; - BOOL in_table = FALSE; + unsigned ncol = 1; + short nc, lastcol, table_width; char tmp[256]; BOOL ret = FALSE; @@ -1246,17 +1251,18 @@ format = buf + 0x15; format_end = buf + GET_UINT(buf, 0x10); - if (buf[0x14] == 0x20 || buf[0x14] == 0x23) + WINE_TRACE("Record type (buf[0x14]) = 0x%x\n", buf[0x14]); + + if (buf[0x14] == HLP_DISPLAY || buf[0x14] == HLP_TABLE) { fetch_long(&format); *parlen = fetch_ushort(&format); } - if (buf[0x14] == 0x23) - { - char type; - - in_table = TRUE; + if (buf[0x14] == HLP_TABLE) + { + unsigned char type; + ncol = *format++; if (!HLPFILE_RtfAddControl(rd, "\\trowd")) goto done; @@ -1265,6 +1271,7 @@ { table_width = GET_SHORT(format, 0); format += 2; + if (!HLPFILE_RtfAddControl(rd, "\\trqc")) goto done; } else table_width = 32767; @@ -1274,10 +1281,10 @@ { int pos; sprintf(tmp, "\\trgaph%d\\trleft%d", - HLPFILE_HalfPointsToTwips(MulDiv(GET_SHORT(format, 6), table_width, 32767)), - HLPFILE_HalfPointsToTwips(MulDiv(GET_SHORT(format, 0), table_width, 32767))); + MulDiv(HLPFILE_HalfPointsScale(page, GET_SHORT(format, 6)), table_width, 32767), + MulDiv(HLPFILE_HalfPointsScale(page, GET_SHORT(format, 2) - GET_SHORT(format, 6)), table_width, 32767) - 1); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; - pos = HLPFILE_HalfPointsToTwips(MulDiv(GET_SHORT(format, 6) / 2, table_width, 32767)); + pos = GET_SHORT(format, 6) / 2; for (nc = 0; nc < ncol; nc++) { WINE_TRACE("column(%d/%d) gap=%d width=%d\n", @@ -1285,7 +1292,7 @@ GET_SHORT(format, nc*4+2)); pos += GET_SHORT(format, nc * 4) + GET_SHORT(format, nc * 4 + 2); sprintf(tmp, "\\cellx%d", - HLPFILE_HalfPointsToTwips(MulDiv(pos, table_width, 32767))); + MulDiv(HLPFILE_HalfPointsScale(page, pos), table_width, 32767)); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } @@ -1294,27 +1301,32 @@ WINE_TRACE("column(0/%d) gap=%d width=%d\n", ncol, GET_SHORT(format, 0), GET_SHORT(format, 2)); sprintf(tmp, "\\trleft%d\\cellx%d ", - HLPFILE_HalfPointsToTwips(MulDiv(GET_SHORT(format, 0), table_width, 32767)), - HLPFILE_HalfPointsToTwips(MulDiv(GET_SHORT(format, 0) + GET_SHORT(format, 2), - table_width, 32767))); + MulDiv(HLPFILE_HalfPointsScale(page, GET_SHORT(format, 2)), table_width, 32767) - 1, + MulDiv(HLPFILE_HalfPointsScale(page, GET_SHORT(format, 0)), table_width, 32767)); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } format += ncol * 4; } + lastcol = -1; for (nc = 0; nc < ncol; /**/) { WINE_TRACE("looking for format at offset %lu in column %d\n", (SIZE_T)(format - (buf + 0x15)), nc); if (!HLPFILE_RtfAddControl(rd, "\\pard")) goto done; - if (in_table) - { - nc = GET_SHORT(format, 0); - if (nc == -1) break; + if (buf[0x14] == HLP_TABLE) + { + nc = lastcol = GET_SHORT(format, 0); + if (nc == -1) /* last column */ + { + if (!HLPFILE_RtfAddControl(rd, "\\row")) goto done; + rd->char_pos += 2; + break; + } format += 5; if (!HLPFILE_RtfAddControl(rd, "\\intbl")) goto done; } else nc++; - if (buf[0x14] == 0x01) + if (buf[0x14] == HLP_DISPLAY30) format += 6; else format += 4; @@ -1322,32 +1334,32 @@ if (bits & 0x0001) fetch_long(&format); if (bits & 0x0002) { - sprintf(tmp, "\\sb%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\sb%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0004) { - sprintf(tmp, "\\sa%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\sa%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0008) { - sprintf(tmp, "\\sl%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\sl%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0010) { - sprintf(tmp, "\\li%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\li%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0020) { - sprintf(tmp, "\\ri%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\ri%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0040) { - sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsScale(page, fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } if (bits & 0x0100) @@ -1368,7 +1380,7 @@ w = GET_SHORT(format, 0); format += 2; if (w) { - sprintf(tmp, "\\brdrw%d", HLPFILE_HalfPointsToTwips(w)); + sprintf(tmp, "\\brdrw%d", HLPFILE_HalfPointsScale(page, w)); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } @@ -1392,7 +1404,7 @@ } /* FIXME: do kind */ sprintf(tmp, "%s\\tx%d", - kind, HLPFILE_HalfPointsToTwips(tab & 0x3FFF)); + kind, HLPFILE_HalfPointsScale(page, tab & 0x3FFF)); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } @@ -1411,7 +1423,7 @@ while (text < text_end && format < format_end) { - WINE_TRACE("Got text: %s (%p/%p - %p/%p)\n", wine_dbgstr_a(text), text, text_end, format, format_end); + WINE_TRACE("Got text: %s (%p/%p - %p/%p)\n", debugstr_a(text), text, text_end, format, format_end); textsize = strlen(text); if (textsize) { @@ -1428,13 +1440,13 @@ /* else: null text, keep on storing attributes */ text += textsize + 1; + WINE_TRACE("format=0x%02x\n", *format); if (*format == 0xff) { format++; break; } - WINE_TRACE("format=%02x\n", *format); switch (*format) { case 0x20: @@ -1482,15 +1494,24 @@ break; case 0x82: - if (in_table) + if (buf[0x14] == HLP_TABLE) { if (format[1] != 0xFF) { if (!HLPFILE_RtfAddControl(rd, "\\par\\intbl")) goto done; } + else if (GET_SHORT(format, 2) == -1) + { + if (!HLPFILE_RtfAddControl(rd, "\\cell\\intbl\\row")) goto done; + rd->char_pos += 2; + } + else if (GET_SHORT(format, 2) == lastcol) + { + if (!HLPFILE_RtfAddControl(rd, "\\par\\pard")) goto done; + } else { - if (!HLPFILE_RtfAddControl(rd, "\\cell\\pard\\intbl")) goto done; + if (!HLPFILE_RtfAddControl(rd, "\\cell\\pard")) goto done; } } else if (!HLPFILE_RtfAddControl(rd, "\\par")) goto done; @@ -1545,7 +1566,7 @@ } break; case 0x05: - WINE_FIXME("Got an embedded element %s\n", format + 6); + WINE_FIXME("Got an embedded element %s\n", debugstr_a((char *)format + 6)); break; default: WINE_FIXME("Got a type %d picture\n", type); @@ -1585,7 +1606,7 @@ case 0xC8: case 0xCC: - WINE_TRACE("macro => %s\n", format + 3); + WINE_TRACE("macro => %s\n", debugstr_a((char *)format + 3)); HLPFILE_AllocLink(rd, hlp_link_macro, (const char*)format + 3, GET_USHORT(format, 1), 0, !(*format & 4), FALSE, -1); format += 3 + GET_USHORT(format, 1); @@ -1605,6 +1626,7 @@ case 0xE3: case 0xE6: case 0xE7: + WINE_WARN("jump topic 1 => %u\n", GET_UINT(format, 1)); HLPFILE_AllocLink(rd, (*format & 1) ? hlp_link_link : hlp_link_popup, page->file->lpszPath, -1, GET_UINT(format, 1), !(*format & 4), FALSE, -1); @@ -1634,7 +1656,7 @@ if (!strcmp(ptr, page->file->windows[wnd].name)) break; } if (wnd == -1) - WINE_WARN("Couldn't find window info for %s\n", ptr); + WINE_WARN("Couldn't find window info for %s\n", debugstr_a(ptr)); ptr += strlen(ptr) + 1; /* fall through */ case 4: @@ -1654,11 +1676,6 @@ format++; } } - } - if (in_table) - { - if (!HLPFILE_RtfAddControl(rd, "\\row\\par\\pard\\plain")) goto done; - rd->char_pos += 2; } ret = TRUE; done: @@ -1787,12 +1804,12 @@ switch (buf[0x14]) { - case 0x02: + case HLP_TOPICHDR: if (count++) goto done; break; - case 0x01: - case 0x20: - case 0x23: + case HLP_DISPLAY30: + case HLP_DISPLAY: + case HLP_TABLE: if (!HLPFILE_BrowseParagraph(page, rd, buf, end, &parlen)) return FALSE; if (relative > index * 0x8000 + offs) rd->char_pos_rel = rd->char_pos; @@ -1849,6 +1866,26 @@ hlpfile->fonts = HeapAlloc(GetProcessHeap(), 0, sizeof(HLPFILE_FONT) * dscr_num); len = (dscr_offset - face_offset) / face_num; + + /* mvb font */ + if (face_offset >= 16) + { + hlpfile->scale = 1; + hlpfile->rounderr = 0; + WINE_FIXME("mvb font: not implemented\n"); + return FALSE; + } + /* new font */ + if (face_offset >= 12) + { + hlpfile->scale = 1; + hlpfile->rounderr = 0; + WINE_FIXME("new font: not implemented\n"); + return FALSE; + } + /* old font */ + hlpfile->scale = 10; + hlpfile->rounderr = 5; /* EPP for (i = face_offset; i < dscr_offset; i += len) */ /* EPP WINE_FIXME("[%d]: %*s\n", i / len, len, ref + i); */ for (i = 0; i < dscr_num; i++) @@ -1906,7 +1943,7 @@ X(5, "smallCaps"), ref[dscr_offset + i * 11 + 1], family, - hlpfile->fonts[i].LogFont.lfFaceName, idx, + debugstr_a(hlpfile->fonts[i].LogFont.lfFaceName), idx, GET_UINT(ref, dscr_offset + i * 11 + 5) & 0x00FFFFFF); } return TRUE; @@ -2002,7 +2039,7 @@ hlpfile->lpszTitle = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); if (!hlpfile->lpszTitle) return FALSE; strcpy(hlpfile->lpszTitle, str); - WINE_TRACE("Title: %s\n", hlpfile->lpszTitle); + WINE_TRACE("Title: %s\n", debugstr_a(hlpfile->lpszTitle)); /* Nothing more to parse */ return TRUE; } @@ -2016,7 +2053,7 @@ hlpfile->lpszTitle = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); if (!hlpfile->lpszTitle) return FALSE; strcpy(hlpfile->lpszTitle, str); - WINE_TRACE("Title: %s\n", hlpfile->lpszTitle); + WINE_TRACE("Title: %s\n", debugstr_a(hlpfile->lpszTitle)); break; case 2: @@ -2024,7 +2061,7 @@ hlpfile->lpszCopyright = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); if (!hlpfile->lpszCopyright) return FALSE; strcpy(hlpfile->lpszCopyright, str); - WINE_TRACE("Copyright: %s\n", hlpfile->lpszCopyright); + WINE_TRACE("Copyright: %s\n", debugstr_a(hlpfile->lpszCopyright)); break; case 3: @@ -2091,12 +2128,12 @@ flags & 0x0020 ? 'W' : 'w', flags & 0x0040 ? 'H' : 'h', flags & 0x0080 ? 'S' : 's', - wi->type, wi->name, wi->caption, wi->origin.x, wi->origin.y, + debugstr_a(wi->type), debugstr_a(wi->name), debugstr_a(wi->caption), wi->origin.x, wi->origin.y, wi->size.cx, wi->size.cy); } break; case 8: - WINE_WARN("Citation: '%s'\n", ptr + 4); + WINE_WARN("Citation: %s\n", debugstr_a((char *)ptr + 4)); break; case 11: hlpfile->charset = ptr[4]; @@ -2555,8 +2592,8 @@ page->browse_fwd = hlpfile->TOMap[page->browse_fwd]; } - WINE_TRACE("Added page[%d]: title='%s' %08x << %08x >> %08x\n", - page->wNumber, page->lpszTitle, + WINE_TRACE("Added page[%d]: title=%s %08x << %08x >> %08x\n", + page->wNumber, debugstr_a(page->lpszTitle), page->browse_bwd, page->offset, page->browse_fwd); /* now load macros */ @@ -2566,7 +2603,7 @@ unsigned len = strlen(ptr); char* macro_str; - WINE_TRACE("macro: %s\n", ptr); + WINE_TRACE("macro: %s\n", debugstr_a(ptr)); macro = HeapAlloc(GetProcessHeap(), 0, sizeof(HLPFILE_MACRO) + len + 1); macro->lpszMacro = macro_str = (char*)(macro + 1); memcpy(macro_str, ptr, len + 1); @@ -2593,7 +2630,7 @@ if (buf + 0x19 > end) {WINE_WARN("header too small\n"); return FALSE;}; tmp = buf + 0x15; - if (buf[0x14] == 0x20 || buf[0x14] == 0x23) + if (buf[0x14] == HLP_DISPLAY || buf[0x14] == HLP_TABLE) { fetch_long(&tmp); *len = fetch_ushort(&tmp); @@ -2668,7 +2705,7 @@ switch (buf[0x14]) { - case 0x02: + case HLP_TOPICHDR: /* Topic Header */ if (hlpfile->version <= 16) topicoffset = ref + index * 12; else @@ -2676,9 +2713,9 @@ if (!HLPFILE_AddPage(hlpfile, buf, end, ref, topicoffset)) return FALSE; break; - case 0x01: - case 0x20: - case 0x23: + case HLP_DISPLAY30: + case HLP_DISPLAY: + case HLP_TABLE: if (!HLPFILE_SkipParagraph(hlpfile, buf, end, &len)) return FALSE; offs += len; break; Modified: trunk/reactos/base/applications/winhlp32/hlpfile.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/hlpfile.h?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/hlpfile.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/hlpfile.h [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -149,6 +149,9 @@ COLORREF popup_color; LPSTR help_on_file; + + int scale; + int rounderr; } HLPFILE; /* @@ -199,3 +202,8 @@ BOOL HLPFILE_BrowsePage(HLPFILE_PAGE*, struct RtfData* rd, unsigned font_scale, unsigned relative); + +#define HLP_DISPLAY30 0x01 /* version 3.0 displayable information */ +#define HLP_TOPICHDR 0x02 /* topic header information */ +#define HLP_DISPLAY 0x20 /* version 3.1 displayable information */ +#define HLP_TABLE 0x23 /* version 3.1 table */ Modified: trunk/reactos/base/applications/winhlp32/macro.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/macro.c?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/macro.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/macro.c [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -68,7 +68,7 @@ LONG size; LPSTR ptr; - WINE_TRACE("(\"%s\", \"%s\", %s)\n", id, name, macro); + WINE_TRACE("(%s, %s, %s)\n", debugstr_a(id), debugstr_a(name), debugstr_a(macro)); size = sizeof(WINHELP_BUTTON) + strlen(id) + strlen(name) + strlen(macro) + 3; @@ -101,17 +101,17 @@ static void CALLBACK MACRO_DestroyButton(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } void CALLBACK MACRO_DisableButton(LPCSTR id) { WINHELP_BUTTON** b; - WINE_TRACE("(\"%s\")\n", id); + WINE_TRACE("(%s)\n", debugstr_a(id)); b = MACRO_LookupButton(MACRO_CurrentWindow(), id); - if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;} + if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;} EnableWindow((*b)->hWnd, FALSE); } @@ -120,10 +120,10 @@ { WINHELP_BUTTON** b; - WINE_TRACE("(\"%s\")\n", id); + WINE_TRACE("(%s)\n", debugstr_a(id)); b = MACRO_LookupButton(MACRO_CurrentWindow(), id); - if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;} + if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;} EnableWindow((*b)->hWnd, TRUE); } @@ -132,7 +132,7 @@ { HLPFILE* hlpfile; - WINE_TRACE("(\"%s\", \"%s\")\n", lpszPath, lpszWindow); + WINE_TRACE("(%s, %s)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow)); if ((hlpfile = WINHELP_LookupHelpFile(lpszPath))) WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, 0, WINHELP_GetWindowInfo(hlpfile, lpszWindow), @@ -151,12 +151,12 @@ static void CALLBACK MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str) { - WINE_FIXME("(%u, %u, \"%s\")\n", u1, u2, str); + WINE_FIXME("(%u, %u, %s)\n", u1, u2, debugstr_a(str)); } static void CALLBACK MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2) { - WINE_FIXME("(\"%s\", %u, \"%s\")\n", str1, u, str2); + WINE_FIXME("(%s, %u, %s)\n", debugstr_a(str1), u, debugstr_a(str2)); } void CALLBACK MACRO_Annotate(void) @@ -166,7 +166,7 @@ static void CALLBACK MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4) { - WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\")\n", str1, str2, str3, str4); + WINE_FIXME("(%s, %s, %s, %s)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4)); } static void CALLBACK MACRO_Back(void) @@ -222,10 +222,10 @@ LONG size; LPSTR ptr; - WINE_TRACE("(\"%s\", \"%s\")\n", id, macro); + WINE_TRACE("(%s, %s)\n", debugstr_a(id), debugstr_a(macro)); b = MACRO_LookupButton(win, id); - if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;} + if (!*b) {WINE_FIXME("Couldn't find button %s\n", debugstr_a(id)); return;} size = sizeof(WINHELP_BUTTON) + strlen(id) + strlen((*b)->lpszName) + strlen(macro) + 3; @@ -257,7 +257,7 @@ static void CALLBACK MACRO_ChangeEnable(LPCSTR id, LPCSTR macro) { - WINE_TRACE("(\"%s\", \"%s\")\n", id, macro); + WINE_TRACE("(%s, %s)\n", debugstr_a(id), debugstr_a(macro)); MACRO_ChangeButtonBinding(id, macro); MACRO_EnableButton(id); @@ -265,12 +265,12 @@ static void CALLBACK MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2) { - WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2); + WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2)); } static void CALLBACK MACRO_CheckItem(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_CloseSecondarys(void) @@ -292,7 +292,7 @@ WINHELP_WINDOW *win; WINHELP_WINDOW *next; - WINE_TRACE("(\"%s\")\n", lpszWindow); + WINE_TRACE("(%s)\n", debugstr_a(lpszWindow)); if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main"; @@ -306,7 +306,7 @@ static void CALLBACK MACRO_Compare(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_Contents(void) @@ -321,7 +321,7 @@ static void CALLBACK MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u) { - WINE_FIXME("(\"%s\", \"%s\", %u)\n", str1, str2, u); + WINE_FIXME("(%s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), u); } void CALLBACK MACRO_CopyDialog(void) @@ -336,22 +336,22 @@ static void CALLBACK MACRO_DeleteItem(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_DeleteMark(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_DisableItem(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_EnableItem(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_EndMPrint(void) @@ -364,7 +364,7 @@ HINSTANCE ret; WINE_TRACE("(%s, %s, %u, %s)\n", - wine_dbgstr_a(pgm), wine_dbgstr_a(args), cmd_show, wine_dbgstr_a(topic)); + debugstr_a(pgm), debugstr_a(args), cmd_show, debugstr_a(topic)); ret = ShellExecuteA(Globals.active_win ? Globals.active_win->hMainWnd : NULL, "open", pgm, args, ".", cmd_show); @@ -377,7 +377,7 @@ static void CALLBACK MACRO_ExecProgram(LPCSTR str, LONG u) { - WINE_FIXME("(\"%s\", %u)\n", str, u); + WINE_FIXME("(%s, %u)\n", debugstr_a(str), u); } void CALLBACK MACRO_Exit(void) @@ -390,22 +390,22 @@ static void CALLBACK MACRO_ExtAbleItem(LPCSTR str, LONG u) { - WINE_FIXME("(\"%s\", %u)\n", str, u); + WINE_FIXME("(%s, %u)\n", debugstr_a(str), u); } static void CALLBACK MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2) { - WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\", %u, %u)\n", str1, str2, str3, str4, u1, u2); + WINE_FIXME("(%s, %s, %s, %s, %u, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4), u1, u2); } static void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2) { - WINE_FIXME("(\"%s\", \"%s\", \"%s\", %u, %u)\n", str1, str2, str3, u1, u2); + WINE_FIXME("(%s, %s, %s, %u, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), u1, u2); } static BOOL CALLBACK MACRO_FileExist(LPCSTR str) { - WINE_TRACE("(\"%s\")\n", str); + WINE_TRACE("(%s)\n", debugstr_a(str)); return GetFileAttributesA(str) != INVALID_FILE_ATTRIBUTES; } @@ -443,7 +443,7 @@ { WINHELP_WINDOW *win; - WINE_TRACE("(\"%s\")\n", lpszWindow); + WINE_TRACE("(%s)\n", debugstr_a(lpszWindow)); if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main"; @@ -454,12 +454,12 @@ static void CALLBACK MACRO_Generate(LPCSTR str, LONG w, LONG l) { - WINE_FIXME("(\"%s\", %x, %x)\n", str, w, l); + WINE_FIXME("(%s, %x, %x)\n", debugstr_a(str), w, l); } static void CALLBACK MACRO_GotoMark(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } void CALLBACK MACRO_HelpOn(void) @@ -535,12 +535,12 @@ static void CALLBACK MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u) { - WINE_FIXME("(\"%s\", \"%s\", \"%s\", \"%s\", %u)\n", str1, str2, str3, str4, u); + WINE_FIXME("(%s, %s, %s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), debugstr_a(str3), debugstr_a(str4), u); } static void CALLBACK MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u) { - WINE_FIXME("(\"%s\", \"%s\", %u)\n", str1, str2, u); + WINE_FIXME("(%s, %s, %u)\n", debugstr_a(str1), debugstr_a(str2), u); } static BOOL CALLBACK MACRO_IsBook(void) @@ -551,13 +551,13 @@ static BOOL CALLBACK MACRO_IsMark(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); return FALSE; } static BOOL CALLBACK MACRO_IsNotMark(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); return TRUE; } @@ -565,7 +565,7 @@ { HLPFILE* hlpfile; - WINE_TRACE("(\"%s\", \"%s\", %d)\n", lpszPath, lpszWindow, context); + WINE_TRACE("(%s, %s, %d)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), context); if ((hlpfile = WINHELP_LookupHelpFile(lpszPath))) /* Some madness: what user calls 'context', hlpfile calls 'map' */ WINHELP_OpenHelpWindow(HLPFILE_PageByMap, hlpfile, context, @@ -577,7 +577,7 @@ { HLPFILE* hlpfile; - WINE_TRACE("(\"%s\", \"%s\", %u)\n", lpszPath, lpszWindow, lHash); + WINE_TRACE("(%s, %s, %u)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), lHash); if (!lpszPath || !lpszPath[0]) hlpfile = MACRO_CurrentWindow()->page->file; else @@ -597,7 +597,7 @@ { LPSTR ptr; - WINE_TRACE("(\"%s\", \"%s\")\n", lpszPathWindow, topic_id); + WINE_TRACE("(%s, %s)\n", debugstr_a(lpszPathWindow), debugstr_a(topic_id)); if ((ptr = strchr(lpszPathWindow, '>')) != NULL) { LPSTR tmp; @@ -625,12 +625,12 @@ */ static void CALLBACK MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword) { - WINE_FIXME("(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword); + WINE_FIXME("(%s, %s, %s)\n", debugstr_a(lpszPath), debugstr_a(lpszWindow), debugstr_a(keyword)); } static void CALLBACK MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3) { - WINE_FIXME("(\"%s\", %u, \"%s\", \"%s\")\n", str1, u, str2, str3); + WINE_FIXME("(%s, %u, %s, %s)\n", debugstr_a(str1), u, debugstr_a(str2), debugstr_a(str3)); } static void CALLBACK MACRO_Menu(void) @@ -645,7 +645,7 @@ static void CALLBACK MACRO_MPrintID(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_Next(void) @@ -670,22 +670,22 @@ void CALLBACK MACRO_PopupContext(LPCSTR str, LONG u) { - WINE_FIXME("(\"%s\", %u)\n", str, u); + WINE_FIXME("(%s, %u)\n", debugstr_a(str), u); } static void CALLBACK MACRO_PopupHash(LPCSTR str, LONG u) { - WINE_FIXME("(\"%s\", %u)\n", str, u); + WINE_FIXME("(%s, %u)\n", debugstr_a(str), u); } static void CALLBACK MACRO_PopupId(LPCSTR str1, LPCSTR str2) { - WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2); + WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2)); } static void CALLBACK MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str) { - WINE_FIXME("(%i, %i, %u, %u, %u, \"%s\")\n", i1, i2, u1, u2, u3, str); + WINE_FIXME("(%i, %i, %u, %u, %u, %s)\n", i1, i2, u1, u2, u3, debugstr_a(str)); } static void CALLBACK MACRO_Prev(void) @@ -745,7 +745,7 @@ int size; WINHELP_DLL* dll; - WINE_TRACE("(\"%s\", \"%s\", \"%s\")\n", dll_name, proc, args); + WINE_TRACE("(%s, %s, %s)\n", debugstr_a(dll_name), debugstr_a(proc), debugstr_a(args)); /* FIXME: are the registered DLLs global or linked to the current file ??? * We assume globals (as we did for macros, but is this really the case ???) @@ -761,14 +761,14 @@ /* FIXME: the library will not be unloaded until exit of program * We don't send the DW_TERM message */ - WINE_TRACE("Loading %s\n", dll_name); + WINE_TRACE("Loading %s\n", debugstr_a(dll_name)); /* FIXME: should look in the directory where current hlpfile * is loaded from */ if (hLib == NULL) { /* FIXME: internationalisation for error messages */ - WINE_FIXME("Cannot find dll %s\n", dll_name); + WINE_FIXME("Cannot find dll %s\n", debugstr_a(dll_name)); } else if ((dll = HeapAlloc(GetProcessHeap(), 0, sizeof(*dll)))) { @@ -778,7 +778,7 @@ Globals.dlls = dll; dll->handler = (WINHELP_LDLLHandler)GetProcAddress(dll->hLib, "LDLLHandler"); dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG; - WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name); + WINE_TRACE("Got class %x for DLL %s\n", dll->class, debugstr_a(dll_name)); if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0); if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (LONG_PTR)&Callbacks, 0); } @@ -787,7 +787,7 @@ if (dll && !(fn = GetProcAddress(dll->hLib, proc))) { /* FIXME: internationalisation for error messages */ - WINE_FIXME("Cannot find proc %s in dll %s\n", dll_name, proc); + WINE_FIXME("Cannot find proc %s in dll %s\n", debugstr_a(dll_name), debugstr_a(proc)); } size = ++MACRO_NumLoaded * sizeof(struct MacroDesc); @@ -798,7 +798,7 @@ MACRO_Loaded[MACRO_NumLoaded - 1].isBool = FALSE; MACRO_Loaded[MACRO_NumLoaded - 1].arguments = StrDup(args); /* FIXME: never freed */ MACRO_Loaded[MACRO_NumLoaded - 1].fn = fn; - WINE_TRACE("Added %s(%s) at %p\n", proc, args, fn); + WINE_TRACE("Added %s(%s) at %p\n", debugstr_a(proc), debugstr_a(args), fn); } static void CALLBACK MACRO_RemoveAccelerator(LONG u1, LONG u2) @@ -813,7 +813,7 @@ static void CALLBACK MACRO_SaveMark(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_Search(void) @@ -823,14 +823,14 @@ void CALLBACK MACRO_SetContents(LPCSTR str, LONG u) { - WINE_FIXME("(\"%s\", %u)\n", str, u); + WINE_FIXME("(%s, %u)\n", debugstr_a(str), u); } static void CALLBACK MACRO_SetHelpOnFile(LPCSTR str) { HLPFILE_PAGE* page = MACRO_CurrentWindow()->page; - WINE_TRACE("(\"%s\")\n", str); + WINE_TRACE("(%s)\n", debugstr_a(str)); HeapFree(GetProcessHeap(), 0, page->file->help_on_file); page->file->help_on_file = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); @@ -849,12 +849,12 @@ static void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4) { - WINE_FIXME("(\"%s\", \"%s\", %u, %u, \"%s\", \"%s\")\n", str1, str2, u1, u2, str3, str4); + WINE_FIXME("(%s, %s, %u, %u, %s, %s)\n", debugstr_a(str1), debugstr_a(str2), u1, u2, debugstr_a(str3), debugstr_a(str4)); } static void CALLBACK MACRO_ShortCut(LPCSTR str1, LPCSTR str2, LONG w, LONG l, LPCSTR str) { - WINE_FIXME("(\"%s\", \"%s\", %x, %x, \"%s\")\n", str1, str2, w, l, str); + WINE_FIXME("(%s, %s, %x, %x, %s)\n", debugstr_a(str1), debugstr_a(str2), w, l, debugstr_a(str)); } static void CALLBACK MACRO_TCard(LONG u) @@ -869,24 +869,24 @@ static BOOL CALLBACK MACRO_TestALink(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); return FALSE; } static BOOL CALLBACK MACRO_TestKLink(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); return FALSE; } static void CALLBACK MACRO_UncheckItem(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + WINE_FIXME("(%s)\n", debugstr_a(str)); } static void CALLBACK MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2) { - WINE_FIXME("(\"%s\", \"%s\")\n", str1, str2); + WINE_FIXME("(%s, %s)\n", debugstr_a(str1), debugstr_a(str2)); } @@ -1043,7 +1043,7 @@ if (!strcmp(name, "qchPath") || !strcmp(name, "qError") || !strcmp(name, "lTopicNo") || !strcmp(name, "hfs") || !strcmp(name, "coForeground") || !strcmp(name, "coBackground")) { - WINE_FIXME("keyword %s not substituted in macro parsing\n", name); + WINE_FIXME("keyword %s not substituted in macro parsing\n", debugstr_a(name)); return EMPTY; } Modified: trunk/reactos/base/applications/winhlp32/macro.lex.l URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/macro.lex.l?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/macro.lex.l [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/macro.lex.l [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -163,7 +163,7 @@ int t; unsigned int len = 0, idx = 0; - WINE_TRACE("Checking %s\n", args); + WINE_TRACE("Checking %s\n", debugstr_a(args)); if (yylex() != '(') {WINE_WARN("missing (\n");return -1;} @@ -173,7 +173,7 @@ for (;;) { t = yylex(); - WINE_TRACE("Got %s <=> %c\n", ts(t), *args); + WINE_TRACE("Got %s <=> %c\n", debugstr_a(ts(t)), *args); switch (*args) { @@ -195,7 +195,7 @@ return -1; break; default: - WINE_WARN("unexpected %s while args is %c\n", ts(t), *args); + WINE_WARN("unexpected %s while args is %c\n", debugstr_a(ts(t)), *args); return -1; } idx++; @@ -320,7 +320,7 @@ BOOL ret = TRUE; int t; - WINE_TRACE("%s\n", wine_dbgstr_a(macro)); + WINE_TRACE("%s\n", debugstr_a(macro)); prev_lex_data = lex_data; lex_data = &curr_lex_data; @@ -334,14 +334,14 @@ switch (t) { case VOID_FUNCTION: - WINE_TRACE("got type void func(%s)\n", yylval.proto); + WINE_TRACE("got type void func(%s)\n", debugstr_a(yylval.proto)); MACRO_CallVoidFunc(yylval.function, yylval.proto); break; case BOOL_FUNCTION: - WINE_WARN("got type bool func(%s)\n", yylval.proto); + WINE_WARN("got type bool func(%s)\n", debugstr_a(yylval.proto)); break; default: - WINE_WARN("got unexpected type %s\n", ts(t)); + WINE_WARN("got unexpected type %s\n", debugstr_a(ts(t))); YY_FLUSH_BUFFER; ret = FALSE; goto done; Modified: trunk/reactos/base/applications/winhlp32/macro.lex.yy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/macro.lex.yy.c?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/macro.lex.yy.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/macro.lex.yy.c [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -142,15 +142,7 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -162,7 +154,12 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; extern FILE *yyin, *yyout; @@ -188,11 +185,6 @@ #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -210,7 +202,7 @@ /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -280,8 +272,8 @@ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -309,7 +301,7 @@ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -535,7 +527,7 @@ */ #include <unistd.h> #endif - + #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif @@ -563,7 +555,7 @@ void yyset_out (FILE * out_str ); -int yyget_leng (void ); +yy_size_t yyget_leng (void ); char *yyget_text (void ); @@ -603,12 +595,7 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1067,21 +1054,21 @@ else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1112,7 +1099,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1207,7 +1194,7 @@ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 27); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT @@ -1234,7 +1221,7 @@ else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1506,7 +1493,7 @@ */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1603,12 +1590,12 @@ * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -1690,7 +1677,7 @@ /** Get the length of the current token. * */ -int yyget_leng (void) +yy_size_t yyget_leng (void) { return yyleng; } @@ -1898,7 +1885,7 @@ int t; unsigned int len = 0, idx = 0; - WINE_TRACE("Checking %s\n", args); + WINE_TRACE("Checking %s\n", debugstr_a(args)); if (yylex() != '(') {WINE_WARN("missing (\n");return -1;} @@ -1908,7 +1895,7 @@ for (;;) { t = yylex(); - WINE_TRACE("Got %s <=> %c\n", ts(t), *args); + WINE_TRACE("Got %s <=> %c\n", debugstr_a(ts(t)), *args); switch (*args) { @@ -1930,7 +1917,7 @@ return -1; break; default: - WINE_WARN("unexpected %s while args is %c\n", ts(t), *args); + WINE_WARN("unexpected %s while args is %c\n", debugstr_a(ts(t)), *args); return -1; } idx++; @@ -2055,7 +2042,7 @@ BOOL ret = TRUE; int t; - WINE_TRACE("%s\n", wine_dbgstr_a(macro)); + WINE_TRACE("%s\n", debugstr_a(macro)); prev_lex_data = lex_data; lex_data = &curr_lex_data; @@ -2069,14 +2056,14 @@ switch (t) { case VOID_FUNCTION: - WINE_TRACE("got type void func(%s)\n", yylval.proto); + WINE_TRACE("got type void func(%s)\n", debugstr_a(yylval.proto)); MACRO_CallVoidFunc(yylval.function, yylval.proto); break; case BOOL_FUNCTION: - WINE_WARN("got type bool func(%s)\n", yylval.proto); + WINE_WARN("got type bool func(%s)\n", debugstr_a(yylval.proto)); break; default: - WINE_WARN("got unexpected type %s\n", ts(t)); + WINE_WARN("got unexpected type %s\n", debugstr_a(ts(t))); YY_FLUSH_BUFFER; ret = FALSE; goto done; Modified: trunk/reactos/base/applications/winhlp32/winhelp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/winhelp.c?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/base/applications/winhlp32/winhelp.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/winhlp32/winhelp.c [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -248,7 +248,7 @@ if (strcmp(name, "main") != 0) { - WINE_FIXME("Couldn't find window info for %s\n", name); + WINE_FIXME("Couldn't find window info for %s\n", debugstr_a(name)); assert(0); return NULL; } @@ -350,7 +350,7 @@ char* ptr = (wh->ofsFilename) ? (LPSTR)wh + wh->ofsFilename : NULL; WINE_TRACE("Got[%u]: cmd=%u data=%08x fn=%s\n", - wh->size, wh->command, wh->data, ptr); + wh->size, wh->command, wh->data, debugstr_a(ptr)); switch (wh->command) { case HELP_CONTEXT: @@ -1186,7 +1186,7 @@ HWND hListWnd = cookie; int count; - WINE_TRACE("Adding '%s' to search list\n", (char *)p); + WINE_TRACE("Adding %s to search list\n", debugstr_a((char *)p)); SendMessageA(hListWnd, LB_INSERTSTRING, -1, (LPARAM)p); count = SendMessageW(hListWnd, LB_GETCOUNT, 0, 0); SendMessageW(hListWnd, LB_SETITEMDATA, count-1, (LPARAM)p); @@ -1669,7 +1669,7 @@ break; default: - WINE_FIXME("Unsupported cmd line: %s\n", cmdline); + WINE_FIXME("Unsupported cmd line: %s\n", debugstr_a(cmdline)); break; } } Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71536&r1=71535&r2=71536&view=diff ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun 5 18:34:33 2016 @@ -239,7 +239,7 @@ reactos/base/applications/iexplore # Synced to WineStaging-1.9.4 reactos/base/applications/notepad # Forked at Wine-20041201 reactos/base/applications/regedit # Out of sync -reactos/base/applications/winhlp32 # Synced to WineStaging-1.9.4 +reactos/base/applications/winhlp32 # Synced to WineStaging-1.9.11 reactos/base/applications/wordpad # Synced to WineStaging-1.9.4 reactos/base/services/rpcss # Synced to WineStaging-1.9.4 reactos/base/shell/progman # Forked at WineStaging-1.9.4