wineps.drv: Don't cast away 'const' from DEVMODE provided as input.
This commit is contained in:
parent
a3c832593c
commit
d7687bed6a
|
@ -45,7 +45,7 @@ static inline int paper_size_from_points( float size )
|
|||
return size * 254 / 72;
|
||||
}
|
||||
|
||||
INPUTSLOT *find_slot( PPD *ppd, PSDRV_DEVMODE *dm )
|
||||
INPUTSLOT *find_slot( PPD *ppd, const PSDRV_DEVMODE *dm )
|
||||
{
|
||||
INPUTSLOT *slot;
|
||||
|
||||
|
@ -56,7 +56,7 @@ INPUTSLOT *find_slot( PPD *ppd, PSDRV_DEVMODE *dm )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PAGESIZE *find_pagesize( PPD *ppd, PSDRV_DEVMODE *dm )
|
||||
PAGESIZE *find_pagesize( PPD *ppd, const PSDRV_DEVMODE *dm )
|
||||
{
|
||||
PAGESIZE *page;
|
||||
|
||||
|
@ -67,7 +67,7 @@ PAGESIZE *find_pagesize( PPD *ppd, PSDRV_DEVMODE *dm )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
DUPLEX *find_duplex( PPD *ppd, PSDRV_DEVMODE *dm )
|
||||
DUPLEX *find_duplex( PPD *ppd, const PSDRV_DEVMODE *dm )
|
||||
{
|
||||
DUPLEX *duplex;
|
||||
WORD win_duplex = dm->dmPublic.dmFields & DM_DUPLEX ? dm->dmPublic.dmDuplex : 0;
|
||||
|
@ -88,7 +88,7 @@ DUPLEX *find_duplex( PPD *ppd, PSDRV_DEVMODE *dm )
|
|||
* Updates dm1 with some fields from dm2
|
||||
*
|
||||
*/
|
||||
void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, PSDRV_DEVMODE *dm2, PRINTERINFO *pi )
|
||||
void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2, PRINTERINFO *pi )
|
||||
{
|
||||
/* some sanity checks here on dm2 */
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ static BOOL PSDRV_CreateDC( PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
|
|||
if (output && *output) physDev->job.output = strdupW( output );
|
||||
|
||||
if(initData)
|
||||
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODE *)initData, pi);
|
||||
PSDRV_MergeDevmodes(physDev->Devmode, (const PSDRV_DEVMODE *)initData, pi);
|
||||
|
||||
PSDRV_UpdateDevCaps(physDev);
|
||||
SelectObject( (*pdev)->hdc, PSDRV_DefaultFont );
|
||||
|
@ -379,7 +379,7 @@ static HDC PSDRV_ResetDC( PHYSDEV dev, const DEVMODEW *lpInitData )
|
|||
|
||||
if (lpInitData)
|
||||
{
|
||||
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODE *)lpInitData, physDev->pi);
|
||||
PSDRV_MergeDevmodes(physDev->Devmode, (const PSDRV_DEVMODE *)lpInitData, physDev->pi);
|
||||
PSDRV_UpdateDevCaps(physDev);
|
||||
}
|
||||
return dev->hdc;
|
||||
|
|
|
@ -409,9 +409,9 @@ extern HINSTANCE PSDRV_hInstance DECLSPEC_HIDDEN;
|
|||
extern HANDLE PSDRV_Heap DECLSPEC_HIDDEN;
|
||||
extern char *PSDRV_ANSIVector[256] DECLSPEC_HIDDEN;
|
||||
|
||||
extern INPUTSLOT *find_slot( PPD *ppd, PSDRV_DEVMODE *dm );
|
||||
extern PAGESIZE *find_pagesize( PPD *ppd, PSDRV_DEVMODE *dm );
|
||||
extern DUPLEX *find_duplex( PPD *ppd, PSDRV_DEVMODE *dm );
|
||||
extern INPUTSLOT *find_slot( PPD *ppd, const PSDRV_DEVMODE *dm );
|
||||
extern PAGESIZE *find_pagesize( PPD *ppd, const PSDRV_DEVMODE *dm );
|
||||
extern DUPLEX *find_duplex( PPD *ppd, const PSDRV_DEVMODE *dm );
|
||||
|
||||
/* GDI driver functions */
|
||||
extern BOOL PSDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
|
@ -462,7 +462,7 @@ extern INT PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) DECLSPEC_HIDDEN;
|
|||
extern BOOL PSDRV_StrokeAndFillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
extern BOOL PSDRV_StrokePath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern void PSDRV_MergeDevmodes(PSDRV_DEVMODE *dm1, PSDRV_DEVMODE *dm2,
|
||||
extern void PSDRV_MergeDevmodes(PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2,
|
||||
PRINTERINFO *pi) DECLSPEC_HIDDEN;
|
||||
extern BOOL PSDRV_GetFontMetrics(void) DECLSPEC_HIDDEN;
|
||||
extern PPD *PSDRV_ParsePPD(char *fname, HANDLE printer) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue