Added the minmax.h header (VC6).
Added support for NOMINMAX. Remove __min/__max from windef.h, they belong to (msvcrt/)stdlib.h.
This commit is contained in:
parent
b7175dfb05
commit
5653939481
|
@ -576,7 +576,7 @@ static void X11DRV_GetTextMetricsA_cp932( fontObject* pfo, LPTEXTMETRICA pTM )
|
||||||
if ( pfo_ansi != NULL )
|
if ( pfo_ansi != NULL )
|
||||||
{
|
{
|
||||||
pTM->tmAveCharWidth = floor((pfo_ansi->foAvgCharWidth * 2.0 + pfo->foAvgCharWidth) / 3.0 * pfo->rescale + 0.5);
|
pTM->tmAveCharWidth = floor((pfo_ansi->foAvgCharWidth * 2.0 + pfo->foAvgCharWidth) / 3.0 * pfo->rescale + 0.5);
|
||||||
pTM->tmMaxCharWidth = __max(pfo_ansi->foMaxCharWidth, pfo->foMaxCharWidth) * pfo->rescale;
|
pTM->tmMaxCharWidth = max(pfo_ansi->foMaxCharWidth, pfo->foMaxCharWidth) * pfo->rescale;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,7 @@ INSTALLED_INCLUDES = \
|
||||||
mapidefs.h \
|
mapidefs.h \
|
||||||
mciavi.h \
|
mciavi.h \
|
||||||
mcx.h \
|
mcx.h \
|
||||||
|
minmax.h \
|
||||||
mmreg.h \
|
mmreg.h \
|
||||||
mmsystem.h \
|
mmsystem.h \
|
||||||
msacm.h \
|
msacm.h \
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* min/max macros
|
||||||
|
*
|
||||||
|
* Copyright 2001 Francois Gouget
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_MINMAX_H
|
||||||
|
#define __WINE_MINMAX_H
|
||||||
|
|
||||||
|
#ifndef max
|
||||||
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
#ifndef min
|
||||||
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __WINE_MINMAX_H */
|
|
@ -140,16 +140,15 @@ typedef INT CALLBACK (*PROC)();
|
||||||
#define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
|
#define ADD_LOWORD(dw,val) ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* min and max macros */
|
/* min and max macros */
|
||||||
#define __max(a,b) (((a) > (b)) ? (a) : (b))
|
#ifndef NOMINMAX
|
||||||
#define __min(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#ifndef max
|
#ifndef max
|
||||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* NOMINMAX */
|
||||||
|
|
||||||
#ifndef _MAX_PATH
|
#ifndef _MAX_PATH
|
||||||
/* FIXME: These are supposed to be in stdlib.h only */
|
/* FIXME: These are supposed to be in stdlib.h only */
|
||||||
|
|
Loading…
Reference in New Issue