Author: fireball
Date: Sat Jul 31 22:39:22 2010
New Revision: 48388
URL: http://svn.reactos.org/svn/reactos?rev=48388&view=rev
Log:
[INCLUDE/WINE]
- Update Wine-specific headers to Wine-1.3.
- Remove unneeded 16 bit header, and add a bit of stuff into another legacy header.
- Indicate in config.h that there is a freetype library present.
Removed:
trunk/reactos/include/reactos/wine/winuser16.h
Modified:
trunk/reactos/include/reactos/wine/config.h
trunk/reactos/include/reactos/wine/test.h
trunk/reactos/include/reactos/wine/windef16.h
trunk/reactos/include/reactos/wine/wingdi16.h
Modified: trunk/reactos/include/reactos/wine/config.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/confi…
==============================================================================
--- trunk/reactos/include/reactos/wine/config.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/config.h [iso-8859-1] Sat Jul 31 22:39:22 2010
@@ -99,37 +99,43 @@
#define HAVE_FPCLASS 1
/* Define if FreeType 2 is installed */
-/* #undef HAVE_FREETYPE */
+#define HAVE_FREETYPE 1
/* Define to 1 if you have the <freetype/freetype.h> header file. */
-/* #undef HAVE_FREETYPE_FREETYPE_H */
+#define HAVE_FREETYPE_FREETYPE_H 1
/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
-/* #undef HAVE_FREETYPE_FTGLYPH_H */
+#define HAVE_FREETYPE_FTGLYPH_H 1
+
+/* Define to 1 if you have the <freetype/ftlcdfil.h> header file. */
+#define HAVE_FREETYPE_FTLCDFIL_H 1
+
+/* Define to 1 if you have the <freetype/ftmodapi.h> header file. */
+#define HAVE_FREETYPE_FTMODAPI_H 1
/* Define to 1 if you have the <freetype/ftnames.h> header file. */
/* #undef HAVE_FREETYPE_FTNAMES_H */
/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
-/* #undef HAVE_FREETYPE_FTOUTLN_H */
+#define HAVE_FREETYPE_FTOUTLN_H 1
/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
-/* #undef HAVE_FREETYPE_FTSNAMES_H */
+#define HAVE_FREETYPE_FTSNAMES_H 1
/* Define if you have the <freetype/fttrigon.h> header file. */
-/* #undef HAVE_FREETYPE_FTTRIGON_H */
+#define HAVE_FREETYPE_FTTRIGON_H 1
/* Define to 1 if you have the <freetype/ftwinfnt.h> header file. */
-/* #undef HAVE_FREETYPE_FTWINFNT_H */
+#define HAVE_FREETYPE_FTWINFNT_H 1
/* Define to 1 if you have the <freetype/internal/sfnt.h> header file. */
/* #undef HAVE_FREETYPE_INTERNAL_SFNT_H */
/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
-/* #undef HAVE_FREETYPE_TTNAMEID_H */
+#define HAVE_FREETYPE_TTNAMEID_H 1
/* Define to 1 if you have the <freetype/tttables.h> header file. */
-/* #undef HAVE_FREETYPE_TTTABLES_H */
+#define HAVE_FREETYPE_TTTABLES_H 1
/* Define to 1 if the system has the type `fsblkcnt_t'. */
/* #undef HAVE_FSBLKCNT_T */
@@ -144,7 +150,13 @@
/* #undef HAVE_FSTATVFS */
/* Define to 1 if you have the <ft2build.h> header file. */
-/* #undef HAVE_FT2BUILD_H */
+#define HAVE_FT2BUILD_H 1
+
+/* Define to 1 if you have the `FT_Load_Sfnt_Table' function. */
+/* #undef HAVE_FT_LOAD_SFNT_TABLE */
+
+/* Define to 1 if the system has the type `FT_TrueTypeEngineType'. */
+#define HAVE_FT_TRUETYPEENGINETYPE 1
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
Modified: trunk/reactos/include/reactos/wine/test.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/test.…
==============================================================================
--- trunk/reactos/include/reactos/wine/test.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/test.h [iso-8859-1] Sat Jul 31 22:39:22 2010
@@ -237,8 +237,7 @@
data=TlsGetValue(tls_index);
if (!data)
{
- data=HeapAlloc(GetProcessHeap(), 0, sizeof(tls_data));
- data->todo_level = 0;
+ data=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(tls_data));
data->str_pos = data->strings;
TlsSetValue(tls_index,data);
}
@@ -593,6 +592,8 @@
if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p);
+ if (!winetest_interactive) SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
+
if (!argv[1])
{
if (winetest_testlist[0].name && !winetest_testlist[1].name) /* only one test */
Modified: trunk/reactos/include/reactos/wine/windef16.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winde…
==============================================================================
--- trunk/reactos/include/reactos/wine/windef16.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/windef16.h [iso-8859-1] Sat Jul 31 22:39:22 2010
@@ -28,7 +28,9 @@
#endif
#include <windef.h>
#include <winbase.h>
-#include <wine/exception.h>
+#ifndef _NTNDK_
+#include <exception.h> // ROS Hack
+#endif
/* Standard data types */
typedef unsigned short BOOL16;
Modified: trunk/reactos/include/reactos/wine/wingdi16.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/wingd…
==============================================================================
--- trunk/reactos/include/reactos/wine/wingdi16.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/wingdi16.h [iso-8859-1] Sat Jul 31 22:39:22 2010
@@ -29,6 +29,24 @@
typedef struct
{
+ INT16 lfHeight;
+ INT16 lfWidth;
+ INT16 lfEscapement;
+ INT16 lfOrientation;
+ INT16 lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ CHAR lfFaceName[LF_FACESIZE];
+} LOGFONT16, *LPLOGFONT16;
+
+typedef struct
+{
INT16 mm;
INT16 xExt;
INT16 yExt;
Removed: trunk/reactos/include/reactos/wine/winuser16.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/winus…
==============================================================================
--- trunk/reactos/include/reactos/wine/winuser16.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/winuser16.h (removed)
@@ -1,26 +1,0 @@
-/*
- * Copyright (C) the Wine project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __WINE_WINE_WINUSER16_H
-#define __WINE_WINE_WINUSER16_H
-
-#ifndef CB_SETITEMDATA16
-#define CB_SETITEMDATA16 (WM_USER+17)
-#endif
-
-#endif /* __WINE_WINE_WINUSER16_H */
Author: ilardig
Date: Sat Jul 31 21:00:40 2010
New Revision: 48383
URL: http://svn.reactos.org/svn/reactos?rev=48383&view=rev
Log:
[freeldr]
- Patch by Carlo Bramini reviewed by lassy:
The CF must be tested when reading time because the legacy DS12x87
chip shows a condition where it's updating its time registers and if it's the
case then the call should be retried later. Now the time is valid when both CF flags for date and time are good at the same time.
It's better to send the correct value of CF with the proper field to the REGS structure instead of hoping that the flag won't be changed by compiled code.
In the Int386() function I did the fix for acquiring the status flags to send to the software interrupt.
I also think it is also a good idea to always clear the direction flag before
doing movsb/movsw/movsd in this function. Since we are working with DOS stuff,
the state of the direction register could be unknown, who knows what happens
after those INT opcodes. Afterall I don't think that adding these two "cld"
would be a big problem.
See issue #2786 for more details.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S
trunk/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c
trunk/reactos/boot/freeldr/freeldr/include/arch.h
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] Sat Jul 31 21:00:40 2010
@@ -23,6 +23,10 @@
#define ASM
#include <arch.h>
+/* Only these flags are propagated into Int386() */
+#define FLAGS_PROP (I386FLAG_CF | \
+ I386FLAG_ZF | \
+ I386FLAG_SF)
Int386_REGS:
@@ -85,6 +89,7 @@
movl $Int386_REGS,%edi
movl Int386_regsin,%esi
movl $0x24,%ecx
+ cld
rep
movsb
@@ -101,6 +106,16 @@
movw %cs:Int386_gs,%ax
movw %ax,%gs /* GS register */
+ /* Prepare EFLAGS for recover */
+ pushf
+ movw %cs:Int386_eflags, %ax
+ popw %cx
+ andw $FLAGS_PROP, %ax
+ andw $~FLAGS_PROP, %cx
+ orw %cx, %ax
+ pushw %ax
+
+ /* Recover general purpose registers */
movl %cs:Int386_eax,%eax /* EAX register */
movl %cs:Int386_ebx,%ebx /* EBX register */
movl %cs:Int386_ecx,%ecx /* ECX register */
@@ -108,6 +123,9 @@
movl %cs:Int386_esi,%esi /* ESI register */
movl %cs:Int386_edi,%edi /* EDI register */
+
+ /* Recover previously prepared flags */
+ popf
/* Do not set the flags register */
/* only return its value in regsout */
@@ -149,6 +167,7 @@
movl $Int386_REGS,%esi
movl Int386_regsout,%edi
movl $0x24,%ecx
+ cld
rep
movsb
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c [iso-8859-1] Sat Jul 31 21:00:40 2010
@@ -27,56 +27,66 @@
static TIMEINFO TimeInfo;
REGS Regs;
- /* Some BIOSes, such as the 1998/07/25 system ROM
- * in the Compaq Deskpro EP/SB, leave CF unchanged
- * if successful, so CF should be cleared before
- * calling this function. */
- __writeeflags(__readeflags() & ~EFLAGS_CF);
+ for (;;)
+ {
+ /* Some BIOSes, such as the 1998/07/25 system ROM
+ * in the Compaq Deskpro EP/SB, leave CF unchanged
+ * if successful, so CF should be cleared before
+ * calling this function. */
+ Regs.x.eflags = 0;
+// __writeeflags(__readeflags() & ~EFLAGS_CF);
- /* Int 1Ah AH=04h
- * TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
- *
- * AH = 04h
- * CF clear to avoid bug
- * Return:
- * CF clear if successful
- * CH = century (BCD)
- * CL = year (BCD)
- * DH = month (BCD)
- * DL = day (BCD)
- * CF set on error
- */
- Regs.b.ah = 0x04;
- Int386(0x1A, &Regs, &Regs);
+ /* Int 1Ah AH=04h
+ * TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
+ *
+ * AH = 04h
+ * CF clear to avoid bug
+ * Return:
+ * CF clear if successful
+ * CH = century (BCD)
+ * CL = year (BCD)
+ * DH = month (BCD)
+ * DL = day (BCD)
+ * CF set on error
+ */
+ Regs.b.ah = 0x04;
+ Int386(0x1A, &Regs, &Regs);
- TimeInfo.Year = 100 * BCD_INT(Regs.b.ch) + BCD_INT(Regs.b.cl);
- TimeInfo.Month = BCD_INT(Regs.b.dh);
- TimeInfo.Day = BCD_INT(Regs.b.dl);
+ if (!INT386_SUCCESS(Regs)) continue;
- /* Some BIOSes leave CF unchanged if successful,
- * so CF should be cleared before calling this function. */
- __writeeflags(__readeflags() & ~EFLAGS_CF);
+ TimeInfo.Year = 100 * BCD_INT(Regs.b.ch) + BCD_INT(Regs.b.cl);
+ TimeInfo.Month = BCD_INT(Regs.b.dh);
+ TimeInfo.Day = BCD_INT(Regs.b.dl);
- /* Int 1Ah AH=02h
- * TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
- *
- * AH = 02h
- * CF clear to avoid bug
- * Return:
- * CF clear if successful
- * CH = hour (BCD)
- * CL = minutes (BCD)
- * DH = seconds (BCD)
- * DL = daylight savings flag (00h standard time, 01h daylight time)
- * CF set on error (i.e. clock not running or in middle of update)
- */
- Regs.b.ah = 0x02;
- Int386(0x1A, &Regs, &Regs);
+ /* Some BIOSes leave CF unchanged if successful,
+ * so CF should be cleared before calling this function. */
+ Regs.x.eflags = 0;
+// __writeeflags(__readeflags() & ~EFLAGS_CF);
- TimeInfo.Hour = BCD_INT(Regs.b.ch);
- TimeInfo.Minute = BCD_INT(Regs.b.cl);
- TimeInfo.Second = BCD_INT(Regs.b.dh);
+ /* Int 1Ah AH=02h
+ * TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)
+ *
+ * AH = 02h
+ * CF clear to avoid bug
+ * Return:
+ * CF clear if successful
+ * CH = hour (BCD)
+ * CL = minutes (BCD)
+ * DH = seconds (BCD)
+ * DL = daylight savings flag (00h standard time, 01h daylight time)
+ * CF set on error (i.e. clock not running or in middle of update)
+ */
+ Regs.b.ah = 0x02;
+ Int386(0x1A, &Regs, &Regs);
+ if (!INT386_SUCCESS(Regs)) continue;
+
+ TimeInfo.Hour = BCD_INT(Regs.b.ch);
+ TimeInfo.Minute = BCD_INT(Regs.b.cl);
+ TimeInfo.Second = BCD_INT(Regs.b.dh);
+
+ break;
+ }
return &TimeInfo;
}
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch.h [iso-8859-1] Sat Jul 31 21:00:40 2010
@@ -58,6 +58,19 @@
#define EXTERN(x) .global x; x:
+// Flag Masks
+#define I386FLAG_CF 0x0001 // Carry Flag
+#define I386FLAG_RESV1 0x0002 // Reserved - Must be 1
+#define I386FLAG_PF 0x0004 // Parity Flag
+#define I386FLAG_RESV2 0x0008 // Reserved - Must be 0
+#define I386FLAG_AF 0x0010 // Auxiliary Flag
+#define I386FLAG_RESV3 0x0020 // Reserved - Must be 0
+#define I386FLAG_ZF 0x0040 // Zero Flag
+#define I386FLAG_SF 0x0080 // Sign Flag
+#define I386FLAG_TF 0x0100 // Trap Flag (Single Step)
+#define I386FLAG_IF 0x0200 // Interrupt Flag
+#define I386FLAG_DF 0x0400 // Direction Flag
+#define I386FLAG_OF 0x0800 // Overflow Flag
#ifndef ASM
@@ -148,20 +161,6 @@
// specifically handles linear addresses.
int Int386(int ivec, REGS* in, REGS* out);
-// Flag Masks
-#define I386FLAG_CF 0x0001 // Carry Flag
-#define I386FLAG_RESV1 0x0002 // Reserved - Must be 1
-#define I386FLAG_PF 0x0004 // Parity Flag
-#define I386FLAG_RESV2 0x0008 // Reserved - Must be 0
-#define I386FLAG_AF 0x0010 // Auxiliary Flag
-#define I386FLAG_RESV3 0x0020 // Reserved - Must be 0
-#define I386FLAG_ZF 0x0040 // Zero Flag
-#define I386FLAG_SF 0x0080 // Sign Flag
-#define I386FLAG_TF 0x0100 // Trap Flag (Single Step)
-#define I386FLAG_IF 0x0200 // Interrupt Flag
-#define I386FLAG_DF 0x0400 // Direction Flag
-#define I386FLAG_OF 0x0800 // Overflow Flag
-
// This macro tests the Carry Flag
// If CF is set then the call failed (usually)
#define INT386_SUCCESS(regs) ((regs.x.eflags & I386FLAG_CF) == 0)