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
September 2006
----- 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
16 participants
146 discussions
Start a n
N
ew thread
[tretiakov] 24256: - Implement NtGdiStrokePath and NtGdiStrokeAndFillPath (based on wine) - Get rid of PATH_GetPathFromDc()
by tretiakov@svn.reactos.org
Author: tretiakov Date: Sun Sep 24 21:02:29 2006 New Revision: 24256 URL:
http://svn.reactos.org/svn/reactos?rev=24256&view=rev
Log: - Implement NtGdiStrokePath and NtGdiStrokeAndFillPath (based on wine) - Get rid of PATH_GetPathFromDc() Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/path.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/path.c Sun Sep 24 21:02:29 2006 @@ -33,12 +33,11 @@ BOOL FASTCALL PATH_DoArcPart (GdiPath *pPath, FLOAT_POINT corners[], double angleStart, double angleEnd, BOOL addMoveTo); BOOL FASTCALL PATH_FillPath( PDC dc, GdiPath *pPath ); BOOL FASTCALL PATH_FlattenPath (GdiPath *pPath); -VOID FASTCALL PATH_GetPathFromDC (PDC dc, GdiPath **ppPath); VOID FASTCALL PATH_NormalizePoint (FLOAT_POINT corners[], const FLOAT_POINT *pPoint, double *pX, double *pY); BOOL FASTCALL PATH_PathToRegion (GdiPath *pPath, INT nPolyFillMode, HRGN *pHrgn); BOOL FASTCALL PATH_ReserveEntries (GdiPath *pPath, INT numEntries); VOID FASTCALL PATH_ScaleNormalizedPoint (FLOAT_POINT corners[], double x, double y, POINT *pPoint); - +BOOL FASTCALL PATH_StrokePath(DC *dc, GdiPath *pPath); INT FASTCALL IntGdiGetArcDirection(DC *dc); @@ -51,16 +50,12 @@ STDCALL NtGdiAbortPath(HDC hDC) { - GdiPath *pPath; BOOL ret = TRUE; PDC dc = DC_LockDc ( hDC ); if( !dc ) return FALSE; - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - - PATH_EmptyPath( pPath ); + PATH_EmptyPath(&dc->w.path); DC_UnlockDc ( dc ); return ret; @@ -70,24 +65,20 @@ STDCALL NtGdiBeginPath( HDC hDC ) { - GdiPath *pPath; BOOL ret = TRUE; PDC dc = DC_LockDc ( hDC ); if( !dc ) return FALSE; - - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); /* If path is already open, do nothing */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) { /* Make sure that path is empty */ - PATH_EmptyPath( pPath ); + PATH_EmptyPath( &dc->w.path ); /* Initialize variables for new path */ - pPath->newStroke = TRUE; - pPath->state = PATH_Open; + dc->w.path.newStroke = TRUE; + dc->w.path.state = PATH_Open; } DC_UnlockDc ( dc ); @@ -142,22 +133,18 @@ STDCALL NtGdiEndPath(HDC hDC) { - GdiPath *pPath; BOOL ret = TRUE; PDC dc = DC_LockDc ( hDC ); if ( !dc ) return FALSE; - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is currently being constructed */ - if( pPath->state != PATH_Open ) + if( dc->w.path.state != PATH_Open ) { ret = FALSE; } /* Set flag to indicate that path is finished */ - else pPath->state = PATH_Closed; + else dc->w.path.state = PATH_Closed; DC_UnlockDc ( dc ); return ret; @@ -167,21 +154,17 @@ STDCALL NtGdiFillPath(HDC hDC) { - GdiPath *pPath; BOOL ret = TRUE; PDC dc = DC_LockDc ( hDC ); if ( !dc ) return FALSE; - - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - ret = PATH_FillPath( dc, pPath ); + ret = PATH_FillPath( dc, &dc->w.path ); if( ret ) { /* FIXME: Should the path be emptied even if conversion failed? */ - PATH_EmptyPath( pPath ); + PATH_EmptyPath( &dc->w.path ); } DC_UnlockDc ( dc ); @@ -323,18 +306,39 @@ BOOL STDCALL -NtGdiStrokeAndFillPath(HDC hDC) -{ - UNIMPLEMENTED; - return FALSE; +NtGdiStrokeAndFillPath(HDC hDC) +{ + DC *pDc; + BOOL bRet = FALSE; + + DPRINT("Enter %s\n", __FUNCTION__); + + if(!(pDc = DC_LockDc(hDC))) return FALSE; + + bRet = PATH_FillPath(pDc, &pDc->w.path); + if(bRet) bRet = PATH_StrokePath(pDc, &pDc->w.path); + if(bRet) PATH_EmptyPath(&pDc->w.path); + + DC_UnlockDc(pDc); + return bRet; } BOOL STDCALL -NtGdiStrokePath(HDC hDC) -{ - UNIMPLEMENTED; - return FALSE; +NtGdiStrokePath(HDC hDC) +{ + DC *pDc; + BOOL bRet = FALSE; + + DPRINT("Enter %s\n", __FUNCTION__); + + if(!(pDc = DC_LockDc(hDC))) return FALSE; + + bRet = PATH_StrokePath(pDc, &pDc->w.path); + PATH_EmptyPath(&pDc->w.path); + + DC_UnlockDc(pDc); + return bRet; } BOOL @@ -348,30 +352,27 @@ BOOL STDCALL NtGdiSelectClipPath(HDC hDC, int Mode) { - GdiPath *pPath; HRGN hrgnPath; BOOL success = FALSE; PDC dc = DC_LockDc ( hDC ); if( !dc ) return FALSE; - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is closed */ - if( pPath->state != PATH_Closed ) + if( dc->w.path.state != PATH_Closed ) { SetLastWin32Error(ERROR_CAN_NOT_COMPLETE); return FALSE; } /* Construct a region from the path */ - else if( PATH_PathToRegion( pPath, dc->w.polyFillMode, &hrgnPath ) ) + else if( PATH_PathToRegion( &dc->w.path, dc->w.polyFillMode, &hrgnPath ) ) { success = IntGdiExtSelectClipRgn( dc, hrgnPath, Mode ) != ERROR; NtGdiDeleteObject( hrgnPath ); /* Empty the path */ if( success ) - PATH_EmptyPath( pPath ); + PATH_EmptyPath( &dc->w.path); /* FIXME: Should this function delete the path even if it failed? */ } @@ -532,18 +533,14 @@ FASTCALL PATH_MoveTo ( PDC dc ) { - GdiPath *pPath; - - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) /* FIXME: Do we have to call SetLastError? */ return FALSE; /* Start a new stroke */ - pPath->newStroke = TRUE; + dc->w.path.newStroke = TRUE; return TRUE; } @@ -559,14 +556,10 @@ FASTCALL PATH_LineTo ( PDC dc, INT x, INT y ) { - GdiPath *pPath; POINT point, pointCurPos; - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; /* Convert point to device coordinates */ @@ -575,17 +568,17 @@ CoordLPtoDP ( dc, &point ); /* Add a PT_MOVETO if necessary */ - if ( pPath->newStroke ) - { - pPath->newStroke = FALSE; + if ( dc->w.path.newStroke ) + { + dc->w.path.newStroke = FALSE; IntGetCurrentPositionEx ( dc, &pointCurPos ); CoordLPtoDP ( dc, &pointCurPos ); - if ( !PATH_AddEntry(pPath, &pointCurPos, PT_MOVETO) ) + if ( !PATH_AddEntry(&dc->w.path, &pointCurPos, PT_MOVETO) ) return FALSE; } /* Add a PT_LINETO entry */ - return PATH_AddEntry(pPath, &point, PT_LINETO); + return PATH_AddEntry(&dc->w.path, &point, PT_LINETO); } /* PATH_Rectangle @@ -597,15 +590,11 @@ FASTCALL PATH_Rectangle ( PDC dc, INT x1, INT y1, INT x2, INT y2 ) { - GdiPath *pPath; POINT corners[2], pointTemp; INT temp; - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; /* Convert points to device coordinates */ @@ -642,15 +631,15 @@ /* Add four points to the path */ pointTemp.x=corners[1].x; pointTemp.y=corners[0].y; - if ( !PATH_AddEntry(pPath, &pointTemp, PT_MOVETO) ) - return FALSE; - if ( !PATH_AddEntry(pPath, corners, PT_LINETO) ) + if ( !PATH_AddEntry(&dc->w.path, &pointTemp, PT_MOVETO) ) + return FALSE; + if ( !PATH_AddEntry(&dc->w.path, corners, PT_LINETO) ) return FALSE; pointTemp.x=corners[0].x; pointTemp.y=corners[1].y; - if ( !PATH_AddEntry(pPath, &pointTemp, PT_LINETO) ) - return FALSE; - if ( !PATH_AddEntry(pPath, corners+1, PT_LINETO) ) + if ( !PATH_AddEntry(&dc->w.path, &pointTemp, PT_LINETO) ) + return FALSE; + if ( !PATH_AddEntry(&dc->w.path, corners+1, PT_LINETO) ) return FALSE; /* Close the rectangle figure */ @@ -693,7 +682,6 @@ PATH_Arc ( PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT yStart, INT xEnd, INT yEnd) { - GdiPath *pPath; double angleStart, angleEnd, angleStartQuadrant, angleEndQuadrant=0.0; /* Initialize angleEndQuadrant to silence gcc's warning */ double x, y; @@ -709,11 +697,8 @@ clockwise = ( IntGdiGetArcDirection(dc) == AD_CLOCKWISE ); - /* Get pointer to path */ - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; /* FIXME: Do we have to close the current figure? */ @@ -817,7 +802,7 @@ } /* Add the Bezier spline to the path */ - PATH_DoArcPart ( pPath, corners, angleStartQuadrant, angleEndQuadrant, start ); + PATH_DoArcPart ( &dc->w.path, corners, angleStartQuadrant, angleEndQuadrant, start ); start = FALSE; } while(!end); @@ -828,7 +813,6 @@ FASTCALL PATH_PolyBezierTo ( PDC dc, const POINT *pts, DWORD cbPoints ) { - GdiPath *pPath; POINT pt; ULONG i; @@ -836,19 +820,17 @@ ASSERT ( pts ); ASSERT ( cbPoints ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; /* Add a PT_MOVETO if necessary */ - if ( pPath->newStroke ) - { - pPath->newStroke=FALSE; + if ( dc->w.path.newStroke ) + { + dc->w.path.newStroke=FALSE; IntGetCurrentPositionEx ( dc, &pt ); CoordLPtoDP ( dc, &pt ); - if ( !PATH_AddEntry(pPath, &pt, PT_MOVETO) ) + if ( !PATH_AddEntry(&dc->w.path, &pt, PT_MOVETO) ) return FALSE; } @@ -856,7 +838,7 @@ { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry(pPath, &pt, PT_BEZIERTO); + PATH_AddEntry(&dc->w.path, &pt, PT_BEZIERTO); } return TRUE; } @@ -865,7 +847,6 @@ FASTCALL PATH_PolyBezier ( PDC dc, const POINT *pts, DWORD cbPoints ) { - GdiPath *pPath; POINT pt; ULONG i; @@ -873,17 +854,15 @@ ASSERT ( pts ); ASSERT ( cbPoints ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; for ( i = 0; i < cbPoints; i++ ) { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry ( pPath, &pt, (i == 0) ? PT_MOVETO : PT_BEZIERTO ); + PATH_AddEntry ( &dc->w.path, &pt, (i == 0) ? PT_MOVETO : PT_BEZIERTO ); } return TRUE; @@ -893,7 +872,6 @@ FASTCALL PATH_Polyline ( PDC dc, const POINT *pts, DWORD cbPoints ) { - GdiPath *pPath; POINT pt; ULONG i; @@ -901,17 +879,15 @@ ASSERT ( pts ); ASSERT ( cbPoints ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; for ( i = 0; i < cbPoints; i++ ) { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry(pPath, &pt, (i == 0) ? PT_MOVETO : PT_LINETO); + PATH_AddEntry(&dc->w.path, &pt, (i == 0) ? PT_MOVETO : PT_LINETO); } return TRUE; } @@ -920,7 +896,6 @@ FASTCALL PATH_PolylineTo ( PDC dc, const POINT *pts, DWORD cbPoints ) { - GdiPath *pPath; POINT pt; ULONG i; @@ -928,19 +903,17 @@ ASSERT ( pts ); ASSERT ( cbPoints ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; /* Add a PT_MOVETO if necessary */ - if ( pPath->newStroke ) - { - pPath->newStroke = FALSE; + if ( dc->w.path.newStroke ) + { + dc->w.path.newStroke = FALSE; IntGetCurrentPositionEx ( dc, &pt ); CoordLPtoDP ( dc, &pt ); - if ( !PATH_AddEntry(pPath, &pt, PT_MOVETO) ) + if ( !PATH_AddEntry(&dc->w.path, &pt, PT_MOVETO) ) return FALSE; } @@ -948,7 +921,7 @@ { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry(pPath, &pt, PT_LINETO); + PATH_AddEntry(&dc->w.path, &pt, PT_LINETO); } return TRUE; @@ -959,24 +932,21 @@ FASTCALL PATH_Polygon ( PDC dc, const POINT *pts, DWORD cbPoints ) { - GdiPath *pPath; POINT pt; ULONG i; ASSERT ( dc ); ASSERT ( pts ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; for(i = 0; i < cbPoints; i++) { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry(pPath, &pt, (i == 0) ? PT_MOVETO : + PATH_AddEntry(&dc->w.path, &pt, (i == 0) ? PT_MOVETO : ((i == cbPoints-1) ? PT_LINETO | PT_CLOSEFIGURE : PT_LINETO)); } @@ -987,7 +957,6 @@ FASTCALL PATH_PolyPolygon ( PDC dc, const POINT* pts, const INT* counts, UINT polygons ) { - GdiPath *pPath; POINT pt, startpt; ULONG poly, point, i; @@ -996,10 +965,8 @@ ASSERT ( counts ); ASSERT ( polygons ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ); + if ( dc->w.path.state != PATH_Open ); return FALSE; for(i = 0, poly = 0; poly < polygons; poly++) @@ -1009,10 +976,10 @@ pt = pts[i]; CoordLPtoDP ( dc, &pt ); if(point == 0) startpt = pt; - PATH_AddEntry(pPath, &pt, (point == 0) ? PT_MOVETO : PT_LINETO); + PATH_AddEntry(&dc->w.path, &pt, (point == 0) ? PT_MOVETO : PT_LINETO); } /* win98 adds an extra line to close the figure for some reason */ - PATH_AddEntry(pPath, &startpt, PT_LINETO | PT_CLOSEFIGURE); + PATH_AddEntry(&dc->w.path, &startpt, PT_LINETO | PT_CLOSEFIGURE); } return TRUE; } @@ -1021,7 +988,6 @@ FASTCALL PATH_PolyPolyline ( PDC dc, const POINT* pts, const DWORD* counts, DWORD polylines ) { - GdiPath *pPath; POINT pt; ULONG poly, point, i; @@ -1030,10 +996,8 @@ ASSERT ( counts ); ASSERT ( polylines ); - PATH_GetPathFromDC ( dc, &pPath ); - /* Check that path is open */ - if ( pPath->state != PATH_Open ) + if ( dc->w.path.state != PATH_Open ) return FALSE; for(i = 0, poly = 0; poly < polylines; poly++) @@ -1042,7 +1006,7 @@ { pt = pts[i]; CoordLPtoDP ( dc, &pt ); - PATH_AddEntry(pPath, &pt, (point == 0) ? PT_MOVETO : PT_LINETO); + PATH_AddEntry(&dc->w.path, &pt, (point == 0) ? PT_MOVETO : PT_LINETO); } } return TRUE; @@ -1085,7 +1049,7 @@ GdiPath newPath; INT srcpt; - memset(&newPath, 0, sizeof(newPath)); + RtlZeroMemory(&newPath, sizeof(newPath)); newPath.state = PATH_Open; for(srcpt = 0; srcpt < pPath->numEntriesUsed; srcpt++) { switch(pPath->pFlags[srcpt] & ~PT_CLOSEFIGURE) { @@ -1287,20 +1251,6 @@ } return TRUE; -} - -/* PATH_GetPathFromDC - * - * Retrieves a pointer to the GdiPath structure contained in an HDC and - * places it in *ppPath. TRUE is returned if successful, FALSE otherwise. - */ -VOID -FASTCALL -PATH_GetPathFromDC ( PDC dc, GdiPath **ppPath ) -{ - ASSERT ( dc ); - ASSERT ( ppPath ); - *ppPath = &dc->w.path; } /* PATH_DoArcPart @@ -1401,4 +1351,176 @@ *pX=(double)(pPoint->x-corners[0].x)/(double)(corners[1].x-corners[0].x) * 2.0 - 1.0; *pY=(double)(pPoint->y-corners[0].y)/(double)(corners[1].y-corners[0].y) * 2.0 - 1.0; } + + +BOOL FASTCALL PATH_StrokePath(DC *dc, GdiPath *pPath) +{ + BOOL ret = FALSE; + INT i=0; + INT nLinePts, nAlloc; + POINT *pLinePts = NULL; + POINT ptViewportOrg, ptWindowOrg; + SIZE szViewportExt, szWindowExt; + DWORD mapMode, graphicsMode; + XFORM xform; + + DPRINT("Enter %s\n", __FUNCTION__); + + if(pPath->state != PATH_Closed) + return FALSE; + + /* Save the mapping mode info */ + mapMode=dc->w.MapMode; + IntGetViewportExtEx(dc, &szViewportExt); + IntGetViewportOrgEx(dc, &ptViewportOrg); + IntGetWindowExtEx(dc, &szWindowExt); + IntGetWindowOrgEx(dc, &ptWindowOrg); + xform = dc->w.xformWorld2Wnd; + + /* Set MM_TEXT */ + dc->w.MapMode = MM_TEXT; + dc->vportOrgX = 0; + dc->vportOrgY = 0; + dc->wndOrgX = 0; + dc->wndOrgY = 0; + graphicsMode = dc->w.GraphicsMode; + dc->w.GraphicsMode = GM_ADVANCED; + IntGdiModifyWorldTransform(dc, &xform, MWT_IDENTITY); + dc->w.GraphicsMode = graphicsMode; + + /* Allocate enough memory for the worst case without beziers (one PT_MOVETO + * and the rest PT_LINETO with PT_CLOSEFIGURE at the end) plus some buffer + * space in case we get one to keep the number of reallocations small. */ + nAlloc = pPath->numEntriesUsed + 1 + 300; + pLinePts = ExAllocatePoolWithTag(PagedPool, nAlloc * sizeof(POINT), TAG_PATH); + if(!pLinePts) + { + DPRINT1("Can't allocate pool!\n"); + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + goto end; + } + nLinePts = 0; + + for(i = 0; i < pPath->numEntriesUsed; i++) + { + if((i == 0 || (pPath->pFlags[i-1] & PT_CLOSEFIGURE)) + && (pPath->pFlags[i] != PT_MOVETO)) + { + DPRINT1("Expected PT_MOVETO %s, got path flag %d\n", + i == 0 ? "as first point" : "after PT_CLOSEFIGURE", + (INT)pPath->pFlags[i]); + goto end; + } + + switch(pPath->pFlags[i]) + { + case PT_MOVETO: + DPRINT("Got PT_MOVETO (%ld, %ld)\n", + pPath->pPoints[i].x, pPath->pPoints[i].y); + if(nLinePts >= 2) IntGdiPolyline(dc, pLinePts, nLinePts); + nLinePts = 0; + pLinePts[nLinePts++] = pPath->pPoints[i]; + break; + case PT_LINETO: + case (PT_LINETO | PT_CLOSEFIGURE): + DPRINT("Got PT_LINETO (%ld, %ld)\n", + pPath->pPoints[i].x, pPath->pPoints[i].y); + pLinePts[nLinePts++] = pPath->pPoints[i]; + break; + case PT_BEZIERTO: + DPRINT("Got PT_BEZIERTO\n"); + if(pPath->pFlags[i+1] != PT_BEZIERTO || + (pPath->pFlags[i+2] & ~PT_CLOSEFIGURE) != PT_BEZIERTO) + { + DPRINT1("Path didn't contain 3 successive PT_BEZIERTOs\n"); + ret = FALSE; + goto end; + } + else + { + INT nBzrPts, nMinAlloc; + POINT *pBzrPts = GDI_Bezier(&pPath->pPoints[i-1], 4, &nBzrPts); + /* Make sure we have allocated enough memory for the lines of + * this bezier and the rest of the path, assuming we won't get + * another one (since we won't reallocate again then). */ + nMinAlloc = nLinePts + (pPath->numEntriesUsed - i) + nBzrPts; + if(nAlloc < nMinAlloc) + { + // Reallocate memory + + POINT *Realloc = NULL; + nAlloc = nMinAlloc * 2; + + Realloc = ExAllocatePoolWithTag(PagedPool, + nAlloc * sizeof(POINT), + TAG_PATH); + + if(!Realloc) + { + DPRINT1("Can't allocate pool!\n"); + goto end; + } + + RtlCopyMemory(Realloc, pLinePts, nLinePts*sizeof(POINT)); + ExFreePool(pLinePts); + pLinePts = Realloc; + } + RtlCopyMemory(&pLinePts[nLinePts], &pBzrPts[1], (nBzrPts - 1) * sizeof(POINT)); + nLinePts += nBzrPts - 1; + ExFreePool(pBzrPts); + i += 2; + } + break; + default: + DPRINT1("Got path flag %d (not supported)\n", (INT)pPath->pFlags[i]); + goto end; + } + + if(pPath->pFlags[i] & PT_CLOSEFIGURE) + { + pLinePts[nLinePts++] = pLinePts[0]; + } + }//for + + if(nLinePts >= 2) + IntGdiPolyline(dc, pLinePts, nLinePts); + + ret = TRUE; + +end: + if(pLinePts)ExFreePool(pLinePts); + + /* Restore the old mapping mode */ + dc->w.MapMode = mapMode; + dc->wndExtX = szWindowExt.cx; + dc->wndExtY = szWindowExt.cy; + dc->wndOrgX = ptWindowOrg.x; + dc->wndOrgY = ptWindowOrg.y; + + dc->vportExtX = szViewportExt.cx; + dc->vportExtY = szViewportExt.cy; + dc->vportOrgX = ptViewportOrg.x; + dc->vportOrgY = ptViewportOrg.y; + + /* Restore the world transform */ + dc->w.xformWorld2Wnd = xform; + + /* If we've moved the current point then get its new position + which will be in device (MM_TEXT) co-ords, convert it to + logical co-ords and re-set it. This basically updates + dc->CurPosX|Y so that their values are in the correct mapping + mode. + */ + if(i > 0) + { + POINT pt; + IntGetCurrentPositionEx(dc, &pt); + IntDPtoLP(dc, &pt, 1); + IntGdiMoveToEx(dc, pt.x, pt.y, NULL); + } + + DPRINT("Leave %s, ret=%d\n", __FUNCTION__, ret); + return ret; +} + /* EOF */
18 years, 3 months
1
0
0
0
[tretiakov] 24255: More prototypes
by tretiakov@svn.reactos.org
Author: tretiakov Date: Sun Sep 24 21:01:46 2006 New Revision: 24255 URL:
http://svn.reactos.org/svn/reactos?rev=24255&view=rev
Log: More prototypes Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h Sun Sep 24 21:01:46 2006 @@ -188,6 +188,11 @@ VOID FASTCALL DC_UpdateXforms(PDC dc); BOOL FASTCALL DC_InvertXform(const XFORM *xformSrc, XFORM *xformDest); +VOID FASTCALL IntGetViewportExtEx(PDC dc, LPSIZE pt); +VOID FASTCALL IntGetViewportOrgEx(PDC dc, LPPOINT pt); +VOID FASTCALL IntGetWindowExtEx(PDC dc, LPSIZE pt); +VOID FASTCALL IntGetWindowOrgEx(PDC dc, LPPOINT pt); + /* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs 15/9-2006*/ typedef struct { @@ -195,5 +200,4 @@ BOOL on_disk; /* true if metafile is on disk */ } DD_ENHMETAFILEOBJ, *PDD_ENHMETAFILEOBJ; - -#endif +#endif /* __WIN32K_DC_H */
18 years, 3 months
1
0
0
0
[greatlrd] 23924: update it.rc languages translation by gabrielilardi at hotmail.it (Gabriel ilardi)
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Sep 6 00:46:24 2006 New Revision: 23924 URL:
http://svn.reactos.org/svn/reactos?rev=23924&view=rev
Log: update it.rc languages translation by gabrielilardi at hotmail.it (Gabriel ilardi) Modified: trunk/reactos/base/applications/calc/lang/It.rc Modified: trunk/reactos/base/applications/calc/lang/It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
============================================================================== --- trunk/reactos/base/applications/calc/lang/It.rc (original) +++ trunk/reactos/base/applications/calc/lang/It.rc Wed Sep 6 00:46:24 2006 @@ -1,7 +1,7 @@ /* * WineCalc (It.rc) * - * Copyright 2003 James Briggs + * Copyright 2006 Gabriel ilardi * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,9 +26,9 @@ STRINGTABLE DISCARDABLE { - IDS_APPNAME, "Calculator" + IDS_APPNAME, "Calcolatrice" - IDS_COPYRIGHT1, "Calculator 5.0. Licensed under LGPL 2" + IDS_COPYRIGHT1, "Calcolatrice 5.0. sotto licenza LGPL 2" IDS_COPYRIGHT2 "Copyright 2003, James Briggs" IDS_COPYRIGHT3 "San Jose, California, USA" IDS_COPYRIGHT4 "james(a)ActionMessage.com" @@ -43,84 +43,84 @@ IDS_BTN_MEM_PLUS, "M+" IDS_BTN_MEM_STATUS_M, "M" IDS_BTN_SQRT, "sqrt" - IDS_ERR_INVALID_INPUT, "Invalid input for function." - IDS_ERR_DIVIDE_BY_ZERO, "Cannot divide by zero." - IDS_ERR_UNDEFINED, "Result of function is undefined." + IDS_ERR_INVALID_INPUT, "Input invalido per la funzione." + IDS_ERR_DIVIDE_BY_ZERO, "Non si può dividere per zero." + IDS_ERR_UNDEFINED, "Il risultato della funzione è indefinito." } MAIN_MENU MENU DISCARDABLE { - POPUP "&Edit" { - MENUITEM "&Copy Ctrl+C", IDM_COPY - MENUITEM "&Paste Ctrl+V", IDM_PASTE + POPUP "&Modifica" { + MENUITEM "&Copia Ctrl+C", IDM_COPY + MENUITEM "I&ncolla Ctrl+V", IDM_PASTE } - POPUP "&View" { + POPUP "&Visualizza" { MENUITEM "Standard", IDM_MODE_STANDARD - MENUITEM "Scientific", IDM_MODE_SCIENTIFIC + MENUITEM "Scientifica", IDM_MODE_SCIENTIFIC MENUITEM SEPARATOR - MENUITEM "Digit Grouping", IDM_DIGIT_GROUPING + MENUITEM "Raggruppamento cifre", IDM_DIGIT_GROUPING } - POPUP "&Help" { - MENUITEM "Help Topics", IDM_HELP_TOPICS + POPUP "&?" { + MENUITEM "Guida in linea", IDM_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "About Calculator", IDM_ABOUT + MENUITEM "Informazioni su Calcolatrice", IDM_ABOUT } } SCIMS_MENU MENU DISCARDABLE { - POPUP "&Edit" { - MENUITEM "&Copy Ctrl+C", IDM_COPY - MENUITEM "&Paste Ctrl+V", IDM_PASTE + POPUP "&Modifica" { + MENUITEM "&Copia Ctrl+C", IDM_COPY + MENUITEM "I&ncolla Ctrl+V", IDM_PASTE } - POPUP "&View" { + POPUP "&Visualizza" { MENUITEM "Standard", IDM_MODE_STANDARD - MENUITEM "Scientific", IDM_MODE_SCIENTIFIC + MENUITEM "Scientifica", IDM_MODE_SCIENTIFIC MENUITEM SEPARATOR MENUITEM "Hex\tF5", ID_CALC_NS_HEX - MENUITEM "Decimal\tF6", ID_CALC_NS_DEC - MENUITEM "Octal\tF7", ID_CALC_NS_OCT - MENUITEM "Binary\tF8", ID_CALC_NS_BIN + MENUITEM "Dec\tF6", ID_CALC_NS_DEC + MENUITEM "Oct\tF7", ID_CALC_NS_OCT + MENUITEM "Bin\tF8", ID_CALC_NS_BIN MENUITEM SEPARATOR - MENUITEM "Degrees\tF2", ID_CALC_MS_DEGREES - MENUITEM "Radians\tF3", ID_CALC_MS_RADIANS - MENUITEM "Grads\tF4", ID_CALC_MS_GRADS + MENUITEM "Gradi\tF2", ID_CALC_MS_DEGREES + MENUITEM "Radianti\tF3", ID_CALC_MS_RADIANS + MENUITEM "Gradienti\tF4", ID_CALC_MS_GRADS MENUITEM SEPARATOR - MENUITEM "Digit Grouping", IDM_DIGIT_GROUPING + MENUITEM "Raggruppamento cifre", IDM_DIGIT_GROUPING } - POPUP "&Help" { - MENUITEM "Help Topics", IDM_HELP_TOPICS + POPUP "&?" { + MENUITEM "Guida in linea", IDM_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "About Calculator", IDM_ABOUT + MENUITEM "Informazioni su calcolatrice", IDM_ABOUT } } SCIWS_MENU MENU DISCARDABLE { - POPUP "&Edit" { - MENUITEM "&Copy Ctrl+C", IDM_COPY - MENUITEM "&Paste Ctrl+V", IDM_PASTE + POPUP "&Modifica" { + MENUITEM "&Copia Ctrl+C", IDM_COPY + MENUITEM "I&ncolla Ctrl+V", IDM_PASTE } - POPUP "&View" { + POPUP "&Visualizza" { MENUITEM "Standard", IDM_MODE_STANDARD - MENUITEM "Scientific", IDM_MODE_SCIENTIFIC + MENUITEM "Scientifica", IDM_MODE_SCIENTIFIC MENUITEM SEPARATOR MENUITEM "Hex\tF5", ID_CALC_NS_HEX - MENUITEM "Decimal\tF6", ID_CALC_NS_DEC - MENUITEM "Octal\tF7", ID_CALC_NS_OCT - MENUITEM "Binary\tF8", ID_CALC_NS_BIN + MENUITEM "Dec\tF6", ID_CALC_NS_DEC + MENUITEM "Oct\tF7", ID_CALC_NS_OCT + MENUITEM "Bin\tF8", ID_CALC_NS_BIN MENUITEM SEPARATOR MENUITEM "Qword\tF12", ID_CALC_WS_QWORD MENUITEM "Dword\tF2", ID_CALC_WS_DWORD MENUITEM "Word\tF3", ID_CALC_WS_WORD MENUITEM "Byte\tF4", ID_CALC_WS_BYTE MENUITEM SEPARATOR - MENUITEM "Digit Grouping", IDM_DIGIT_GROUPING + MENUITEM "Raggruppamento cifre", IDM_DIGIT_GROUPING } - POPUP "&Help" { - MENUITEM "Help Topics", IDM_HELP_TOPICS + POPUP "&?" { + MENUITEM "Guida in linea", IDM_HELP_TOPICS MENUITEM SEPARATOR - MENUITEM "About Calculator", IDM_ABOUT + MENUITEM "Informazioni su calcolatrice", IDM_ABOUT } } @@ -132,19 +132,19 @@ WHATS_THIS_MENU MENU DISCARDABLE { POPUP "" { - MENUITEM "What's This?", IDM_WHATS_THIS + MENUITEM "?", IDM_WHATS_THIS } } DLG_ABOUT DIALOG 12,0,120,82 -CAPTION "About GNU winecalc" +CAPTION "Informazioni su GNU winecalc" STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU BEGIN DEFPUSHBUTTON "OK", IDOK, 42, 60, 30, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END DLG_STATS DIALOG 12,0,125,78 -CAPTION "Statistics Box" +CAPTION "Statistiche" FONT 9, "Tahoma" STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE BEGIN
18 years, 3 months
1
0
0
0
[tretiakov] 23923: Call NtUserDrawCaption directly
by tretiakov@svn.reactos.org
Author: tretiakov Date: Tue Sep 5 20:28:20 2006 New Revision: 23923 URL:
http://svn.reactos.org/svn/reactos?rev=23923&view=rev
Log: Call NtUserDrawCaption directly Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/n…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/nonclient.c (original) +++ trunk/reactos/dll/win32/user32/windows/nonclient.c Tue Sep 5 20:28:20 2006 @@ -410,7 +410,7 @@ CurrentRect.top += GetSystemMetrics(SM_CYCAPTION); } - DrawCaption(hWnd, hDC, &TempRect, CaptionFlags); + NtUserDrawCaption(hWnd, hDC, &TempRect, CaptionFlags); /* Draw buttons */ if (Style & WS_SYSMENU)
18 years, 3 months
1
0
0
0
[janderwald] 23922: * msvc compiling fix
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Sep 5 14:14:40 2006 New Revision: 23922 URL:
http://svn.reactos.org/svn/reactos?rev=23922&view=rev
Log: * msvc compiling fix Modified: trunk/reactos/dll/cpl/desk/background.c Modified: trunk/reactos/dll/cpl/desk/background.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
============================================================================== --- trunk/reactos/dll/cpl/desk/background.c (original) +++ trunk/reactos/dll/cpl/desk/background.c Tue Sep 5 14:14:40 2006 @@ -307,6 +307,7 @@ /* Load custom colors from Registry */ HKEY hKey = NULL; LONG res = ERROR_SUCCESS; + CHOOSECOLOR cc; res = RegCreateKeyEx( HKEY_CURRENT_USER, TEXT("Control Panel\\Appearance"), 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL ); /* Now the key is either created or opened existing, if res == ERROR_SUCCESS */ @@ -322,7 +323,7 @@ } /* Launch ChooseColor() dialog */ - CHOOSECOLOR cc; + cc.lStructSize = sizeof(CHOOSECOLOR); cc.hwndOwner = g_hBackgroundPage; cc.hInstance = NULL; @@ -361,10 +362,11 @@ /* ListView_FindItem() Macro: Searches for a list-view item with the specified * * characteristics. Returns the index of the item if successful, or -1 otherwise */ LVFINDINFO lvfi; + int retVal; lvfi.flags = LVFI_STRING; /* search item by EXACT string */ lvfi.psz = tszFileName; /* string to search */ /* other items of this structure are not valid, besacuse flags are not set. */ - int retVal = ListView_FindItem( hWndList, -1, &lvfi ); + retVal = ListView_FindItem( hWndList, -1, &lvfi ); if( retVal != -1 ) return TRUE; /* item found! */ return FALSE; /* item not found. */ } @@ -603,12 +605,17 @@ { /* Change system color */ INT iElement = COLOR_BACKGROUND; + HKEY hKey; + LONG result; + TCHAR clText[16]; + DWORD red, green, blue; + if( !SetSysColors( 1, &iElement, &g_backgroundDesktopColor ) ) MessageBox( g_hBackgroundPage, TEXT("SetSysColor() failed!"), /* these error texts can need internationalization? */ TEXT("Error!"), MB_ICONSTOP ); /* Write color to registry key: HKEY_CURRENT_USER\Control Panel\Colors\Background */ - HKEY hKey = NULL; - LONG result = ERROR_SUCCESS; + hKey = NULL; + result = ERROR_SUCCESS; result = RegOpenKeyEx( HKEY_CURRENT_USER, TEXT("Control Panel\\Colors"), 0, KEY_WRITE, &hKey ); if( result != ERROR_SUCCESS ) { @@ -619,11 +626,10 @@ /* On error result will not contain ERROR_SUCCESS. I don't know how to handle */ /* this case :( */ } - TCHAR clText[16] = {0}; - DWORD red = GetRValue( g_backgroundDesktopColor ); - DWORD green = GetGValue( g_backgroundDesktopColor ); - DWORD blue = GetBValue( g_backgroundDesktopColor ); - wsprintf( clText, TEXT("%d %d %d"), red, green, blue ); /* format string to be set to registry */ + red = GetRValue( g_backgroundDesktopColor ); + green = GetGValue( g_backgroundDesktopColor ); + blue = GetBValue( g_backgroundDesktopColor ); + _stprintf( clText, TEXT("%d %d %d"), red, green, blue ); /* format string to be set to registry */ RegSetValueEx( hKey, TEXT("Background"), 0, REG_SZ, (BYTE *)clText, lstrlen( clText )*sizeof(TCHAR) + sizeof(TCHAR) ); RegCloseKey( hKey ); }
18 years, 3 months
1
0
0
0
[turner] 23921: Implement CryptSignHashW based WINE and old CryptSignHashA. Change CryptSignHashA to call CryptSignHashW.
by turner@svn.reactos.org
Author: turner Date: Tue Sep 5 02:51:28 2006 New Revision: 23921 URL:
http://svn.reactos.org/svn/reactos?rev=23921&view=rev
Log: Implement CryptSignHashW based WINE and old CryptSignHashA. Change CryptSignHashA to call CryptSignHashW. Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/c…
============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.c (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c Tue Sep 5 02:51:28 2006 @@ -1607,24 +1607,33 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen) { + /* Since sDescription is ignored we dont need to convert it, we just pass null */ + return CryptSignHashW(hHash, dwKeySpec, NULL, dwFlags, pbSignature, pdwSigLen); +} + +BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription, + DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen) +{ PCRYPTHASH hash = (PCRYPTHASH)hHash; PCRYPTPROV prov; DPRINT("(0x%lx, %ld, %08ld, %p, %p)\n", hHash, dwKeySpec, dwFlags, pbSignature, pdwSigLen); if (sDescription) { + /*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/…
*/ DPRINT("The sDescription parameter is not supported (and no longer used). Ignoring.\n"); } if (!hash) CRYPT_ReturnLastError(ERROR_INVALID_HANDLE); - if (!pdwSigLen) + if (!pdwSigLen || !hash->pProvider) CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER); prov = hash->pProvider; return prov->pFuncs->pCPSignHash(prov->hPrivate, hash->hPrivate, dwKeySpec, NULL, dwFlags, pbSignature, pdwSigLen); } + /****************************************************************************** * CryptSetHashParam (ADVAPI32.@)
18 years, 3 months
1
0
0
0
[hpoussin] 23920: Allow allow lower case when being called
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Sep 5 02:16:43 2006 New Revision: 23920 URL:
http://svn.reactos.org/svn/reactos?rev=23920&view=rev
Log: Allow allow lower case when being called Modified: trunk/reactos/dll/win32/fmifs/format.c Modified: trunk/reactos/dll/win32/fmifs/format.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fmifs/format.c?r…
============================================================================== --- trunk/reactos/dll/win32/fmifs/format.c (original) +++ trunk/reactos/dll/win32/fmifs/format.c Tue Sep 5 02:16:43 2006 @@ -50,7 +50,7 @@ #if 1 DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n"); - swprintf(VolumeName, L"\\\\.\\%c:", DriveRoot[0]); + swprintf(VolumeName, L"\\??\\%c:", towupper(DriveRoot[0])); RtlCreateUnicodeString(&usDriveRoot, VolumeName); /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */ #else
18 years, 3 months
1
0
0
0
[hpoussin] 23919: Add a hack to enable formatting (was broken since at least r20156)
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Sep 5 01:58:38 2006 New Revision: 23919 URL:
http://svn.reactos.org/svn/reactos?rev=23919&view=rev
Log: Add a hack to enable formatting (was broken since at least r20156) Modified: trunk/reactos/dll/win32/fmifs/format.c Modified: trunk/reactos/dll/win32/fmifs/format.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fmifs/format.c?r…
============================================================================== --- trunk/reactos/dll/win32/fmifs/format.c (original) +++ trunk/reactos/dll/win32/fmifs/format.c Tue Sep 5 01:58:38 2006 @@ -35,7 +35,7 @@ UNICODE_STRING usLabel; BOOLEAN Argument = FALSE; WCHAR VolumeName[MAX_PATH]; - CURDIR CurDir; + //CURDIR CurDir; Provider = GetProvider(Format); if (!Provider) @@ -48,6 +48,12 @@ return; } +#if 1 + DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n"); + swprintf(VolumeName, L"\\\\.\\%c:", DriveRoot[0]); + RtlCreateUnicodeString(&usDriveRoot, VolumeName); + /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */ +#else if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH) || !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir)) { @@ -58,10 +64,11 @@ &Argument); /* Argument */ return; } +#endif RtlInitUnicodeString(&usLabel, Label); - DPRINT1("FormatEx - %S\n", Format); + DPRINT("FormatEx - %S\n", Format); Provider->FormatEx( &usDriveRoot, MediaFlag,
18 years, 3 months
1
0
0
0
[janderwald] 23918: * use ConsoleInfo struct directly * change type in global struct (avoid buffer overflow when reading value from registry)
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Sep 5 01:26:49 2006 New Revision: 23918 URL:
http://svn.reactos.org/svn/reactos?rev=23918&view=rev
Log: * use ConsoleInfo struct directly * change type in global struct (avoid buffer overflow when reading value from registry) Modified: trunk/reactos/dll/win32/console/console.c trunk/reactos/dll/win32/console/console.h Modified: trunk/reactos/dll/win32/console/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/console/console.…
============================================================================== --- trunk/reactos/dll/win32/console/console.c (original) +++ trunk/reactos/dll/win32/console/console.c Tue Sep 5 01:26:49 2006 @@ -192,14 +192,14 @@ else { /* use current info */ - PConsoleInfo pSharedInfo = MapViewOfFile((HANDLE)wParam, - FILE_MAP_ALL_ACCESS, - 0, - 0, - sizeof(ConsoleInfo)); - - /* copy options */ - if (pSharedInfo) + PConsoleInfo pSharedInfo = (PConsoleInfo)wParam; + + if (IsBadReadPtr((const void *)pSharedInfo, sizeof(ConsoleInfo))) + { + /* use defaults */ + InitConsoleDefaults(pConInfo); + } + else { pConInfo->InsertMode = pSharedInfo->InsertMode; pConInfo->HistoryBufferSize = pSharedInfo->HistoryBufferSize; @@ -255,8 +255,6 @@ LPARAM lParam1, LPARAM lParam2) { - int i = (int)lParam1; - switch(uMsg) { case CPL_INIT: @@ -270,14 +268,14 @@ case CPL_INQUIRE: { CPLINFO *CPlInfo = (CPLINFO*)lParam2; - CPlInfo->idIcon = Applets[i].idIcon; - CPlInfo->idName = Applets[i].idName; - CPlInfo->idInfo = Applets[i].idDescription; + CPlInfo->idIcon = Applets[0].idIcon; + CPlInfo->idName = Applets[0].idName; + CPlInfo->idInfo = Applets[0].idDescription; break; } case CPL_DBLCLK: { - Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2); + Applets[0].AppletProc(hwndCPl, uMsg, lParam1, lParam2); break; } } Modified: trunk/reactos/dll/win32/console/console.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/console/console.…
============================================================================== --- trunk/reactos/dll/win32/console/console.h (original) +++ trunk/reactos/dll/win32/console/console.h Tue Sep 5 01:26:49 2006 @@ -25,7 +25,7 @@ HWND hConsoleWindow; TCHAR szProcessName[MAX_PATH]; BOOLEAN AppliedConfig; - BOOLEAN UseRasterFonts; + DWORD UseRasterFonts; DWORD FontSize; DWORD FontWeight; FONTSIGNATURE FontSignature;
18 years, 3 months
1
0
0
0
[hpoussin] 23917: Add ufat.dll, to be able to format drives to FAT and FAT32 format
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Sep 5 00:55:39 2006 New Revision: 23917 URL:
http://svn.reactos.org/svn/reactos?rev=23917&view=rev
Log: Add ufat.dll, to be able to format drives to FAT and FAT32 format Added: trunk/reactos/dll/win32/ufat/ (with props) trunk/reactos/dll/win32/ufat/ufat.def (with props) trunk/reactos/dll/win32/ufat/ufat.rbuild (with props) trunk/reactos/dll/win32/ufat/ufat.rc (with props) Modified: trunk/reactos/dll/win32/fmifs/fmifs.rbuild trunk/reactos/dll/win32/fmifs/init.c trunk/reactos/dll/win32/win32.rbuild Modified: trunk/reactos/dll/win32/fmifs/fmifs.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fmifs/fmifs.rbui…
============================================================================== --- trunk/reactos/dll/win32/fmifs/fmifs.rbuild (original) +++ trunk/reactos/dll/win32/fmifs/fmifs.rbuild Tue Sep 5 00:55:39 2006 @@ -1,4 +1,4 @@ -<module name="fmifs" type="win32dll" entrypoint="_InitializeFmIfs@12" baseaddress="${BASEADDRESS_FMIFS}" installbase="system32" installname="fmifs.dll"> +<module name="fmifs" type="win32dll" entrypoint="InitializeFmIfs@12" baseaddress="${BASEADDRESS_FMIFS}" installbase="system32" installname="fmifs.dll"> <importlibrary definition="fmifs.def" /> <include base="fmifs">.</include> <define name="_DISABLE_TIDENTS" /> Modified: trunk/reactos/dll/win32/fmifs/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fmifs/init.c?rev…
============================================================================== --- trunk/reactos/dll/win32/fmifs/init.c (original) +++ trunk/reactos/dll/win32/fmifs/init.c Tue Sep 5 00:55:39 2006 @@ -21,10 +21,10 @@ PIFS_PROVIDER Provider; ListEntry = ProviderListHead.Flink; - while (ListEntry != ProviderListHead.Flink) + while (ListEntry != &ProviderListHead) { Provider = CONTAINING_RECORD(ListEntry, IFS_PROVIDER, ListEntry); - if (wcscmp(Provider->Name, FileSystem) == 0) + if (_wcsicmp(Provider->Name, FileSystem) == 0) return Provider; ListEntry = ListEntry->Flink; } Propchange: trunk/reactos/dll/win32/ufat/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Sep 5 00:55:39 2006 @@ -1,0 +1,3 @@ +*.bak +GNUmakefile +*.vcproj Added: trunk/reactos/dll/win32/ufat/ufat.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ufat/ufat.def?re…
============================================================================== --- trunk/reactos/dll/win32/ufat/ufat.def (added) +++ trunk/reactos/dll/win32/ufat/ufat.def Tue Sep 5 00:55:39 2006 @@ -1,0 +1,3 @@ +LIBRARY UFAT.DLL +EXPORTS +FormatEx=VfatFormat@24 Propchange: trunk/reactos/dll/win32/ufat/ufat.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/ufat/ufat.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ufat/ufat.rbuild…
============================================================================== --- trunk/reactos/dll/win32/ufat/ufat.rbuild (added) +++ trunk/reactos/dll/win32/ufat/ufat.rbuild Tue Sep 5 00:55:39 2006 @@ -1,0 +1,10 @@ +<module name="ufat" type="win32dll" baseaddress="${BASEADDRESS_UFAT}" installbase="system32" installname="ufat.dll"> + <importlibrary definition="ufat.def" /> + <include base="ufat">.</include> + <define name="_DISABLE_TIDENTS" /> + <define name="__USE_W32API" /> + <define name="_WIN32_WINNT">0x0600</define> + <library>vfatlib</library> + <library>ntdll</library> + <file>ufat.rc</file> +</module> Propchange: trunk/reactos/dll/win32/ufat/ufat.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/ufat/ufat.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ufat/ufat.rc?rev…
============================================================================== --- trunk/reactos/dll/win32/ufat/ufat.rc (added) +++ trunk/reactos/dll/win32/ufat/ufat.rc Tue Sep 5 00:55:39 2006 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "FAT File System Management\0" +#define REACTOS_STR_INTERNAL_NAME "ufat\0" +#define REACTOS_STR_ORIGINAL_FILENAME "ufat.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/win32/ufat/ufat.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
============================================================================== --- trunk/reactos/dll/win32/win32.rbuild (original) +++ trunk/reactos/dll/win32/win32.rbuild Tue Sep 5 00:55:39 2006 @@ -226,6 +226,9 @@ <directory name="twain_32"> <xi:include href="twain_32/twain_32.rbuild" /> </directory> +<directory name="ufat"> + <xi:include href="ufat/ufat.rbuild" /> +</directory> <directory name="urlmon"> <xi:include href="urlmon/urlmon.rbuild" /> </directory>
18 years, 3 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200