misc. minor fixes
Andreas Mohr
andi at rhlx01.fht-esslingen.de
Sun Feb 24 08:03:07 CST 2002
Hi all,
- dlls/kernel/comm.c: sort changelog chronologically, s/460600/460800/,
spelling, remove outdated GetCommConfig comment
- dlls/kernel/string.c: let Reserved5/KERNEL_lstrcmp16 join the other
functions in this group
- include/winnt.h: add some defines, add some offsets
- misc/registry.c: add Win XP specific registry message
- objects/gdiobj.c: save memory by not defining table twice
- relay32/builtin32.c: better error message
- server/file.c: move file_set_error() function to top, for easier reference
(in order to find it immediately !)
--
Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/kernel/comm.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/comm.c,v
retrieving revision 1.49
diff -u -r1.49 comm.c
--- dlls/kernel/comm.c 19 Feb 2002 18:42:05 -0000 1.49
+++ dlls/kernel/comm.c 24 Feb 2002 11:59:23 -0000
@@ -3,33 +3,34 @@
*
* Copyright 1996 Marcus Meissner
*
- * Mar 31, 1999. Ove K?ven <ovek at arcticnet.no>
- * - Implemented buffers and EnableCommNotification.
- *
* Apr 3, 1999. Lawson Whitney <lawson_whitney at juno.com>
* - Fixed the modem control part of EscapeCommFunction16.
*
+ * Mar 31, 1999. Ove K?ven <ovek at arcticnet.no>
+ * - Implemented buffers and EnableCommNotification.
+ *
* Mar 3, 1999. Ove K?ven <ovek at arcticnet.no>
* - Use port indices instead of unixfds for win16
* - Moved things around (separated win16 and win32 routines)
* - Added some hints on how to implement buffers and EnableCommNotification.
*
+ * Oktober 98, Rein Klazes [RHK]
+ * A program that wants to monitor the modem status line (RLSD/DCD) may
+ * poll the modem status register in the commMask structure. I update the bit
+ * in GetCommError, waiting for an implementation of communication events.
+ *
+ * July 6, 1998. Fixes and comments by Valentijn Sessink
+ * <vsessink at ic.uva.nl> [V]
+ *
+ * August 12, 1997. Take a bash at SetCommEventMask - Lawson Whitney
+ * <lawson_whitney at juno.com>
+ *
* May 26, 1997. Fixes and comments by Rick Richardson <rick at dgii.com> [RER]
* - ptr->fd wasn't getting cleared on close.
* - GetCommEventMask() and GetCommError() didn't do much of anything.
* IMHO, they are still wrong, but they at least implement the RXCHAR
* event and return I/O queue sizes, which makes the app I'm interested
* in (analog devices EZKIT DSP development system) work.
- *
- * August 12, 1997. Take a bash at SetCommEventMask - Lawson Whitney
- * <lawson_whitney at juno.com>
- * July 6, 1998. Fixes and comments by Valentijn Sessink
- * <vsessink at ic.uva.nl> [V]
- * Oktober 98, Rein Klazes [RHK]
- * A program that wants to monitor the modem status line (RLSD/DCD) may
- * poll the modem status register in the commMask structure. I update the bit
- * in GetCommError, waiting for an implementation of communication events.
- *
*/
#include "config.h"
@@ -231,7 +232,7 @@
*
* RETURNS
*
- * True on success, false on an malformed control string.
+ * True on success, false on a malformed control string.
*/
BOOL WINAPI BuildCommDCBA(
LPCSTR device, /* [in] The ascii device control string used to update the DCB. */
@@ -244,7 +245,7 @@
* BuildCommDCBAndTimeoutsA (KERNEL32.@)
*
* Updates a device control block data structure with values from an
- * ascii device control string. Taking time out values from a time outs
+ * ascii device control string. Taking timeout values from a timeouts
* struct if desired by the control string.
*
* RETURNS
@@ -254,7 +255,7 @@
BOOL WINAPI BuildCommDCBAndTimeoutsA(
LPCSTR device, /* [in] The ascii device control string. */
LPDCB lpdcb, /* [out] The device control block to be updated. */
- LPCOMMTIMEOUTS lptimeouts) /* [in] The time outs to use if asked to set them by the control string. */
+ LPCOMMTIMEOUTS lptimeouts) /* [in] The timeouts to use if asked to set them by the control string. */
{
int port;
char *ptr,*temp;
@@ -337,7 +338,7 @@
* BuildCommDCBAndTimeoutsW (KERNEL32.@)
*
* Updates a device control block data structure with values from an
- * unicode device control string. Taking time out values from a time outs
+ * unicode device control string. Taking timeout values from a timeouts
* struct if desired by the control string.
*
* RETURNS
@@ -347,7 +348,7 @@
BOOL WINAPI BuildCommDCBAndTimeoutsW(
LPCWSTR devid, /* [in] The unicode device control string. */
LPDCB lpdcb, /* [out] The device control block to be updated. */
- LPCOMMTIMEOUTS lptimeouts) /* [in] The time outs to use if asked to set them by the control string. */
+ LPCOMMTIMEOUTS lptimeouts) /* [in] The timeouts to use if asked to set them by the control string. */
{
BOOL ret = FALSE;
LPSTR devidA;
@@ -740,8 +741,8 @@
/*****************************************************************************
* GetCommMask (KERNEL32.@)
*
- * Obtain the events associated with a communication device that will cause a call
- * WaitCommEvent to return.
+ * Obtain the events associated with a communication device that will cause
+ * a call WaitCommEvent to return.
*
* RETURNS
*
@@ -780,7 +781,7 @@
*/
BOOL WINAPI SetCommMask(
HANDLE handle, /* [in] The communications device. */
- DWORD evtmask) /* [in] The events that to be monitored. */
+ DWORD evtmask) /* [in] The events that are to be monitored. */
{
BOOL ret;
@@ -910,7 +911,7 @@
break;
#endif
#ifdef B460800
- case 460600:
+ case 460800:
port.c_cflag |= B460800;
break;
#endif
@@ -1348,14 +1349,14 @@
HANDLE hComm, /* [in] The communication device in need of a command character. */
CHAR chTransmit) /* [in] The character to transmit. */
{
- FIXME("(%x,'%c'), use win32 handle!\n",hComm,chTransmit);
+ FIXME("(%x,'%c'), stub ! Use win32 handle!\n",hComm,chTransmit);
return TRUE;
}
/*****************************************************************************
* GetCommTimeouts (KERNEL32.@)
*
- * Obtains the request time out values for the communications device.
+ * Obtains the request timeout values for the communications device.
*
* RETURNS
*
@@ -1364,7 +1365,7 @@
*/
BOOL WINAPI GetCommTimeouts(
HANDLE hComm, /* [in] The communications device. */
- LPCOMMTIMEOUTS lptimeouts) /* [out] The struct of request time outs. */
+ LPCOMMTIMEOUTS lptimeouts) /* [out] The struct of request timeouts. */
{
BOOL ret;
@@ -1406,7 +1407,7 @@
*
* RETURNS
*
- * True if the time outs were set, false otherwise.
+ * True if the timeouts were set, false otherwise.
*/
BOOL WINAPI SetCommTimeouts(
HANDLE hComm, /* [in] handle of COMM device */
@@ -1814,9 +1815,6 @@
*
* BUGS
*
- * The signature is missing a the parameter for the size of the COMMCONFIG
- * structure/buffer it should be
- * BOOL WINAPI GetCommConfig(HANDLE hFile,LPCOMMCONFIG lpCommConfig,LPDWORD lpdwSize)
*/
BOOL WINAPI GetCommConfig(
HANDLE hFile, /* [in] The communications device. */
@@ -1851,7 +1849,7 @@
/***********************************************************************
* SetCommConfig (KERNEL32.@)
*
- * Sets the configuration of the commications device.
+ * Sets the configuration of the communications device.
*
* RETURNS
*
@@ -1971,7 +1969,7 @@
lpCC->dwProviderOffset = 0L;
lpCC->dwProviderSize = 0L;
- (void) sprintf( temp, "COM%c:38400,n,8,1", lpszName[3]);
+ sprintf( temp, "COM%c:38400,n,8,1", lpszName[3]);
FIXME("setting %s as default\n", temp);
return BuildCommDCBA( temp, lpdcb);
Index: dlls/kernel/string.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/string.c,v
retrieving revision 1.4
diff -u -r1.4 string.c
--- dlls/kernel/string.c 2 Feb 2002 18:42:13 -0000 1.4
+++ dlls/kernel/string.c 24 Feb 2002 11:59:23 -0000
@@ -25,15 +25,6 @@
/***********************************************************************
- * Reserved5 (KERNEL.87)
- */
-INT16 WINAPI KERNEL_lstrcmp16( LPCSTR str1, LPCSTR str2 )
-{
- return (INT16)strcmp( str1, str2 );
-}
-
-
-/***********************************************************************
* k32CharToOemBuffA (KERNEL32.11)
*/
BOOL WINAPI k32CharToOemBuffA(LPCSTR s, LPSTR d, DWORD len)
@@ -181,4 +172,13 @@
return strOrChar;
}
else return tolower((char)strOrChar);
+}
+
+
+/***********************************************************************
+ * Reserved5 (KERNEL.87)
+ */
+INT16 WINAPI KERNEL_lstrcmp16( LPCSTR str1, LPCSTR str2 )
+{
+ return (INT16)strcmp( str1, str2 );
}
Index: include/winnt.h
===================================================================
RCS file: /home/wine/wine/include/winnt.h,v
retrieving revision 1.99
diff -u -r1.99 winnt.h
--- include/winnt.h 31 Jan 2002 23:22:08 -0000 1.99
+++ include/winnt.h 24 Feb 2002 11:59:38 -0000
@@ -2478,12 +2478,16 @@
#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
+#define IMAGE_FILE_AGGRESIVE_WS_TRIM 0x0010
+#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
#define IMAGE_FILE_16BIT_MACHINE 0x0040
#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
#define IMAGE_FILE_32BIT_MACHINE 0x0100
#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
+#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
#define IMAGE_FILE_SYSTEM 0x1000
#define IMAGE_FILE_DLL 0x2000
+#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
/* These are the settings of the Machine field. */
@@ -2597,12 +2601,13 @@
DWORD LoaderFlags;
DWORD NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; /* 0x60 */
+ /* 0xE0 */
} IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER;
typedef struct _IMAGE_NT_HEADERS {
- DWORD Signature; /* "PE"\0\0 */
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_OPTIONAL_HEADER OptionalHeader;
+ DWORD Signature; /* "PE"\0\0 */ /* 0x00 */
+ IMAGE_FILE_HEADER FileHeader; /* 0x04 */
+ IMAGE_OPTIONAL_HEADER OptionalHeader; /* 0x18 */
} IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS;
#define IMAGE_SIZEOF_SHORT_NAME 8
Index: misc/registry.c
===================================================================
RCS file: /home/wine/wine/misc/registry.c,v
retrieving revision 1.102
diff -u -r1.102 registry.c
--- misc/registry.c 1 Jan 2002 00:24:33 -0000 1.102
+++ misc/registry.c 24 Feb 2002 11:59:45 -0000
@@ -911,7 +911,10 @@
return TRUE;
error2:
- ERR("unknown node id 0x%04x, please report!\n", lf->id);
+ if (lf->id == 0x686c)
+ FIXME("unknown Win XP node id 0x686c: do we need to add support for it ?\n");
+ else
+ ERR("unknown node id 0x%04x, please report!\n", lf->id);
return TRUE;
error1:
Index: objects/gdiobj.c
===================================================================
RCS file: /home/wine/wine/objects/gdiobj.c,v
retrieving revision 1.64
diff -u -r1.64 gdiobj.c
--- objects/gdiobj.c 29 Jan 2002 03:02:54 -0000 1.64
+++ objects/gdiobj.c 24 Feb 2002 11:59:47 -0000
@@ -860,24 +860,24 @@
}
+/* Solid colors to enumerate */
+static const COLORREF solid_colors[] =
+{ RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff),
+RGB(0xff,0x00,0x00), RGB(0x00,0xff,0x00),
+RGB(0x00,0x00,0xff), RGB(0xff,0xff,0x00),
+RGB(0xff,0x00,0xff), RGB(0x00,0xff,0xff),
+RGB(0x80,0x00,0x00), RGB(0x00,0x80,0x00),
+RGB(0x80,0x80,0x00), RGB(0x00,0x00,0x80),
+RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
+RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
+};
+
/***********************************************************************
* EnumObjects (GDI.71)
*/
INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
GOBJENUMPROC16 lpEnumFunc, LPARAM lParam )
{
- /* Solid colors to enumerate */
- static const COLORREF solid_colors[] =
- { RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff),
- RGB(0xff,0x00,0x00), RGB(0x00,0xff,0x00),
- RGB(0x00,0x00,0xff), RGB(0xff,0xff,0x00),
- RGB(0xff,0x00,0xff), RGB(0x00,0xff,0xff),
- RGB(0x80,0x00,0x00), RGB(0x00,0x80,0x00),
- RGB(0x80,0x80,0x00), RGB(0x00,0x00,0x80),
- RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
- RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
- };
-
INT16 i, retval = 0;
LOGPEN16 pen;
LOGBRUSH16 brush;
@@ -943,18 +943,6 @@
INT WINAPI EnumObjects( HDC hdc, INT nObjType,
GOBJENUMPROC lpEnumFunc, LPARAM lParam )
{
- /* Solid colors to enumerate */
- static const COLORREF solid_colors[] =
- { RGB(0x00,0x00,0x00), RGB(0xff,0xff,0xff),
- RGB(0xff,0x00,0x00), RGB(0x00,0xff,0x00),
- RGB(0x00,0x00,0xff), RGB(0xff,0xff,0x00),
- RGB(0xff,0x00,0xff), RGB(0x00,0xff,0xff),
- RGB(0x80,0x00,0x00), RGB(0x00,0x80,0x00),
- RGB(0x80,0x80,0x00), RGB(0x00,0x00,0x80),
- RGB(0x80,0x00,0x80), RGB(0x00,0x80,0x80),
- RGB(0x80,0x80,0x80), RGB(0xc0,0xc0,0xc0)
- };
-
INT i, retval = 0;
LOGPEN pen;
LOGBRUSH brush;
Index: relay32/builtin32.c
===================================================================
RCS file: /home/wine/wine/relay32/builtin32.c,v
retrieving revision 1.83
diff -u -r1.83 builtin32.c
--- relay32/builtin32.c 9 Nov 2001 19:17:35 -0000 1.83
+++ relay32/builtin32.c 24 Feb 2002 11:59:47 -0000
@@ -135,7 +135,7 @@
if (!(wm = MODULE_FindModule( path ))) wm = MODULE_FindModule( dllname );
if (!wm)
{
- ERR( "loaded .so but dll %s still not found\n", dllname );
+ ERR( "loaded .so but dll %s still not found - library environment problem or version conflict ?? Check your setup !\n", dllname );
/* wine_dll_unload( handle );*/
return NULL;
}
@@ -151,7 +151,7 @@
* BUILTIN32_Init
*
* Initialize loading callbacks and return HMODULE of main exe.
- * 'main' is the main exe in case if was already loaded from a PE file.
+ * 'main' is the main exe in case it was already loaded from a PE file.
*/
HMODULE BUILTIN32_LoadExeModule( HMODULE main )
{
Index: server/file.c
===================================================================
RCS file: /home/wine/wine/server/file.c,v
retrieving revision 1.54
diff -u -r1.54 file.c
--- server/file.c 29 Jan 2002 02:51:12 -0000 1.54
+++ server/file.c 24 Feb 2002 11:59:49 -0000
@@ -75,6 +75,32 @@
};
+/* set the last error depending on errno */
+void file_set_error(void)
+{
+ switch (errno)
+ {
+ case EAGAIN: set_error( STATUS_SHARING_VIOLATION ); break;
+ case EBADF: set_error( STATUS_INVALID_HANDLE ); break;
+ case ENOSPC: set_error( STATUS_DISK_FULL ); break;
+ case EACCES:
+ case ESRCH:
+ case EPERM: set_error( STATUS_ACCESS_DENIED ); break;
+ case EROFS: set_error( STATUS_MEDIA_WRITE_PROTECTED ); break;
+ case EBUSY: set_error( STATUS_FILE_LOCK_CONFLICT ); break;
+ case ENOENT: set_error( STATUS_NO_SUCH_FILE ); break;
+ case EISDIR: set_error( 0xc0010000 | ERROR_CANNOT_MAKE /* FIXME */ ); break;
+ case ENFILE:
+ case EMFILE: set_error( STATUS_NO_MORE_FILES ); break;
+ case EEXIST: set_error( STATUS_OBJECT_NAME_COLLISION ); break;
+ case EINVAL: set_error( STATUS_INVALID_PARAMETER ); break;
+ case ESPIPE: set_error( 0xc0010000 | ERROR_SEEK /* FIXME */ ); break;
+ case ENOTEMPTY: set_error( STATUS_DIRECTORY_NOT_EMPTY ); break;
+ case EIO: set_error( STATUS_ACCESS_VIOLATION ); break;
+ default: perror("file_set_error"); set_error( ERROR_UNKNOWN /* FIXME */ ); break;
+ }
+}
+
static int get_name_hash( const char *name )
{
int hash = 0;
@@ -395,32 +421,6 @@
{
destroy_async_queue (&file->read_q);
destroy_async_queue (&file->write_q);
- }
-}
-
-/* set the last error depending on errno */
-void file_set_error(void)
-{
- switch (errno)
- {
- case EAGAIN: set_error( STATUS_SHARING_VIOLATION ); break;
- case EBADF: set_error( STATUS_INVALID_HANDLE ); break;
- case ENOSPC: set_error( STATUS_DISK_FULL ); break;
- case EACCES:
- case ESRCH:
- case EPERM: set_error( STATUS_ACCESS_DENIED ); break;
- case EROFS: set_error( STATUS_MEDIA_WRITE_PROTECTED ); break;
- case EBUSY: set_error( STATUS_FILE_LOCK_CONFLICT ); break;
- case ENOENT: set_error( STATUS_NO_SUCH_FILE ); break;
- case EISDIR: set_error( 0xc0010000 | ERROR_CANNOT_MAKE /* FIXME */ ); break;
- case ENFILE:
- case EMFILE: set_error( STATUS_NO_MORE_FILES ); break;
- case EEXIST: set_error( STATUS_OBJECT_NAME_COLLISION ); break;
- case EINVAL: set_error( STATUS_INVALID_PARAMETER ); break;
- case ESPIPE: set_error( 0xc0010000 | ERROR_SEEK /* FIXME */ ); break;
- case ENOTEMPTY: set_error( STATUS_DIRECTORY_NOT_EMPTY ); break;
- case EIO: set_error( STATUS_ACCESS_VIOLATION ); break;
- default: perror("file_set_error"); set_error( ERROR_UNKNOWN /* FIXME */ ); break;
}
}
More information about the wine-patches
mailing list