Commit aa90a596 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Build with msvcrt.

parent 60ef5b01
......@@ -6,6 +6,8 @@ EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS)
EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS)
DELAYIMPORTS = usp10 setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
bidi.c \
bitblt.c \
......
......@@ -41,8 +41,6 @@
* has been modified.
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
......
......@@ -18,14 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <limits.h>
#include <math.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#include "windef.h"
#include "winbase.h"
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <string.h>
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
......@@ -28,10 +26,10 @@
#include "winbase.h"
#include "wingdi.h"
#include "winreg.h"
#include "winnls.h"
#include "winternl.h"
#include "winerror.h"
#include "gdi_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dc);
......@@ -641,7 +639,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
ERR( "no device found for %s\n", debugstr_w(device) );
return 0;
}
strcpyW(buf, driver);
lstrcpyW(buf, driver);
}
if (!(funcs = DRIVER_load_driver( buf )))
......@@ -701,7 +699,7 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
if (initData)
{
/* don't convert initData for DISPLAY driver, it's not used */
if (!driverW.Buffer || strcmpiW( driverW.Buffer, displayW ))
if (!driverW.Buffer || wcsicmp( driverW.Buffer, displayW ))
initDataW = GdiConvertToDevmodeW(initData);
}
......
......@@ -59,8 +59,6 @@
Search for "Bitmap Structures" in MSDN
*/
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -22,7 +22,6 @@
#include "gdi_private.h"
#include "dibdrv.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dib);
......@@ -535,9 +534,9 @@ static DWORD font_cache_hash( struct cached_font *font )
two_chars = *ptr;
pwc = (WCHAR *)&two_chars;
if (!*pwc) break;
*pwc = toupperW(*pwc);
*pwc = towupper(*pwc);
pwc++;
*pwc = toupperW(*pwc);
*pwc = towupper(*pwc);
hash ^= two_chars;
if (!*pwc) break;
}
......@@ -550,7 +549,7 @@ static int font_cache_cmp( const struct cached_font *p1, const struct cached_fon
if (!ret) ret = p1->aa_flags - p2->aa_flags;
if (!ret) ret = memcmp( &p1->xform, &p2->xform, sizeof(p1->xform) );
if (!ret) ret = memcmp( &p1->lf, &p2->lf, FIELD_OFFSET( LOGFONTW, lfFaceName ));
if (!ret) ret = strcmpiW( p1->lf.lfFaceName, p2->lf.lfFaceName );
if (!ret) ret = wcsicmp( p1->lf.lfFaceName, p2->lf.lfFaceName );
return ret;
}
......
......@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <stdarg.h>
#include <string.h>
......@@ -42,7 +39,6 @@
#include "ddk/d3dkmthk.h"
#include "gdi_private.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/heap.h"
......@@ -146,17 +142,17 @@ static BOOL is_display_device( LPCWSTR name )
static const WCHAR display_deviceW[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y'};
const WCHAR *p = name;
if (strncmpiW( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) ))
if (wcsnicmp( name, display_deviceW, sizeof(display_deviceW) / sizeof(WCHAR) ))
return FALSE;
p += sizeof(display_deviceW) / sizeof(WCHAR);
if (!isdigitW( *p++ ))
if (!iswdigit( *p++ ))
return FALSE;
for (; *p; p++)
{
if (!isdigitW( *p ))
if (!iswdigit( *p ))
return FALSE;
}
......@@ -188,7 +184,7 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name )
static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
/* display driver is a special case */
if (!strcmpiW( name, displayW ) || is_display_device( name )) return get_display_driver();
if (!wcsicmp( name, displayW ) || is_display_device( name )) return get_display_driver();
if ((module = GetModuleHandleW( name )))
{
......@@ -542,7 +538,7 @@ static INT CDECL nulldrv_GetTextFace( PHYSDEV dev, INT size, LPWSTR name )
if (GetObjectW( dc->hFont, sizeof(font), &font ))
{
ret = strlenW( font.lfFaceName ) + 1;
ret = lstrlenW( font.lfFaceName ) + 1;
if (name)
{
lstrcpynW( name, font.lfFaceName, size );
......@@ -946,7 +942,7 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size )
WCHAR *p;
/* display is a special case */
if (!strcmpiW( device, displayW ) ||
if (!wcsicmp( device, displayW ) ||
is_display_device( device ))
{
lstrcpynW( driver, displayW, size );
......@@ -958,7 +954,7 @@ BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size )
WARN("Unable to find %s in [devices] section of win.ini\n", debugstr_w(device));
return FALSE;
}
p = strchrW(driver, ',');
p = wcschr(driver, ',');
if(!p)
{
WARN("%s entry in [devices] section of win.ini is malformed.\n", debugstr_w(device));
......@@ -1399,10 +1395,10 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI
return STATUS_UNSUCCESSFUL;
TRACE("DeviceName: %s\n", wine_dbgstr_w( desc->DeviceName ));
if (strncmpiW( desc->DeviceName, displayW, ARRAY_SIZE(displayW) ))
if (wcsnicmp( desc->DeviceName, displayW, ARRAY_SIZE(displayW) ))
return STATUS_UNSUCCESSFUL;
index = strtolW( desc->DeviceName + ARRAY_SIZE(displayW), &end, 10 ) - 1;
index = wcstol( desc->DeviceName + ARRAY_SIZE(displayW), &end, 10 ) - 1;
if (*end)
return STATUS_UNSUCCESSFUL;
......@@ -1414,7 +1410,7 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI
mutex = get_display_device_init_mutex();
size = sizeof( bufferW );
sprintfW( key_nameW, video_value_fmtW, index );
swprintf( key_nameW, MAX_PATH, video_value_fmtW, index );
if (RegGetValueW( HKEY_LOCAL_MACHINE, video_keyW, key_nameW, RRF_RT_REG_SZ, NULL, bufferW, &size ))
goto done;
......
......@@ -31,9 +31,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
......
......@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <string.h>
......@@ -33,7 +31,6 @@
#include "gdi_private.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(icm);
......
......@@ -45,8 +45,6 @@
* HDMD - 14/4/1999
*/
#include "config.h"
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
......
......@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -21,17 +21,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#if defined(HAVE_FLOAT_H)
#include <float.h>
#endif
#include "windef.h"
#include "winbase.h"
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include "gdi_private.h"
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment