ReactOS.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
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
List overview
Download
Ros-diffs
October 2008
----- 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
ros-diffs@reactos.org
25 participants
517 discussions
Start a n
N
ew thread
[janderwald] 37081: - Fix a potential buffer overflow in SH_ShowDriveProperties (CID 589) - Fix a possible null dereference (CID 495) - Fix initializing Recycle Bin Property dialog - Add LVS_EX_FULLROWSELECT style
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Oct 30 02:59:55 2008 New Revision: 37081 URL:
http://svn.reactos.org/svn/reactos?rev=37081&view=rev
Log: - Fix a potential buffer overflow in SH_ShowDriveProperties (CID 589) - Fix a possible null dereference (CID 495) - Fix initializing Recycle Bin Property dialog - Add LVS_EX_FULLROWSELECT style Modified: trunk/reactos/dll/win32/shell32/drive.c trunk/reactos/dll/win32/shell32/enumidlist.c trunk/reactos/dll/win32/shell32/shfldr_recyclebin.c Modified: trunk/reactos/dll/win32/shell32/drive.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drive.c?…
============================================================================== --- trunk/reactos/dll/win32/shell32/drive.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/drive.c [iso-8859-1] Thu Oct 30 02:59:55 2008 @@ -678,7 +678,7 @@ PROPSHEETHEADERW psh; BOOL ret; UINT i; - WCHAR szName[MAX_PATH]; + WCHAR szName[MAX_PATH+6]; DWORD dwMaxComponent, dwFileSysFlags; IDataObject * pDataObj = NULL; @@ -700,8 +700,8 @@ /* FIXME * check if disk is a really a local hdd */ - i = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, szName, sizeof(szName)/sizeof(WCHAR)); - if (i > 0 && i < (sizeof(szName)/sizeof(WCHAR)) + 6) + i = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, szName, sizeof(szName)/sizeof(WCHAR)-6); + if (i > 0 && i < (sizeof(szName)/sizeof(WCHAR)) - 6) { szName[i] = L' '; szName[i+1] = L'('; @@ -929,6 +929,8 @@ HWND hDlgCtrl; Length = GetWindowTextW(hwndDlg, szText, sizeof(szText)/sizeof(WCHAR)); + if (Length < 0) + Length = 0; szDrive[0] = pContext->Drive + L'A'; if (GetVolumeInformationW(szDrive, &szText[Length+1], (sizeof(szText)/sizeof(WCHAR))- Length - 2, &dwSerial, &dwMaxComp, &dwFileSys, szFs, sizeof(szFs)/sizeof(WCHAR))) { Modified: trunk/reactos/dll/win32/shell32/enumidlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/enumidli…
============================================================================== --- trunk/reactos/dll/win32/shell32/enumidlist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/enumidlist.c [iso-8859-1] Thu Oct 30 02:59:55 2008 @@ -97,8 +97,8 @@ while(pCur) { - REFIID curid = _ILGetGUIDPointer(pCur->pidl); - if (IsEqualIID(curid, refid)) + LPGUID curid = _ILGetGUIDPointer(pCur->pidl); + if (curid && IsEqualGUID(curid, refid)) { return TRUE; } Modified: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_r…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_recyclebin.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_recyclebin.c [iso-8859-1] Thu Oct 30 02:59:55 2008 @@ -1218,7 +1218,7 @@ li.iSubItem = 0; li.pszText = szVolume; li.iItem = itemCount; - (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMN, 0, (LPARAM)&li); + (void)SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li); if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) { if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR))) @@ -1383,11 +1383,17 @@ PDRIVE_ITEM_CONTEXT pItem; BOOL bSuccess; UINT uResult; + PROPSHEETPAGE * page; + DWORD dwStyle; switch(uMsg) { - case WM_INITDIALOG: - InitializeBitBucketDlg(hwndDlg, (WCHAR)lParam); + case WM_INITDIALOG: + page = (PROPSHEETPAGE*)lParam; + InitializeBitBucketDlg(hwndDlg, (WCHAR)page->lParam); + dwStyle = (DWORD) SendDlgItemMessage(hwndDlg, 14000, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); + dwStyle = dwStyle | LVS_EX_FULLROWSELECT; + SendDlgItemMessage(hwndDlg, 14000, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); if (GetDlgCtrlID((HWND)wParam) != 14000) { SetFocus(GetDlgItem(hwndDlg, 14000));
16 years, 1 month
1
0
0
0
[janderwald] 37080: - Fix displaying MAC of adapter
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Oct 30 02:24:37 2008 New Revision: 37080 URL:
http://svn.reactos.org/svn/reactos?rev=37080&view=rev
Log: - Fix displaying MAC of adapter Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
============================================================================== --- trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] Thu Oct 30 02:24:37 2008 @@ -429,9 +429,11 @@ { li.iItem = InsertItemToListView(hDlgCtrl, IDS_PHYSICAL_ADDRESS); if (li.iItem >= 0) - if (MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pCurAdapter->Address, -1, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); - + { + swprintf(szBuffer, L"%02x-%02x-%02x-%02x-%02x-%02x",pCurAdapter->Address[0], pCurAdapter->Address[1], + pCurAdapter->Address[2], pCurAdapter->Address[3], pCurAdapter->Address[4], pCurAdapter->Address[5]); + SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); + } li.iItem = InsertItemToListView(hDlgCtrl, IDS_IP_ADDRESS); if (li.iItem >= 0) if (MultiByteToWideChar(CP_ACP, 0, pCurAdapter->IpAddressList.IpAddress.String, -1, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)))
16 years, 1 month
1
0
0
0
[weiden] 37079: Make the task bar top-most when necessary
by weiden@svn.reactos.org
Author: weiden Date: Wed Oct 29 20:58:24 2008 New Revision: 37079 URL:
http://svn.reactos.org/svn/reactos?rev=37079&view=rev
Log: Make the task bar top-most when necessary Modified: trunk/reactos/base/shell/explorer-new/traywnd.c Modified: trunk/reactos/base/shell/explorer-new/traywnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/tr…
============================================================================== --- trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/traywnd.c [iso-8859-1] Wed Oct 29 20:58:24 2008 @@ -698,6 +698,15 @@ This->HideClock = (sr.dwFlags & 0x8) != 0; /* FIXME: Are there more flags? */ + + if (This->hWnd != NULL) + SetWindowPos (This->hWnd, + This->AlwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, + 0, + 0, + 0, + 0, + SWP_NOMOVE | SWP_NOSIZE); if (sr.Position > ABE_BOTTOM) This->Position = ABE_BOTTOM;
16 years, 1 month
1
0
0
0
[jimtabor] 37078: - Move code out of freetype.c. - Implement GetRasterizerCaps. - From wine: Patch by Bobby Bingham: Add support for the GGO_UNHINTED flag in GetGlyphOutline.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Oct 29 20:32:44 2008 New Revision: 37078 URL:
http://svn.reactos.org/svn/reactos?rev=37078&view=rev
Log: - Move code out of freetype.c. - Implement GetRasterizerCaps. - From wine: Patch by Bobby Bingham: Add support for the GGO_UNHINTED flag in GetGlyphOutline. Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c trunk/reactos/subsystems/win32/win32k/objects/freetype.c trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/font.c [iso-8859-1] Wed Oct 29 20:32:44 2008 @@ -13,6 +13,15 @@ #define NDEBUG #include <debug.h> +// +// FIXME PLEASE!!!! +// Why are these here? Well there is a problem with drivers/directx. +// 1st: It does not belong there. +// 2nd: Due to being placed outside Win32k build environment, it creates +// compiling issues. +// Until svn mv drivers/directx subsystem/win32/win32k/drivers/directx, +// it will not get fixed. +// ULONG FASTCALL ftGdiGetGlyphOutline( @@ -24,6 +33,10 @@ OUT OPTIONAL PVOID UnsafeBuf, IN LPMAT2 pmat2, IN BOOL bIgnoreRotation); + +INT +FASTCALL +IntGetOutlineTextMetrics(PFONTGDI FontGDI, UINT Size, OUTLINETEXTMETRICW *Otm); /** Functions ******************************************************************/ @@ -59,7 +72,80 @@ return Ret; } +DWORD +STDCALL +NtGdiGetKerningPairs(HDC hDC, + ULONG NumPairs, + LPKERNINGPAIR krnpair) +{ + UNIMPLEMENTED; + return 0; +} + +/* + From "Undocumented Windows 2000 Secrets" Appendix B, Table B-2, page + 472, this is NtGdiGetOutlineTextMetricsInternalW. + */ +ULONG +STDCALL +NtGdiGetOutlineTextMetricsInternalW (HDC hDC, + ULONG Data, + OUTLINETEXTMETRICW *otm, + TMDIFF *Tmd) +{ + PDC dc; + PDC_ATTR Dc_Attr; + PTEXTOBJ TextObj; + PFONTGDI FontGDI; + HFONT hFont = 0; + ULONG Size; + OUTLINETEXTMETRICW *potm; + NTSTATUS Status; + + dc = DC_LockDc(hDC); + if (dc == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return 0; + } + Dc_Attr = dc->pDc_Attr; + if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; + hFont = Dc_Attr->hlfntNew; + TextObj = TEXTOBJ_LockText(hFont); + DC_UnlockDc(dc); + if (TextObj == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return 0; + } + FontGDI = ObjToGDI(TextObj->Font, FONT); + TEXTOBJ_UnlockText(TextObj); + Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL); + if (!otm) return Size; + if (Size > Data) + { + SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER); + return 0; + } + potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT); + if (NULL == potm) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + IntGetOutlineTextMetrics(FontGDI, Size, potm); + if (otm) + { + Status = MmCopyToCaller(otm, potm, Size); + if (! NT_SUCCESS(Status)) + { + SetLastWin32Error(ERROR_INVALID_PARAMETER); + ExFreePool(potm); + return 0; + } + } + ExFreePool(potm); + return Size; +} + /* EOF */ - - - Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Wed Oct 29 20:32:44 2008 @@ -22,6 +22,7 @@ #define NDEBUG #include <debug.h> + FT_Library library; typedef struct _FONT_ENTRY { @@ -42,6 +43,8 @@ #define MAX_FONT_CACHE 256 UINT Hits; UINT Misses; + +SHORT ftLanguageID = 0; typedef struct _FONT_CACHE_ENTRY { LIST_ENTRY ListEntry; @@ -750,7 +753,7 @@ * IntGetOutlineTextMetrics * */ -static unsigned FASTCALL +INT FASTCALL IntGetOutlineTextMetrics(PFONTGDI FontGDI, UINT Size, OUTLINETEXTMETRICW *Otm) { @@ -1316,6 +1319,21 @@ } return NT_SUCCESS(Status) || STATUS_OBJECT_NAME_NOT_FOUND == Status; +} + +BOOL +FASTCALL +ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs) +{ + if ( lprs ) + { + lprs->nSize = sizeof(RASTERIZER_STATUS); + lprs->wFlags = TT_AVAILABLE | TT_ENABLED; + lprs->nLanguageID = ftLanguageID; + return TRUE; + } + SetLastWin32Error(ERROR_INVALID_PARAMETER); + return FALSE; } int STDCALL @@ -2691,6 +2709,12 @@ if (orientation || (iFormat != GGO_METRICS && iFormat != GGO_BITMAP) || aveWidth || pmat2) load_flags |= FT_LOAD_NO_BITMAP; + + if (iFormat & GGO_UNHINTED) + { + load_flags |= FT_LOAD_NO_HINTING; + iFormat &= ~GGO_UNHINTED; + } error = FT_Load_Glyph(ft_face, glyph_index, load_flags); if (error) @@ -3207,91 +3231,137 @@ return needed; } -DWORD -STDCALL -NtGdiGetKerningPairs(HDC hDC, - ULONG NumPairs, - LPKERNINGPAIR krnpair) -{ - UNIMPLEMENTED; - return 0; -} - -/* - From "Undocumented Windows 2000 Secrets" Appendix B, Table B-2, page - 472, this is NtGdiGetOutlineTextMetricsInternalW. - */ -ULONG -STDCALL -NtGdiGetOutlineTextMetricsInternalW (HDC hDC, - ULONG Data, - OUTLINETEXTMETRICW *otm, - TMDIFF *Tmd) -{ - PDC dc; - PDC_ATTR Dc_Attr; - PTEXTOBJ TextObj; +BOOL +FASTCALL +TextIntGetTextExtentPoint(PDC dc, + PTEXTOBJ TextObj, + LPCWSTR String, + int Count, + int MaxExtent, + LPINT Fit, + LPINT Dx, + LPSIZE Size) +{ PFONTGDI FontGDI; - HFONT hFont = 0; - ULONG Size; - OUTLINETEXTMETRICW *potm; - NTSTATUS Status; - - dc = DC_LockDc(hDC); - if (dc == NULL) - { - SetLastWin32Error(ERROR_INVALID_HANDLE); - return 0; - } - Dc_Attr = dc->pDc_Attr; - if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; - hFont = Dc_Attr->hlfntNew; - TextObj = TEXTOBJ_LockText(hFont); - DC_UnlockDc(dc); - if (TextObj == NULL) - { - SetLastWin32Error(ERROR_INVALID_HANDLE); - return 0; - } + FT_Face face; + FT_GlyphSlot glyph; + FT_Glyph realglyph; + INT error, n, glyph_index, i, previous; + ULONGLONG TotalWidth = 0; + FT_CharMap charmap, found = NULL; + BOOL use_kerning; + FT_Render_Mode RenderMode; + BOOLEAN Render; + FontGDI = ObjToGDI(TextObj->Font, FONT); - TEXTOBJ_UnlockText(TextObj); - Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL); - if (!otm) return Size; - if (Size > Data) - { - SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER); - return 0; - } - potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT); - if (NULL == potm) - { - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - IntGetOutlineTextMetrics(FontGDI, Size, potm); - if (otm) - { - Status = MmCopyToCaller(otm, potm, Size); - if (! NT_SUCCESS(Status)) + + face = FontGDI->face; + if (NULL != Fit) + { + *Fit = 0; + } + + IntLockFreeType; + if (face->charmap == NULL) + { + DPRINT("WARNING: No charmap selected!\n"); + DPRINT("This font face has %d charmaps\n", face->num_charmaps); + + for (n = 0; n < face->num_charmaps; n++) + { + charmap = face->charmaps[n]; + DPRINT("found charmap encoding: %u\n", charmap->encoding); + if (charmap->encoding != 0) + { + found = charmap; + break; + } + } + + if (! found) + { + DPRINT1("WARNING: Could not find desired charmap!\n"); + } + + error = FT_Set_Charmap(face, found); + if (error) + { + DPRINT1("WARNING: Could not set the charmap!\n"); + } + } + + Render = IntIsFontRenderingEnabled(); + if (Render) + RenderMode = IntGetFontRenderMode(&TextObj->logfont.elfEnumLogfontEx.elfLogFont); + else + RenderMode = FT_RENDER_MODE_MONO; + + error = FT_Set_Pixel_Sizes(face, + TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, + /* FIXME should set character height if neg */ + (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? + - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : + TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); + if (error) + { + DPRINT1("Error in setting pixel sizes: %u\n", error); + } + + use_kerning = FT_HAS_KERNING(face); + previous = 0; + + for (i = 0; i < Count; i++) + { + glyph_index = FT_Get_Char_Index(face, *String); + if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index, + TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))) { - SetLastWin32Error(ERROR_INVALID_PARAMETER); - ExFreePool(potm); - return 0; + error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); + if (error) + { + DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index); + break; + } + + glyph = face->glyph; + realglyph = NtGdiGlyphCacheSet(face, glyph_index, + TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode); + if (!realglyph) + { + DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index); + break; + } } - } - ExFreePool(potm); - return Size; -} - - -BOOL -APIENTRY -NtGdiGetRasterizerCaps( - OUT LPRASTERIZER_STATUS praststat, - IN ULONG cjBytes) -{ - UNIMPLEMENTED; - return FALSE; + + /* retrieve kerning distance */ + if (use_kerning && previous && glyph_index) + { + FT_Vector delta; + FT_Get_Kerning(face, previous, glyph_index, 0, &delta); + TotalWidth += delta.x; + } + + TotalWidth += realglyph->advance.x >> 10; + + if (((TotalWidth + 32) >> 6) <= MaxExtent && NULL != Fit) + { + *Fit = i + 1; + } + if (NULL != Dx) + { + Dx[i] = (TotalWidth + 32) >> 6; + } + + previous = glyph_index; + String++; + } + IntUnLockFreeType; + + Size->cx = (TotalWidth + 32) >> 6; + Size->cy = (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight); + Size->cy = EngMulDiv(Size->cy, IntGdiGetDeviceCaps(dc, LOGPIXELSY), 72); + + return TRUE; } @@ -3442,342 +3512,6 @@ Ret = FontTci[i].ciCharset; DPRINT("CharSet %d\n",Ret); return Ret; -} - -static BOOL -FASTCALL -TextIntGetTextExtentPoint(PDC dc, - PTEXTOBJ TextObj, - LPCWSTR String, - int Count, - int MaxExtent, - LPINT Fit, - LPINT Dx, - LPSIZE Size) -{ - PFONTGDI FontGDI; - FT_Face face; - FT_GlyphSlot glyph; - FT_Glyph realglyph; - INT error, n, glyph_index, i, previous; - ULONGLONG TotalWidth = 0; - FT_CharMap charmap, found = NULL; - BOOL use_kerning; - FT_Render_Mode RenderMode; - BOOLEAN Render; - - FontGDI = ObjToGDI(TextObj->Font, FONT); - - face = FontGDI->face; - if (NULL != Fit) - { - *Fit = 0; - } - - IntLockFreeType; - if (face->charmap == NULL) - { - DPRINT("WARNING: No charmap selected!\n"); - DPRINT("This font face has %d charmaps\n", face->num_charmaps); - - for (n = 0; n < face->num_charmaps; n++) - { - charmap = face->charmaps[n]; - DPRINT("found charmap encoding: %u\n", charmap->encoding); - if (charmap->encoding != 0) - { - found = charmap; - break; - } - } - - if (! found) - { - DPRINT1("WARNING: Could not find desired charmap!\n"); - } - - error = FT_Set_Charmap(face, found); - if (error) - { - DPRINT1("WARNING: Could not set the charmap!\n"); - } - } - - Render = IntIsFontRenderingEnabled(); - if (Render) - RenderMode = IntGetFontRenderMode(&TextObj->logfont.elfEnumLogfontEx.elfLogFont); - else - RenderMode = FT_RENDER_MODE_MONO; - - error = FT_Set_Pixel_Sizes(face, - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfWidth, - /* FIXME should set character height if neg */ - (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight == 0 ? 11 : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight)); - if (error) - { - DPRINT1("Error in setting pixel sizes: %u\n", error); - } - - use_kerning = FT_HAS_KERNING(face); - previous = 0; - - for (i = 0; i < Count; i++) - { - glyph_index = FT_Get_Char_Index(face, *String); - if (!(realglyph = NtGdiGlyphCacheGet(face, glyph_index, - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight))) - { - error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); - if (error) - { - DPRINT1("WARNING: Failed to load and render glyph! [index: %u]\n", glyph_index); - break; - } - - glyph = face->glyph; - realglyph = NtGdiGlyphCacheSet(face, glyph_index, - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight, glyph, RenderMode); - if (!realglyph) - { - DPRINT1("Failed to render glyph! [index: %u]\n", glyph_index); - break; - } - } - - /* retrieve kerning distance */ - if (use_kerning && previous && glyph_index) - { - FT_Vector delta; - FT_Get_Kerning(face, previous, glyph_index, 0, &delta); - TotalWidth += delta.x; - } - - TotalWidth += realglyph->advance.x >> 10; - - if (((TotalWidth + 32) >> 6) <= MaxExtent && NULL != Fit) - { - *Fit = i + 1; - } - if (NULL != Dx) - { - Dx[i] = (TotalWidth + 32) >> 6; - } - - previous = glyph_index; - String++; - } - IntUnLockFreeType; - - Size->cx = (TotalWidth + 32) >> 6; - Size->cy = (TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight < 0 ? - TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight : TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfHeight); - Size->cy = EngMulDiv(Size->cy, IntGdiGetDeviceCaps(dc, LOGPIXELSY), 72); - - return TRUE; -} - -W32KAPI -BOOL -APIENTRY -NtGdiGetTextExtentExW( - IN HDC hDC, - IN OPTIONAL LPWSTR UnsafeString, - IN ULONG Count, - IN ULONG MaxExtent, - OUT OPTIONAL PULONG UnsafeFit, - OUT OPTIONAL PULONG UnsafeDx, - OUT LPSIZE UnsafeSize, - IN FLONG fl -) -{ - PDC dc; - PDC_ATTR Dc_Attr; - LPWSTR String; - SIZE Size; - NTSTATUS Status; - BOOLEAN Result; - INT Fit; - LPINT Dx; - PTEXTOBJ TextObj; - - /* FIXME: Handle fl */ - - if (0 == Count) - { - Size.cx = 0; - Size.cy = 0; - Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE)); - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - return TRUE; - } - - String = ExAllocatePoolWithTag(PagedPool, Count * sizeof(WCHAR), TAG_GDITEXT); - if (NULL == String) - { - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - if (NULL != UnsafeDx) - { - Dx = ExAllocatePoolWithTag(PagedPool, Count * sizeof(INT), TAG_GDITEXT); - if (NULL == Dx) - { - ExFreePool(String); - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - } - else - { - Dx = NULL; - } - - Status = MmCopyFromCaller(String, UnsafeString, Count * sizeof(WCHAR)); - if (! NT_SUCCESS(Status)) - { - if (NULL != Dx) - { - ExFreePool(Dx); - } - ExFreePool(String); - SetLastNtError(Status); - return FALSE; - } - - dc = DC_LockDc(hDC); - if (NULL == dc) - { - if (NULL != Dx) - { - ExFreePool(Dx); - } - ExFreePool(String); - SetLastWin32Error(ERROR_INVALID_HANDLE); - return FALSE; - } - Dc_Attr = dc->pDc_Attr; - if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; - TextObj = TEXTOBJ_LockText(Dc_Attr->hlfntNew); - if ( TextObj ) - { - Result = TextIntGetTextExtentPoint(dc, TextObj, String, Count, MaxExtent, - NULL == UnsafeFit ? NULL : &Fit, Dx, &Size); - TEXTOBJ_UnlockText(TextObj); - } - else - Result = FALSE; - DC_UnlockDc(dc); - - ExFreePool(String); - if (! Result) - { - if (NULL != Dx) - { - ExFreePool(Dx); - } - return FALSE; - } - - if (NULL != UnsafeFit) - { - Status = MmCopyToCaller(UnsafeFit, &Fit, sizeof(INT)); - if (! NT_SUCCESS(Status)) - { - if (NULL != Dx) - { - ExFreePool(Dx); - } - SetLastNtError(Status); - return FALSE; - } - } - - if (NULL != UnsafeDx) - { - Status = MmCopyToCaller(UnsafeDx, Dx, Count * sizeof(INT)); - if (! NT_SUCCESS(Status)) - { - if (NULL != Dx) - { - ExFreePool(Dx); - } - SetLastNtError(Status); - return FALSE; - } - } - if (NULL != Dx) - { - ExFreePool(Dx); - } - - Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE)); - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return FALSE; - } - - return TRUE; -} - -BOOL -STDCALL -NtGdiGetTextExtent(HDC hdc, - LPWSTR lpwsz, - INT cwc, - LPSIZE psize, - UINT flOpts) -{ - return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, 0); -} - -W32KAPI -INT -APIENTRY -NtGdiGetTextFaceW( - IN HDC hDC, - IN INT Count, - OUT OPTIONAL LPWSTR FaceName, - IN BOOL bAliasName -) -{ - PDC Dc; - PDC_ATTR Dc_Attr; - HFONT hFont; - PTEXTOBJ TextObj; - NTSTATUS Status; - - /* FIXME: Handle bAliasName */ - - Dc = DC_LockDc(hDC); - if (Dc == NULL) - { - SetLastWin32Error(ERROR_INVALID_HANDLE); - return FALSE; - } - Dc_Attr = Dc->pDc_Attr; - if(!Dc_Attr) Dc_Attr = &Dc->Dc_Attr; - hFont = Dc_Attr->hlfntNew; - DC_UnlockDc(Dc); - - TextObj = TEXTOBJ_LockText(hFont); - ASSERT(TextObj != NULL); - Count = min(Count, wcslen(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName)); - Status = MmCopyToCaller(FaceName, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName, Count * sizeof(WCHAR)); - TEXTOBJ_UnlockText(TextObj); - if (!NT_SUCCESS(Status)) - { - SetLastNtError(Status); - return 0; - } - - return Count; } W32KAPI Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Wed Oct 29 20:32:44 2008 @@ -2,7 +2,7 @@ * PROJECT: ReactOS win32 kernel mode subsystem * LICENSE: GPL - See COPYING in the top level directory * FILE: subsystems/win32/win32k/objects/text.c - * PURPOSE: Text + * PURPOSE: Text/Font * PROGRAMMER: */ @@ -13,8 +13,220 @@ #define NDEBUG #include <debug.h> +BOOL +FASTCALL +ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs); + +BOOL +FASTCALL +TextIntGetTextExtentPoint(PDC dc, + PTEXTOBJ TextObj, + LPCWSTR String, + int Count, + int MaxExtent, + LPINT Fit, + LPINT Dx, + LPSIZE Size); + /** Functions ******************************************************************/ + +BOOL +APIENTRY +NtGdiGetRasterizerCaps( + OUT LPRASTERIZER_STATUS praststat, + IN ULONG cjBytes) +{ + NTSTATUS Status = STATUS_SUCCESS; + RASTERIZER_STATUS rsSafe; + + if (praststat && cjBytes) + { + if ( cjBytes >= sizeof(RASTERIZER_STATUS) ) cjBytes = sizeof(RASTERIZER_STATUS); + if ( ftGdiGetRasterizerCaps(&rsSafe)) + { + _SEH_TRY + { + ProbeForWrite( praststat, + sizeof(RASTERIZER_STATUS), + 1); + RtlCopyMemory(praststat, &rsSafe, cjBytes ); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if (!NT_SUCCESS(Status)) + { + SetLastNtError(Status); + return FALSE; + } + } + } + return FALSE; +} + +W32KAPI +BOOL +APIENTRY +NtGdiGetTextExtentExW( + IN HDC hDC, + IN OPTIONAL LPWSTR UnsafeString, + IN ULONG Count, + IN ULONG MaxExtent, + OUT OPTIONAL PULONG UnsafeFit, + OUT OPTIONAL PULONG UnsafeDx, + OUT LPSIZE UnsafeSize, + IN FLONG fl +) +{ + PDC dc; + PDC_ATTR Dc_Attr; + LPWSTR String; + SIZE Size; + NTSTATUS Status; + BOOLEAN Result; + INT Fit; + LPINT Dx; + PTEXTOBJ TextObj; + + /* FIXME: Handle fl */ + + if (0 == Count) + { + Size.cx = 0; + Size.cy = 0; + Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE)); + if (! NT_SUCCESS(Status)) + { + SetLastNtError(Status); + return FALSE; + } + return TRUE; + } + + String = ExAllocatePoolWithTag(PagedPool, Count * sizeof(WCHAR), TAG_GDITEXT); + if (NULL == String) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + if (NULL != UnsafeDx) + { + Dx = ExAllocatePoolWithTag(PagedPool, Count * sizeof(INT), TAG_GDITEXT); + if (NULL == Dx) + { + ExFreePool(String); + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + } + else + { + Dx = NULL; + } + + Status = MmCopyFromCaller(String, UnsafeString, Count * sizeof(WCHAR)); + if (! NT_SUCCESS(Status)) + { + if (NULL != Dx) + { + ExFreePool(Dx); + } + ExFreePool(String); + SetLastNtError(Status); + return FALSE; + } + + dc = DC_LockDc(hDC); + if (NULL == dc) + { + if (NULL != Dx) + { + ExFreePool(Dx); + } + ExFreePool(String); + SetLastWin32Error(ERROR_INVALID_HANDLE); + return FALSE; + } + Dc_Attr = dc->pDc_Attr; + if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr; + TextObj = TEXTOBJ_LockText(Dc_Attr->hlfntNew); + if ( TextObj ) + { + Result = TextIntGetTextExtentPoint(dc, TextObj, String, Count, MaxExtent, + NULL == UnsafeFit ? NULL : &Fit, Dx, &Size); + TEXTOBJ_UnlockText(TextObj); + } + else + Result = FALSE; + DC_UnlockDc(dc); + + ExFreePool(String); + if (! Result) + { + if (NULL != Dx) + { + ExFreePool(Dx); + } + return FALSE; + } + + if (NULL != UnsafeFit) + { + Status = MmCopyToCaller(UnsafeFit, &Fit, sizeof(INT)); + if (! NT_SUCCESS(Status)) + { + if (NULL != Dx) + { + ExFreePool(Dx); + } + SetLastNtError(Status); + return FALSE; + } + } + + if (NULL != UnsafeDx) + { + Status = MmCopyToCaller(UnsafeDx, Dx, Count * sizeof(INT)); + if (! NT_SUCCESS(Status)) + { + if (NULL != Dx) + { + ExFreePool(Dx); + } + SetLastNtError(Status); + return FALSE; + } + } + if (NULL != Dx) + { + ExFreePool(Dx); + } + + Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE)); + if (! NT_SUCCESS(Status)) + { + SetLastNtError(Status); + return FALSE; + } + + return TRUE; +} + +BOOL +STDCALL +NtGdiGetTextExtent(HDC hdc, + LPWSTR lpwsz, + INT cwc, + LPSIZE psize, + UINT flOpts) +{ + return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, 0); +} BOOL STDCALL @@ -42,4 +254,48 @@ return TRUE; } + +W32KAPI +INT +APIENTRY +NtGdiGetTextFaceW( + IN HDC hDC, + IN INT Count, + OUT OPTIONAL LPWSTR FaceName, + IN BOOL bAliasName +) +{ + PDC Dc; + PDC_ATTR Dc_Attr; + HFONT hFont; + PTEXTOBJ TextObj; + NTSTATUS Status; + + /* FIXME: Handle bAliasName */ + + Dc = DC_LockDc(hDC); + if (Dc == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return FALSE; + } + Dc_Attr = Dc->pDc_Attr; + if(!Dc_Attr) Dc_Attr = &Dc->Dc_Attr; + hFont = Dc_Attr->hlfntNew; + DC_UnlockDc(Dc); + + TextObj = TEXTOBJ_LockText(hFont); + ASSERT(TextObj != NULL); + Count = min(Count, wcslen(TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName)); + Status = MmCopyToCaller(FaceName, TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfFaceName, Count * sizeof(WCHAR)); + TEXTOBJ_UnlockText(TextObj); + if (!NT_SUCCESS(Status)) + { + SetLastNtError(Status); + return 0; + } + + return Count; +} + /* EOF */
16 years, 1 month
1
0
0
0
[hyperion] 37077: Merging 37059-37076 due to rbuild changes
by hyperion@svn.reactos.org
Author: hyperion Date: Wed Oct 29 19:52:39 2008 New Revision: 37077 URL:
http://svn.reactos.org/svn/reactos?rev=37077&view=rev
Log: Merging 37059-37076 due to rbuild changes Added: branches/the-real-msvc/hal/hal/hal.pspec - copied unchanged from r37076, trunk/reactos/hal/hal/hal.pspec branches/the-real-msvc/subsystems/win32/win32k/objects/freetype.c - copied unchanged from r37076, trunk/reactos/subsystems/win32/win32k/objects/freetype.c branches/the-real-msvc/subsystems/win32/win32k/win32k.pspec - copied unchanged from r37076, trunk/reactos/subsystems/win32/win32k/win32k.pspec Removed: branches/the-real-msvc/hal/hal/hal.spec branches/the-real-msvc/ntoskrnl/ntoskrnl.spec Modified: branches/the-real-msvc/dll/win32/shell32/shfldr_admintools.c branches/the-real-msvc/dll/win32/shell32/shlview.c branches/the-real-msvc/dll/win32/shell32/shv_def_cmenu.c branches/the-real-msvc/hal/hal/hal.rbuild branches/the-real-msvc/hal/halarm/up/halup.rbuild branches/the-real-msvc/hal/halx86/halmp.rbuild branches/the-real-msvc/hal/halx86/halup.rbuild branches/the-real-msvc/hal/halx86/halxbox.rbuild branches/the-real-msvc/include/reactos/win32k/ntgdityp.h branches/the-real-msvc/ntoskrnl/include/internal/ke_x.h branches/the-real-msvc/ntoskrnl/ke/timerobj.c branches/the-real-msvc/ntoskrnl/mm/section.c branches/the-real-msvc/ntoskrnl/mm/virtual.c branches/the-real-msvc/ntoskrnl/ntoskrnl-generic.rbuild branches/the-real-msvc/subsystems/win32/win32k/objects/dc.c branches/the-real-msvc/subsystems/win32/win32k/objects/font.c branches/the-real-msvc/subsystems/win32/win32k/objects/text.c branches/the-real-msvc/subsystems/win32/win32k/win32k.rbuild branches/the-real-msvc/tools/rbuild/backend/codeblocks/codeblocks.cpp branches/the-real-msvc/tools/rbuild/backend/codeblocks/codeblocks.h branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.h branches/the-real-msvc/tools/rbuild/compilationunit.cpp [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/the-real-msvc/dll/win32/shell32/shfldr_admintools.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/shell32…
Modified: branches/the-real-msvc/dll/win32/shell32/shlview.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/shell32…
Modified: branches/the-real-msvc/dll/win32/shell32/shv_def_cmenu.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/shell32…
Modified: branches/the-real-msvc/hal/hal/hal.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/hal/hal.rbuil…
Removed: branches/the-real-msvc/hal/hal/hal.spec URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/hal/hal.spec?…
Modified: branches/the-real-msvc/hal/halarm/up/halup.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/halarm/up/hal…
Modified: branches/the-real-msvc/hal/halx86/halmp.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/halx86/halmp.…
Modified: branches/the-real-msvc/hal/halx86/halup.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/halx86/halup.…
Modified: branches/the-real-msvc/hal/halx86/halxbox.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/hal/halx86/halxbo…
Modified: branches/the-real-msvc/include/reactos/win32k/ntgdityp.h URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/include/reactos/w…
Modified: branches/the-real-msvc/ntoskrnl/include/internal/ke_x.h URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/include/…
Modified: branches/the-real-msvc/ntoskrnl/ke/timerobj.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/ke/timer…
Modified: branches/the-real-msvc/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/mm/secti…
Modified: branches/the-real-msvc/ntoskrnl/mm/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/mm/virtu…
Modified: branches/the-real-msvc/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/ntoskrnl…
Removed: branches/the-real-msvc/ntoskrnl/ntoskrnl.spec URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ntoskrnl/ntoskrnl…
Modified: branches/the-real-msvc/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/subsystems/win32/…
Modified: branches/the-real-msvc/subsystems/win32/win32k/objects/font.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/subsystems/win32/…
Modified: branches/the-real-msvc/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/subsystems/win32/…
Modified: branches/the-real-msvc/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/subsystems/win32/…
Modified: branches/the-real-msvc/tools/rbuild/backend/codeblocks/codeblocks.cpp URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
Modified: branches/the-real-msvc/tools/rbuild/backend/codeblocks/codeblocks.h URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
Modified: branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
Modified: branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.h URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
Modified: branches/the-real-msvc/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/comp…
16 years, 1 month
1
0
0
0
[jimtabor] 37076: - Move FreeType support to freetype.c. - Add font.c to build system and picked our first victim to populate it. - Implemented NtGdiSetTextJustification in text.c.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Oct 29 16:57:04 2008 New Revision: 37076 URL:
http://svn.reactos.org/svn/reactos?rev=37076&view=rev
Log: - Move FreeType support to freetype.c. - Add font.c to build system and picked our first victim to populate it. - Implemented NtGdiSetTextJustification in text.c. Added: trunk/reactos/subsystems/win32/win32k/objects/freetype.c - copied, changed from r37043, trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/font.c trunk/reactos/subsystems/win32/win32k/objects/text.c trunk/reactos/subsystems/win32/win32k/win32k.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
Modified: trunk/reactos/subsystems/win32/win32k/objects/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
Copied: trunk/reactos/subsystems/win32/win32k/objects/freetype.c (from r37043, trunk/reactos/subsystems/win32/win32k/objects/text.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
16 years, 1 month
1
0
0
0
[sginsberg] 37075: - Fix kernel SMP intrinsics: - Correct typos and add missing casts - Use IPI_APC in KiRequestApcInterrupt as we are requesting an APC IPI, not DPC - Fix KiAcquireDispatcherObject (credit to Alex) - Add missing SMP versions of KiAcquire/ReleaseDispatcherLockAtDpcLevel and KiAcquire/ReleaseTimerLock - Stub out KiRundownThread for SMP
by sginsberg@svn.reactos.org
Author: sginsberg Date: Wed Oct 29 16:08:20 2008 New Revision: 37075 URL:
http://svn.reactos.org/svn/reactos?rev=37075&view=rev
Log: - Fix kernel SMP intrinsics: - Correct typos and add missing casts - Use IPI_APC in KiRequestApcInterrupt as we are requesting an APC IPI, not DPC - Fix KiAcquireDispatcherObject (credit to Alex) - Add missing SMP versions of KiAcquire/ReleaseDispatcherLockAtDpcLevel and KiAcquire/ReleaseTimerLock - Stub out KiRundownThread for SMP Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke_x.h [iso-8859-1] Wed Oct 29 16:08:20 2008 @@ -87,6 +87,46 @@ (DrAddress <= MM_HIGHEST_USER_ADDRESS) ? DrAddress : 0); } #endif /* _M_IX86 */ + +#ifndef _M_ARM +PRKTHREAD +FORCEINLINE +KeGetCurrentThread(VOID) +{ +#ifdef _M_IX86 + /* Return the current thread */ + return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread; +#else + PKPRCB Prcb = KeGetCurrentPrcb(); + return Prcb->CurrentThread; +#endif +} + +UCHAR +FORCEINLINE +KeGetPreviousMode(VOID) +{ + /* Return the current mode */ + return KeGetCurrentThread()->PreviousMode; +} +#endif + +VOID +FORCEINLINE +KeFlushProcessTb(VOID) +{ + /* Flush the TLB by resetting CR3 */ +#ifdef _M_PPC + __asm__("sync\n\tisync\n\t"); +#elif _M_ARM + // + // We need to implement this! + // + ASSERTMSG("Need ARM flush routine\n", FALSE); +#else + __writecr3(__readcr3()); +#endif +} // // Enters a Guarded Region @@ -411,7 +451,10 @@ { #ifdef DBG /* On debug builds, we use a much slower but useful routine */ - Kii386SpinOnSpinLock(SpinLock, 5); + //Kii386SpinOnSpinLock(SpinLock, 5); + + /* FIXME: Do normal yield for now */ + YieldProcessor(); #else /* Otherwise, just yield and keep looping */ YieldProcessor(); @@ -422,7 +465,7 @@ { #ifdef DBG /* On debug builds, we OR in the KTHREAD */ - *SpinLock = KeGetCurrentThread() | 1; + *SpinLock = (KSPIN_LOCK)KeGetCurrentThread() | 1; #endif /* All is well, break out */ break; @@ -439,21 +482,21 @@ { #ifdef DBG /* Make sure that the threads match */ - if ((KeGetCurrentThread() | 1) != *SpinLock) + if (((KSPIN_LOCK)KeGetCurrentThread() | 1) != *SpinLock) { /* They don't, bugcheck */ - KeBugCheckEx(SPIN_LOCK_NOT_OWNED, SpinLock, 0, 0, 0); + KeBugCheckEx(SPIN_LOCK_NOT_OWNED, (ULONG_PTR)SpinLock, 0, 0, 0); } #endif /* Clear the lock */ - InterlockedAnd(SpinLock, 0); -} - -KIRQL + InterlockedAnd((PLONG)SpinLock, 0); +} + +VOID FORCEINLINE KiAcquireDispatcherObject(IN DISPATCHER_HEADER* Object) { - LONG OldValue, NewValue; + LONG OldValue; /* Make sure we're at a safe level to touch the lock */ ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); @@ -462,20 +505,23 @@ do { /* Loop until the other CPU releases it */ - while ((UCHAR)Object->Lock & KOBJECT_LOCK_BIT) + while (TRUE) { + /* Check if it got released */ + OldValue = Object->Lock; + if ((OldValue & KOBJECT_LOCK_BIT) == 0) break; + /* Let the CPU know that this is a loop */ YieldProcessor(); - }; + } /* Try acquiring the lock now */ - NewValue = InterlockedCompareExchange(&Object->Lock, - OldValue | KOBJECT_LOCK_BIT, - OldValue); - } while (NewValue != OldValue); -} - -KIRQL + } while (InterlockedCompareExchange(&Object->Lock, + OldValue | KOBJECT_LOCK_BIT, + OldValue) != OldValue); +} + +VOID FORCEINLINE KiReleaseDispatcherObject(IN DISPATCHER_HEADER* Object) { @@ -506,6 +552,22 @@ KiExitDispatcher(OldIrql); } +VOID +FORCEINLINE +KiAcquireDispatcherLockAtDpcLevel(VOID) +{ + /* Acquire the dispatcher lock */ + KeAcquireQueuedSpinLockAtDpcLevel(LockQueueDispatcherLock); +} + +VOID +FORCEINLINE +KiReleaseDispatcherLockFromDpcLevel(VOID) +{ + /* Release the dispatcher lock */ + KeReleaseQueuedSpinLockFromDpcLevel(LockQueueDispatcherLock); +} + // // This routine inserts a thread into the deferred ready list of the given CPU // @@ -569,7 +631,7 @@ for (;;) { /* Acquire the lock and break out if we acquired it first */ - if (!InterlockedExchange(&Prcb->PrcbLock, 1)) break; + if (!InterlockedExchange((PLONG)&Prcb->PrcbLock, 1)) break; /* Loop until the other CPU releases it */ do @@ -595,7 +657,7 @@ ASSERT(Prcb->PrcbLock != 0); /* Release it */ - InterlockedAnd(&Prcb->PrcbLock, 0); + InterlockedAnd((PLONG)&Prcb->PrcbLock, 0); } // @@ -616,7 +678,7 @@ for (;;) { /* Acquire the lock and break out if we acquired it first */ - if (!InterlockedExchange(&Thread->ThreadLock, 1)) break; + if (!InterlockedExchange((PLONG)&Thread->ThreadLock, 1)) break; /* Loop until the other CPU releases it */ do @@ -639,7 +701,7 @@ KiReleaseThreadLock(IN PKTHREAD Thread) { /* Release it */ - InterlockedAnd(&Thread->ThreadLock, 0); + InterlockedAnd((PLONG)&Thread->ThreadLock, 0); } FORCEINLINE @@ -653,7 +715,7 @@ /* Otherwise, try to acquire it and check the result */ Value = 1; - Value = InterlockedExchange(&Thread->ThreadLock, &Value); + Value = InterlockedExchange((PLONG)&Thread->ThreadLock, Value); /* Return the lock state */ return (Value == TRUE); @@ -669,6 +731,16 @@ FORCEINLINE VOID +KiRundownThread(IN PKTHREAD Thread) +{ +#if defined(_M_IX86) || defined(_M_AMD64) + /* FIXME: TODO */ + ASSERTMSG("Not yet implemented\n", FALSE); +#endif +} + +FORCEINLINE +VOID KiRequestApcInterrupt(IN BOOLEAN NeedApc, IN UCHAR Processor) { @@ -676,10 +748,10 @@ if (NeedApc) { /* Check if it's on another CPU */ - if (KeGetPcr()->Number != Cpu) + if (KeGetPcr()->Number != Processor) { /* Send an IPI to request delivery */ - KiIpiSendRequest(AFFINITY_MASK(Cpu), IPI_DPC); + KiIpiSendRequest(AFFINITY_MASK(Processor), IPI_APC); } else { @@ -687,6 +759,36 @@ HalRequestSoftwareInterrupt(APC_LEVEL); } } +} + +FORCEINLINE +PKSPIN_LOCK_QUEUE +KiAcquireTimerLock(IN ULONG Hand) +{ + PKSPIN_LOCK_QUEUE LockQueue; + ULONG LockIndex; + ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); + + /* Get the lock index */ + LockIndex = Hand >> LOCK_QUEUE_TIMER_LOCK_SHIFT; + LockIndex &= (LOCK_QUEUE_TIMER_TABLE_LOCKS - 1); + + /* Now get the lock */ + LockQueue = &KeGetCurrentPrcb()->LockQueue[LockQueueTimerTableLock + LockIndex]; + + /* Acquire it and return */ + KeAcquireQueuedSpinLockAtDpcLevel(LockQueue); + return LockQueue; +} + +FORCEINLINE +VOID +KiReleaseTimerLock(IN PKSPIN_LOCK_QUEUE LockQueue) +{ + ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL); + + /* Release the lock */ + KeReleaseQueuedSpinLockFromDpcLevel(LockQueue); } #endif @@ -1525,44 +1627,3 @@ /* Return the new priority */ return Priority; } - -#ifndef _M_ARM -PRKTHREAD -FORCEINLINE -KeGetCurrentThread(VOID) -{ -#ifdef _M_IX86 - /* Return the current thread */ - return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread; -#else - PKPRCB Prcb = KeGetCurrentPrcb(); - return Prcb->CurrentThread; -#endif -} - -UCHAR -FORCEINLINE -KeGetPreviousMode(VOID) -{ - /* Return the current mode */ - return KeGetCurrentThread()->PreviousMode; -} -#endif - -VOID -FORCEINLINE -KeFlushProcessTb(VOID) -{ - /* Flush the TLB by resetting CR3 */ -#ifdef _M_PPC - __asm__("sync\n\tisync\n\t"); -#elif _M_ARM - // - // We need to implement this! - // - ASSERTMSG("Need ARM flush routine\n", FALSE); -#else - __writecr3(__readcr3()); -#endif -} -
16 years, 1 month
1
0
0
0
[hyperion] 37074: Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
by hyperion@svn.reactos.org
Author: hyperion Date: Wed Oct 29 15:06:44 2008 New Revision: 37074 URL:
http://svn.reactos.org/svn/reactos?rev=37074&view=rev
Log: Merging r37048, r37051, r37052, r37055 from the-real-msvc branch Added: trunk/reactos/drivers/bus/acpi/include/platform/acmsc.h - copied unchanged from r37048, branches/the-real-msvc/drivers/bus/acpi/include/platform/acmsc.h Removed: trunk/reactos/lib/3rdparty/mingw/strcasecmp.c trunk/reactos/lib/3rdparty/mingw/strncasecmp.c trunk/reactos/lib/3rdparty/mingw/wcscmpi.c Modified: trunk/reactos/base/system/smss/smss.h trunk/reactos/drivers/bus/acpi/include/platform/acwin.h trunk/reactos/lib/3rdparty/mingw/crt1.c trunk/reactos/lib/3rdparty/mingw/mingw.rbuild trunk/reactos/lib/rtl/debug.c trunk/reactos/lib/rtl/res.c trunk/reactos/lib/rtl/rtl.h trunk/reactos/lib/sdk/crt/math/i386/ci.c trunk/reactos/lib/sdk/crt/string/ctype.c Modified: trunk/reactos/base/system/smss/smss.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smss.h?re…
============================================================================== --- trunk/reactos/base/system/smss/smss.h [iso-8859-1] (original) +++ trunk/reactos/base/system/smss/smss.h [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -2,6 +2,7 @@ #define _SMSS_H_INCLUDED_ #include <stdio.h> +#include <stdlib.h> #define WIN32_NO_STATUS #include <windows.h> #define NTOS_MODE_USER Modified: trunk/reactos/drivers/bus/acpi/include/platform/acwin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/include/p…
============================================================================== --- trunk/reactos/drivers/bus/acpi/include/platform/acwin.h [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/include/platform/acwin.h [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -47,14 +47,25 @@ #endif -/* ReactOS uses GCC */ +#if defined(__GNUC__) #include "acgcc.h" #undef disable -#define disable() __asm__("cli\n\t"); +#define disable() __asm__("cli\n\t") #undef enable -#define enable() __asm__("sti\n\t"); +#define enable() __asm__("sti\n\t") + +#elif defined(_MSC_VER) + +#include "acmsc.h" + +#undef disable +#define disable() __asm { cli } +#undef enable +#define enable() __asm { sti } + +#endif #undef DEBUGGER_THREADING #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED Modified: trunk/reactos/lib/3rdparty/mingw/crt1.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/crt1.c?…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/crt1.c [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -220,6 +220,7 @@ _pei386_runtime_relocator (); #endif +#if defined(__GNUC__) #if defined(__i386__) /* Align the stack to 16 bytes for the sake of SSE ops in main or in functions inlined into main. */ @@ -233,6 +234,17 @@ #else #error Unsupported architecture #endif +#elif defined(_MSC_VER) +#if defined(_M_IX86) + /* Align the stack to 16 bytes for the sake of SSE ops in main + or in functions inlined into main. */ + __asm and esp, 0FFFFFFF0h +#else +#error TODO +#endif +#else +#error TODO +#endif /* * Call the main function. If the user does not supply one Modified: trunk/reactos/lib/3rdparty/mingw/mingw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/mingw.r…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -13,10 +13,7 @@ <file>isascii.c</file> <file>iscsym.c</file> <file>iscsymf.c</file> - <file>strcasecmp.c</file> - <file>strncasecmp.c</file> <file>toascii.c</file> - <file>wcscmpi.c</file> <file>_wgetopt.c</file> <if property="ARCH" value="i386"> <file>pseudo-reloc.c</file> Removed: trunk/reactos/lib/3rdparty/mingw/strcasecmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/strcase…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/strcasecmp.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/strcasecmp.c (removed) @@ -1,21 +1,0 @@ -/* - * strcasecmp.c - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. - * - * Oldnames from ANSI header string.h - * - * Some wrapper functions for those old name functions whose appropriate - * equivalents are not simply underscore prefixed. - * - */ - -#include <string.h> - -int -strcasecmp (const char *sz1, const char *sz2) -{ - return _stricmp (sz1, sz2); -} - Removed: trunk/reactos/lib/3rdparty/mingw/strncasecmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/strncas…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/strncasecmp.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/strncasecmp.c (removed) @@ -1,21 +1,0 @@ -/* - * strncasecmp.c - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. - * - * Oldnames from ANSI header string.h - * - * Some wrapper functions for those old name functions whose appropriate - * equivalents are not simply underscore prefixed. - * - */ - -#include <string.h> - -int -strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare) -{ - return _strnicmp (sz1, sz2, sizeMaxCompare); -} - Removed: trunk/reactos/lib/3rdparty/mingw/wcscmpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/wcscmpi…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/wcscmpi.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/wcscmpi.c (removed) @@ -1,21 +1,0 @@ -/* - * wcscmpi.c - * This file has no copyright assigned and is placed in the Public Domain. - * This file is a part of the mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER within the package. - * - * Oldnames from ANSI header string.h - * - * Some wrapper functions for those old name functions whose appropriate - * equivalents are not simply underscore prefixed. - * - */ - -#include <string.h> - -int -wcscmpi (const wchar_t * ws1, const wchar_t * ws2) -{ - return _wcsicmp (ws1, ws2); -} - Modified: trunk/reactos/lib/rtl/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=37074&…
============================================================================== --- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -79,7 +79,7 @@ /* Copy it */ strncpy(Buffer, Prefix, PrefixLength); - + /* Do the printf */ Length = _vsnprintf(Buffer + PrefixLength, sizeof(Buffer) - PrefixLength, @@ -109,7 +109,7 @@ /* Add the prefix */ Length += PrefixLength; } - + /* Build the string */ DebugString.Length = Length; DebugString.Buffer = Buffer; @@ -202,17 +202,19 @@ DbgPrint(PCCH Format, ...) { + ULONG n; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal("", + n = vDbgPrintExWithPrefixInternal("", -1, DPFLTR_ERROR_LEVEL, Format, ap, TRUE); va_end(ap); + return n; } /* @@ -225,17 +227,19 @@ IN PCCH Format, ...) { + ULONG n; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal("", + n = vDbgPrintExWithPrefixInternal("", ComponentId, Level, Format, ap, TRUE); va_end(ap); + return n; } /* @@ -246,16 +250,19 @@ DbgPrintReturnControlC(PCH Format, ...) { + ULONG n; va_list ap; /* Call the internal routine that also handles ControlC */ va_start(ap, Format); - return vDbgPrintExWithPrefixInternal("", + n = vDbgPrintExWithPrefixInternal("", -1, DPFLTR_ERROR_LEVEL, Format, ap, FALSE); + va_end(ap); + return n; } /* Modified: trunk/reactos/lib/rtl/res.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/res.c?rev=37074&r1…
============================================================================== --- trunk/reactos/lib/rtl/res.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/res.c [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -60,7 +60,7 @@ */ int push_language( USHORT *list, ULONG pos, WORD lang ) { - int i; + ULONG i; for (i = 0; i < pos; i++) if (list[i] == lang) return pos; list[pos++] = lang; return pos; Modified: trunk/reactos/lib/rtl/rtl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtl.h?rev=37074&r1…
============================================================================== --- trunk/reactos/lib/rtl/rtl.h [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/rtl.h [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -31,9 +31,7 @@ #include <reactos/helper.h> #include <pseh/pseh.h> -#ifndef _MSC_VER #include <intrin.h> -#endif #endif /* RTL_H */ Modified: trunk/reactos/lib/sdk/crt/math/i386/ci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/i386/ci.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/i386/ci.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/i386/ci.c [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -1,11 +1,19 @@ #include <precomp.h> #include <math.h> +#if defined(__GNUC__) #define FPU_DOUBLE(var) double var; \ __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) #define FPU_DOUBLES(var1,var2) double var1,var2; \ __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) +#elif defined(_MSC_VER) +#define FPU_DOUBLE(var) double var; \ + __asm { fstp [var] }; __asm { fwait }; +#define FPU_DOUBLES(var1,var2) double var1,var2; \ + __asm { fstp [var1] }; __asm { fwait }; \ + __asm { fstp [var2] }; __asm { fwait }; +#endif /* * @implemented Modified: trunk/reactos/lib/sdk/crt/string/ctype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/ctype.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/ctype.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/ctype.c [iso-8859-1] Wed Oct 29 15:06:44 2008 @@ -591,7 +591,7 @@ /* * @implemented */ -wchar_t towlower(wchar_t c) +wint_t towlower(wint_t c) { if (iswctype (c, _UPPER)) return (c - upalpha); @@ -601,7 +601,7 @@ /* * @implemented */ -wchar_t towupper(wchar_t c) +wint_t towupper(wint_t c) { if (iswctype (c, _LOWER)) return (c + upalpha);
16 years, 1 month
1
0
0
0
[mjmartin] 37073: - Implement VirtualMemoryInformationClass of MemorySectionName for NtQueryVirtualMemory.
by mjmartin@svn.reactos.org
Author: mjmartin Date: Wed Oct 29 14:50:55 2008 New Revision: 37073 URL:
http://svn.reactos.org/svn/reactos?rev=37073&view=rev
Log: - Implement VirtualMemoryInformationClass of MemorySectionName for NtQueryVirtualMemory. Modified: trunk/reactos/ntoskrnl/mm/virtual.c Modified: trunk/reactos/ntoskrnl/mm/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] Wed Oct 29 14:50:55 2008 @@ -947,6 +947,9 @@ NTSTATUS Status = STATUS_SUCCESS; SIZE_T ResultLength = 0; KPROCESSOR_MODE PreviousMode; + WCHAR ModuleFileNameBuffer[MAX_PATH] = {0}; + UNICODE_STRING ModuleFileName; + PMEMORY_SECTION_NAME SectionName = NULL; union { MEMORY_BASIC_INFORMATION BasicInfo; @@ -985,13 +988,58 @@ return STATUS_INVALID_PARAMETER; } - Status = MiQueryVirtualMemory(ProcessHandle, - Address, - VirtualMemoryInformationClass, - &VirtualMemoryInfo, - Length, - &ResultLength ); - + /* FIXME: Move this inside MiQueryVirtualMemory */ + if (VirtualMemoryInformationClass == MemorySectionName) + { + RtlInitEmptyUnicodeString(&ModuleFileName, ModuleFileNameBuffer, sizeof(ModuleFileNameBuffer)); + Status = MmGetFileNameForAddress(Address, &ModuleFileName); + + if (NT_SUCCESS(Status)) + { + SectionName = VirtualMemoryInformation; + if (PreviousMode != KernelMode) + { + _SEH_TRY + { + RtlInitUnicodeString(&SectionName->SectionFileName, SectionName->NameBuffer); + SectionName->SectionFileName.MaximumLength = Length; + RtlCopyUnicodeString(&SectionName->SectionFileName, &ModuleFileName); + + if (UnsafeResultLength != NULL) + { + *UnsafeResultLength = ModuleFileName.Length; + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + else + { + RtlInitUnicodeString(&SectionName->SectionFileName, SectionName->NameBuffer); + SectionName->SectionFileName.MaximumLength = Length; + RtlCopyUnicodeString(&SectionName->SectionFileName, &ModuleFileName); + + if (UnsafeResultLength != NULL) + { + *UnsafeResultLength = ModuleFileName.Length; + } + } + } + return Status; + } + else + { + Status = MiQueryVirtualMemory(ProcessHandle, + Address, + VirtualMemoryInformationClass, + &VirtualMemoryInfo, + Length, + &ResultLength); + } + if (NT_SUCCESS(Status)) { if (PreviousMode != KernelMode)
16 years, 1 month
1
0
0
0
[jimtabor] 37072: - Update width info structure.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Oct 29 14:44:12 2008 New Revision: 37072 URL:
http://svn.reactos.org/svn/reactos?rev=37072&view=rev
Log: - Update width info structure. Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntgdityp.h [iso-8859-1] Wed Oct 29 14:44:12 2008 @@ -218,11 +218,11 @@ typedef D3DNTHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEI; typedef LONG FIX; -typedef struct _CHWIDTHINFO -{ - LONG lMaxNegA; - LONG lMaxNegC; - LONG lMinWidthD; +typedef struct _CHWIDTHINFO // Based on FD_DEVICEMETRICS +{ + LONG lMinA; + LONG lMinC; + LONG lMinD; } CHWIDTHINFO, *PCHWIDTHINFO; typedef struct _UNIVERSAL_FONT_ID
16 years, 1 month
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
52
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
Results per page:
10
25
50
100
200