winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2012
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
827 discussions
Start a n
N
ew thread
Vincent Povirk : gdiplus: Scale all points in GdipAddPathString instead of the font.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: cae52d078a871f184653da7ff171b337b2848e21 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cae52d078a871f184653da7ff…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Jun 21 15:31:27 2012 -0500 gdiplus: Scale all points in GdipAddPathString instead of the font. --- dlls/gdiplus/graphicspath.c | 46 +++++++++++++++++++++++++++++-------------- 1 files changed, 31 insertions(+), 15 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index f61d588..3095c08 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -840,7 +840,8 @@ static float fromfixedpoint(const FIXED v) struct format_string_args { GpPath *path; - UINT maxY; + float maxY; + float scale; }; static GpStatus format_string_callback(HDC dc, @@ -853,8 +854,8 @@ static GpStatus format_string_callback(HDC dc, struct format_string_args *args = priv; GpPath *path = args->path; GpStatus status = Ok; - float x = bounds->X; - float y = bounds->Y; + float x = rect->X + (bounds->X - rect->X) * args->scale; + float y = rect->Y + (bounds->Y - rect->Y) * args->scale; int i; if (underlined_index_count) @@ -866,7 +867,7 @@ static GpStatus format_string_callback(HDC dc, TTPOLYGONHEADER *ph = NULL; char *start; DWORD len, ofs = 0; - UINT bb_end; + float bb_end; len = GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, 0, NULL, &identity); if (len == GDI_ERROR) { @@ -881,7 +882,7 @@ static GpStatus format_string_callback(HDC dc, break; } GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, len, start, &identity); - bb_end = gm.gmBlackBoxY + gm.gmptGlyphOrigin.y; + bb_end = (gm.gmBlackBoxY + gm.gmptGlyphOrigin.y) * args->scale; if (bb_end + y > args->maxY) args->maxY = bb_end + y; @@ -891,8 +892,8 @@ static GpStatus format_string_callback(HDC dc, DWORD ofs_start = ofs; ph = (TTPOLYGONHEADER*)&start[ofs]; path->pathdata.Types[path->pathdata.Count] = PathPointTypeStart; - path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(ph->pfxStart.x); - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(ph->pfxStart.y); + path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(ph->pfxStart.x) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(ph->pfxStart.y) * args->scale; TRACE("Starting at count %i with pos %f, %f)\n", path->pathdata.Count, x, y); ofs += sizeof(*ph); while (ofs - ofs_start < ph->cb) @@ -907,16 +908,16 @@ static GpStatus format_string_callback(HDC dc, for (j = 0; j < curve->cpfx; ++j) { path->pathdata.Types[path->pathdata.Count] = PathPointTypeLine; - path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x); - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y); + path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y) * args->scale; } break; case TT_PRIM_CSPLINE: for (j = 0; j < curve->cpfx; ++j) { path->pathdata.Types[path->pathdata.Count] = PathPointTypeBezier; - path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x); - path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y); + path->pathdata.Points[path->pathdata.Count].X = x + fromfixedpoint(curve->apfx[j].x) * args->scale; + path->pathdata.Points[path->pathdata.Count++].Y = y + bb_end - fromfixedpoint(curve->apfx[j].y) * args->scale; } break; default: @@ -927,8 +928,8 @@ static GpStatus format_string_callback(HDC dc, path->pathdata.Types[path->pathdata.Count - 1] |= PathPointTypeCloseSubpath; } path->newfigure = TRUE; - x += gm.gmCellIncX; - y += gm.gmCellIncY; + x += gm.gmCellIncX * args->scale; + y += gm.gmCellIncY * args->scale; GdipFree(ph); if (status != Ok) @@ -948,12 +949,24 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT GpPath *backup; struct format_string_args args; int i; + UINT16 native_height; + RectF scaled_layout_rect; + TEXTMETRICW textmetric; FIXME("(%p, %s, %d, %p, %d, %f, %p, %p): stub\n", path, debugstr_w(string), length, family, style, emSize, layoutRect, format); if (!path || !string || !family || !emSize || !layoutRect || !format) return InvalidParameter; - status = GdipCreateFont(family, emSize, style, UnitPixel, &font); + status = GdipGetEmHeight(family, style, &native_height); + if (status != Ok) + return status; + + scaled_layout_rect.X = layoutRect->X; + scaled_layout_rect.Y = layoutRect->Y; + scaled_layout_rect.Width = layoutRect->Width * native_height / emSize; + scaled_layout_rect.Height = layoutRect->Height * native_height / emSize; + + status = GdipCreateFont(family, native_height, style, UnitPixel, &font); if (status != Ok) return status; @@ -974,9 +987,12 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT dc = CreateCompatibleDC(0); SelectObject(dc, hfont); + GetTextMetricsW(dc, &textmetric); + args.path = path; args.maxY = 0; - status = gdip_format_string(dc, string, length, NULL, layoutRect, format, format_string_callback, &args); + args.scale = emSize / native_height; + status = gdip_format_string(dc, string, length, NULL, &scaled_layout_rect, format, format_string_callback, &args); DeleteDC(dc); DeleteObject(hfont);
1
0
0
0
Detlef Riekenberg : shell32/tests: Ignore case when comparing filenames.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: a8643ccc85345267f9e3731bdc48ac18bdd69f41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8643ccc85345267f9e3731bd…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Jun 22 05:07:32 2012 +0200 shell32/tests: Ignore case when comparing filenames. --- dlls/shell32/tests/shelldispatch.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 307e0fc..9d8d70b 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -140,7 +140,7 @@ static void test_namespace(void) p = path + lstrlenW(path); while (path < p && *(p - 1) != '\\') p--; - ok(!lstrcmpW(title, p), "expected %s, got %s\n", + ok(!lstrcmpiW(title, p), "expected %s, got %s\n", wine_dbgstr_w(p), wine_dbgstr_w(title)); } else skip("skipping Folder::get_Title test\n"); @@ -157,7 +157,7 @@ static void test_namespace(void) r = FolderItem_get_Path(item, &item_path); ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); if (pSHGetFolderPathW) - ok(!lstrcmpW(item_path, path), "expected %s, got %s\n", + ok(!lstrcmpiW(item_path, path), "expected %s, got %s\n", wine_dbgstr_w(path), wine_dbgstr_w(item_path)); SysFreeString(item_path); FolderItem_Release(item);
1
0
0
0
Thomas Faber : wintrust/tests: Fix build with MSVC.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: e68d5b93ffa6b6948f71d5f0a8ece67c7c0ab42e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e68d5b93ffa6b6948f71d5f0a…
Author: Thomas Faber <thfabba(a)gmx.de> Date: Fri Jun 22 10:28:16 2012 +0200 wintrust/tests: Fix build with MSVC. --- dlls/wintrust/tests/softpub.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c index 0987f9c..3c23464 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -568,7 +568,7 @@ struct Imports { } ibn; char dllname[0x10]; }; -#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks[0])) +#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks)) static struct _PeImage { IMAGE_DOS_HEADER dos_header; @@ -582,9 +582,9 @@ static struct _PeImage { char __alignment3[FILE_TOTAL-FILE_IDATA-sizeof(struct Imports)]; } bin = { /* dos header */ - {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, 0, 0, {}, FILE_PE_START}, + {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}, 0, 0, {0}, FILE_PE_START}, /* alignment before PE header */ - {}, + {0}, /* nt headers */ {IMAGE_NT_SIGNATURE, /* basic headers - 3 sections, no symbols, EXE file */ @@ -611,7 +611,7 @@ static struct _PeImage { 0, 0, 0, IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE} }, /* alignment before first section */ - {}, + {0}, /* .text section */ { 0x31, 0xC0, /* xor eax, eax */ @@ -634,7 +634,7 @@ static struct _PeImage { "KERNEL32.DLL" }, /* final alignment */ - {} + {0} }; #include <poppack.h>
1
0
0
0
Piotr Caban : msvcp90: Added basic_ostream::operator<<(base type) implementation.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 8e2efc19390423299a22ad730410f51f7c5539db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e2efc19390423299a22ad730…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:28:05 2012 +0200 msvcp90: Added basic_ostream::operator<<(base type) implementation. --- dlls/msvcp90/ios.c | 223 +++++++++++++++++++++++++++++++++++++------- dlls/msvcp90/locale.c | 26 +++++ dlls/msvcp90/msvcp90.h | 18 ++++ dlls/msvcp90/msvcp90.spec | 12 +- 4 files changed, 237 insertions(+), 42 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8e2efc19390423299a22a…
1
0
0
0
Piotr Caban : msvcp90: Added num_put<char>::put(double) implementation.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 27f9052440ac2468f77ee935f2da33b296018693 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27f9052440ac2468f77ee935f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:27:50 2012 +0200 msvcp90: Added num_put<char>::put(double) implementation. --- dlls/msvcp90/locale.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++-- dlls/msvcp90/msvcp90.h | 2 +- include/msvcrt/stdio.h | 1 + 3 files changed, 107 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 2e48c79..88f02e3 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -5458,8 +5458,32 @@ ostreambuf_iterator_char* __cdecl num_put_char__Rep(const num_put *this, ostream /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */ char* __cdecl num_put_char__Ffmt(const num_put *this, char *fmt, char spec, int fmtfl) { - FIXME("(%p %p %d %d) stub\n", this, fmt, spec, fmtfl); - return NULL; + int type = fmtfl & FMTFLAG_floatfield; + char *p = fmt; + + TRACE("(%p %p %d %d)\n", this, fmt, spec, fmtfl); + + *p++ = '%'; + if(fmtfl & FMTFLAG_showpos) + *p++ = '+'; + if(fmtfl & FMTFLAG_showbase) + *p++ = '#'; + *p++ = '.'; + *p++ = '*'; + if(spec) + *p++ = spec; + + if(type == FMTFLAG_fixed) + *p++ = 'f'; + else if(type == FMTFLAG_scientific) + *p++ = (fmtfl & FMTFLAG_uppercase) ? 'E' : 'e'; + else if(type == (FMTFLAG_fixed|FMTFLAG_scientific)) + *p++ = (fmtfl & FMTFLAG_uppercase) ? 'A' : 'a'; + else + *p++ = (fmtfl & FMTFLAG_uppercase) ? 'G' : 'g'; + + *p++ = '\0'; + return fmt; } /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z */ @@ -5473,6 +5497,67 @@ ostreambuf_iterator_char* __cdecl num_put_char__Fput(const num_put *this, ostrea return NULL; } +/* TODO: This function should be removed when num_put_char__Fput is implemented */ +static ostreambuf_iterator_char* num_put_char_fput(const num_put *this, ostreambuf_iterator_char *ret, + ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count) +{ + numpunct_char *numpunct = numpunct_char_use_facet(base->loc); + basic_string_char grouping_bstr; + const char *grouping; + char *p, sep = *localeconv()->decimal_point; + int cur_group = 0, group_size = 0; + int adjustfield = base->fmtfl & FMTFLAG_adjustfield; + MSVCP_size_t pad; + + TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); + + /* Change decimal point */ + for(p=buf; p<buf+count; p++) { + if(*p == sep) { + *p = numpunct_char_decimal_point(numpunct); + break; + } + } + p--; + + /* Add separators to number */ + numpunct_char_grouping(numpunct, &grouping_bstr); + grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); + sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0'; + + for(; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) { + group_size++; + if(group_size == grouping[cur_group]) { + group_size = 0; + if(grouping[cur_group+1]) + cur_group++; + + memmove(p+1, p, buf+count-p); + *p = sep; + count++; + } + } + MSVCP_basic_string_char_dtor(&grouping_bstr); + + /* Display number with padding */ + if(count >= base->wide) + pad = 0; + else + pad = base->wide-count; + base->wide = 0; + + if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { + num_put_char__Putc(this, &dest, dest, buf, 1); + buf++; + } + if(adjustfield != FMTFLAG_left) { + num_put_char__Rep(this, ret, dest, fill, pad); + pad = 0; + } + num_put_char__Putc(this, &dest, dest, buf, count); + return num_put_char__Rep(this, ret, dest, fill, pad); +} + /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */ /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */ char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spec, int fmtfl) @@ -5629,8 +5714,24 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double, 32) ostreambuf_iterator_char* __thiscall num_put_char_do_put_double(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, double v) { - FIXME("(%p %p %p %d %lf) stub\n", this, ret, base, fill, v); - return NULL; + char *tmp; + char fmt[8]; /* strlen("%+#.*lg")+1 */ + int size; + + TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v); + + num_put_char__Ffmt(this, fmt, '\0', base->fmtfl); + size = _scprintf(fmt, base->prec, v); + + /* TODO: don't use dynamic allocation */ + tmp = MSVCRT_operator_new(size*2); + if(!tmp) { + ERR("Out of memory\n"); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); + } + num_put_char_fput(this, ret, dest, base, fill, tmp, sprintf(tmp, fmt, base->prec, v)); + MSVCRT_operator_delete(tmp); + return ret; } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */ diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index edb3efa..cc7a2aa 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -417,7 +417,7 @@ typedef enum { FMTFLAG_stdio = 0x8000, FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal, FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex, - FMTFLAG_floadfield = FMTFLAG_scientific|FMTFLAG_fixed, + FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed, FMTFLAG_mask = 0xffff } IOSB_fmtflags; diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index e2c1669..80439ee 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -167,6 +167,7 @@ void __cdecl setbuf(FILE*,char*); int __cdecl setvbuf(FILE*,char*,int,size_t); int __cdecl sprintf(char*,const char*,...); int __cdecl sprintf_s(char*,size_t,const char*,...); +int __cdecl _scprintf(const char *, ...); int __cdecl sscanf(const char*,const char*,...); int __cdecl sscanf_s(const char*,const char*,...); FILE* __cdecl tmpfile(void);
1
0
0
0
Piotr Caban : msvcp90: Added num_put<char>::put(bool) implementation.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 8003b0ab3da1422ba3367428404eb8b16e52a90d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8003b0ab3da1422ba33674284…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:27:16 2012 +0200 msvcp90: Added num_put<char>::put(bool) implementation. --- dlls/msvcp90/locale.c | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index eabdef8..2e48c79 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -5744,8 +5744,32 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool, 28) ostreambuf_iterator_char* __thiscall num_put_char_do_put_bool(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, MSVCP_bool v) { - FIXME("(%p %p %p %d %d) stub\n", this, ret, base, fill, v); - return NULL; + TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); + + if(base->fmtfl & FMTFLAG_boolalpha) { + numpunct_char *numpunct = numpunct_char_use_facet(base->loc); + basic_string_char str; + MSVCP_size_t pad, len; + + if(v) + numpunct_char_truename(numpunct, &str); + else + numpunct_char_falsename(numpunct, &str); + + len = MSVCP_basic_string_char_length(&str); + pad = (len>base->wide ? 0 : base->wide-len); + base->wide = 0; + + if((base->fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) { + num_put_char__Rep(this, &dest, dest, fill, pad); + pad = 0; + } + num_put_char__Putc(this, &dest, dest, MSVCP_basic_string_char_c_str(&str), len); + MSVCP_basic_string_char_dtor(&str); + return num_put_char__Rep(this, ret, dest, fill, pad); + } + + return num_put_char_put_long(this, ret, dest, base, fill, v); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_N@Z */
1
0
0
0
Piotr Caban : msvcp90: Added num_put<char>::put(integral number).
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: feccc21044837e6d913f6384c893c1961334f775 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=feccc21044837e6d913f6384c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:27:02 2012 +0200 msvcp90: Added num_put<char>::put(integral number). --- dlls/msvcp90/locale.c | 120 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 106 insertions(+), 14 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index fc85426..eabdef8 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -5477,8 +5477,30 @@ ostreambuf_iterator_char* __cdecl num_put_char__Fput(const num_put *this, ostrea /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */ char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spec, int fmtfl) { - FIXME("(%p %p %p %d) stub\n", this, fmt, spec, fmtfl); - return NULL; + int base = fmtfl & FMTFLAG_basefield; + char *p = fmt; + + TRACE("(%p %p %p %d)\n", this, fmt, spec, fmtfl); + + *p++ = '%'; + if(fmtfl & FMTFLAG_showpos) + *p++ = '+'; + if(fmtfl & FMTFLAG_showbase) + *p++ = '#'; + + *p++ = *spec++; + if(*spec == 'l') + *p++ = *spec++; + + if(base == FMTFLAG_oct) + *p++ = 'o'; + else if(base == FMTFLAG_hex) + *p++ = (fmtfl & FMTFLAG_uppercase) ? 'X' : 'x'; + else + *p++ = *spec; + + *p++ = '\0'; + return fmt; } /* ?_Iput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPADI@Z */ @@ -5486,8 +5508,55 @@ char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spe ostreambuf_iterator_char* __cdecl num_put_char__Iput(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count) { - FIXME("(%p %p %p %d %p %ld) stub\n", this, ret, base, fill, buf, count); - return NULL; + numpunct_char *numpunct = numpunct_char_use_facet(base->loc); + basic_string_char grouping_bstr; + const char *grouping; + char *p, sep; + int cur_group = 0, group_size = 0; + int adjustfield = base->fmtfl & FMTFLAG_adjustfield; + MSVCP_size_t pad; + + TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count); + + /* Add separators to number */ + numpunct_char_grouping(numpunct, &grouping_bstr); + grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); + sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0'; + + for(p=buf+count-1; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) { + group_size++; + if(group_size == grouping[cur_group]) { + group_size = 0; + if(grouping[cur_group+1]) + cur_group++; + + memmove(p+1, p, buf+count-p); + *p = sep; + count++; + } + } + MSVCP_basic_string_char_dtor(&grouping_bstr); + + /* Display number with padding */ + if(count >= base->wide) + pad = 0; + else + pad = base->wide-count; + base->wide = 0; + + if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) { + num_put_char__Putc(this, &dest, dest, buf, 1); + buf++; + }else if((adjustfield & FMTFLAG_internal) && (buf[1]=='x' || buf[1]=='X')) { + num_put_char__Putc(this, &dest, dest, buf, 2); + buf += 2; + } + if(adjustfield != FMTFLAG_left) { + num_put_char__Rep(this, ret, dest, fill, pad); + pad = 0; + } + num_put_char__Putc(this, &dest, dest, buf, count); + return num_put_char__Rep(this, ret, dest, fill, pad); } /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */ @@ -5499,8 +5568,13 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long, 28) ostreambuf_iterator_char* __thiscall num_put_char_do_put_long(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v) { - FIXME("(%p %p %p %d %d) stub\n", this, ret, base, fill, v); - return NULL; + char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ + char fmt[7]; /* strlen("%+#lld")+1 */ + + TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); + + return num_put_char__Iput(this, ret, dest, base, fill, tmp, + sprintf(tmp, num_put_char__Ifmt(this, fmt, "ld", base->fmtfl), v)); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */ @@ -5522,8 +5596,13 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong, 28) ostreambuf_iterator_char* __thiscall num_put_char_do_put_ulong(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v) { - FIXME("(%p %p %p %d %d) stub\n", this, ret, base, fill, v); - return NULL; + char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ + char fmt[7]; /* strlen("%+#lld")+1 */ + + TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v); + + return num_put_char__Iput(this, ret, dest, base, fill, tmp, + sprintf(tmp, num_put_char__Ifmt(this, fmt, "lu", base->fmtfl), v)); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DK@Z */ @@ -5583,8 +5662,11 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr, 28) ostreambuf_iterator_char* __thiscall num_put_char_do_put_ptr(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, const void *v) { - FIXME("(%p %p %p %d %p) stub\n", this, ret, base, fill, v); - return NULL; + char tmp[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */ + + TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v); + + return num_put_char__Iput(this, ret, dest, base, fill, tmp, sprintf(tmp, "%p", v)); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBX@Z */ @@ -5606,8 +5688,13 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64, 32) ostreambuf_iterator_char* __thiscall num_put_char_do_put_int64(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, __int64 v) { - FIXME("(%p %p %p %d) stub\n", this, ret, base, fill); - return NULL; + char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ + char fmt[7]; /* strlen("%+#lld")+1 */ + + TRACE("(%p %p %p %d)\n", this, ret, base, fill); + + return num_put_char__Iput(this, ret, dest, base, fill, tmp, + sprintf(tmp, num_put_char__Ifmt(this, fmt, "lld", base->fmtfl), v)); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_J@Z */ @@ -5629,8 +5716,13 @@ DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64, 32) ostreambuf_iterator_char* __thiscall num_put_char_do_put_uint64(const num_put *this, ostreambuf_iterator_char *ret, ostreambuf_iterator_char dest, ios_base *base, char fill, unsigned __int64 v) { - FIXME("(%p %p %p %d) stub\n", this, ret, base, fill); - return NULL; + char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */ + char fmt[7]; /* strlen("%+#lld")+1 */ + + TRACE("(%p %p %p %d)\n", this, ret, base, fill); + + return num_put_char__Iput(this, ret, dest, base, fill, tmp, + sprintf(tmp, num_put_char__Ifmt(this, fmt, "llu", base->fmtfl), v)); } /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_K@Z */
1
0
0
0
Piotr Caban : msvcp90: Added partial num_put<char> implementation.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: a359df5fa286047fc79335c2c6ebdbdaf093511b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a359df5fa286047fc79335c2c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:26:48 2012 +0200 msvcp90: Added partial num_put<char> implementation. --- dlls/msvcp90/locale.c | 137 ++++++++++++++++++++++++++++++++++++----------- dlls/msvcp90/msvcp90.h | 1 + 2 files changed, 106 insertions(+), 32 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a359df5fa286047fc7933…
1
0
0
0
Piotr Caban : msvcp90: Added num_put<char> class stub.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: 83ef253b8ddf4fc82dc6880f3dbfd9ab9e566528 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83ef253b8ddf4fc82dc6880f3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:26:32 2012 +0200 msvcp90: Added num_put<char> class stub. --- dlls/msvcp90/locale.c | 311 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.h | 11 ++ dlls/msvcp90/msvcp90.spec | 126 +++++++++--------- 3 files changed, 385 insertions(+), 63 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=83ef253b8ddf4fc82dc68…
1
0
0
0
Piotr Caban : msvcp90: Fixed fraction digits ignoring in num_get_char__Getffld.
by Alexandre Julliard
22 Jun '12
22 Jun '12
Module: wine Branch: master Commit: ca90f4723a03e5812942addf3ec4cd168afa3dc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca90f4723a03e5812942addf3…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 22 10:26:06 2012 +0200 msvcp90: Fixed fraction digits ignoring in num_get_char__Getffld. --- dlls/msvcp90/locale.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 728ce3b..8a2fb93 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -4686,8 +4686,6 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it break; else if(dest<num_end) *dest++ = first->val; - else - exp--; } if(first->strbuf && (first->val=='e' || first->val=='E')) {
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
83
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Results per page:
10
25
50
100
200