[ros-diffs] [hyperion] 41560: modified dll/win32/kernel32/file/volume.c modified dll/win32/kernel32/misc/actctx.c modified dll/win32/kernel32/misc/lang.c C89 compliance modified dll/win32/kernel32/k32.h Include <limits.h> modified dll/win32/kernel32/misc/res.c Hey Arch, instead of copying and pasting definitions from <wine/list.h>, why don't you include it?

hyperion at svn.reactos.org hyperion at svn.reactos.org
Mon Jun 22 22:15:43 CEST 2009


Author: hyperion
Date: Tue Jun 23 00:15:42 2009
New Revision: 41560

URL: http://svn.reactos.org/svn/reactos?rev=41560&view=rev
Log:
modified   dll/win32/kernel32/file/volume.c
modified   dll/win32/kernel32/misc/actctx.c
modified   dll/win32/kernel32/misc/lang.c
   C89 compliance

modified   dll/win32/kernel32/k32.h
   Include <limits.h>

modified   dll/win32/kernel32/misc/res.c
   Hey Arch, instead of copying and pasting definitions from <wine/list.h>, why don't you include it?

Modified:
    trunk/reactos/dll/win32/kernel32/file/volume.c
    trunk/reactos/dll/win32/kernel32/k32.h
    trunk/reactos/dll/win32/kernel32/misc/actctx.c
    trunk/reactos/dll/win32/kernel32/misc/lang.c
    trunk/reactos/dll/win32/kernel32/misc/res.c

Modified: trunk/reactos/dll/win32/kernel32/file/volume.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/volume.c?rev=41560&r1=41559&r2=41560&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/volume.c [iso-8859-1] Tue Jun 23 00:15:42 2009
@@ -88,6 +88,7 @@
 {
    DWORD drive, count;
    DWORD dwDriveMap;
+   LPSTR p;
 
    dwDriveMap = GetLogicalDrives();
 
@@ -100,7 +101,7 @@
 
    if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
 
-	LPSTR p = lpBuffer;
+	p = lpBuffer;
 
 	for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
 	  if (dwDriveMap & (1<<drive))
@@ -126,6 +127,7 @@
 {
    DWORD drive, count;
    DWORD dwDriveMap;
+   LPWSTR p;
 
    dwDriveMap = GetLogicalDrives();
 
@@ -137,7 +139,7 @@
 
     if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
 
-    LPWSTR p = lpBuffer;
+    p = lpBuffer;
     for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
         if (dwDriveMap & (1<<drive))
         {
@@ -934,7 +936,7 @@
             BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength;
             continue;
          }
-         else 
+         else
          {
             NtClose(FileHandle);
             SetLastErrorByStatus(Status);
@@ -1023,7 +1025,7 @@
    {
       MountPoint = MountPoints->MountPoints + Index;
       SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset;
-      
+
       /*
        * Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\"
        * (with the last slash being optional) style symbolic links.

Modified: trunk/reactos/dll/win32/kernel32/k32.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/k32.h?rev=41560&r1=41559&r2=41560&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/k32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/k32.h [iso-8859-1] Tue Jun 23 00:15:42 2009
@@ -27,6 +27,7 @@
 
 /* C Headers */
 #include <ctype.h>
+#include <limits.h>
 #include <stdio.h>
 #include <wchar.h>
 

Modified: trunk/reactos/dll/win32/kernel32/misc/actctx.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/actctx.c?rev=41560&r1=41559&r2=41560&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/actctx.c [iso-8859-1] Tue Jun 23 00:15:42 2009
@@ -174,7 +174,7 @@
 
     DPRINT("CreateActCtxW(%p %08lx)\n", pActCtx, pActCtx ? pActCtx->dwFlags : 0);
 
-    Status = RtlCreateActivationContext(&hActCtx, &pActCtx);
+    Status = RtlCreateActivationContext(&hActCtx, (PVOID*)&pActCtx);
     if (!NT_SUCCESS(Status))
     {
         SetLastError(RtlNtStatusToDosError(Status));
@@ -318,6 +318,6 @@
         SetLastError(RtlNtStatusToDosError(Status));
         return FALSE;
     }
-     
-    return TRUE;
-}
+
+    return TRUE;
+}

Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lang.c?rev=41560&r1=41559&r2=41560&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Jun 23 00:15:42 2009
@@ -1550,10 +1550,10 @@
         case GEO_FRIENDLYNAME:
         {
             WCHAR szBuffer[MAX_PATH];
+            char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)];
             int Ret;
-        
+
             Ret = NLS_GetGeoFriendlyName(Location, szBuffer, cchData);
-            char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)];
 
             WideCharToMultiByte(CP_ACP, 0, szBuffer, -1, szBufferA, sizeof(szBufferA), 0, 0);
             strcpy(lpGeoData, szBufferA);

Modified: trunk/reactos/dll/win32/kernel32/misc/res.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/res.c?rev=41560&r1=41559&r2=41560&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/res.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/res.c [iso-8859-1] Tue Jun 23 00:15:42 2009
@@ -13,6 +13,7 @@
  */
 
 #include <k32.h>
+#include <wine/list.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -20,55 +21,6 @@
 #define STUB \
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
   DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
-
-/* Strustures and functions from include/wine/list.h */
-struct list
-{
-    struct list *next;
-    struct list *prev;
-};
-
-static inline void list_init( struct list *list )
-{
-    list->next = list->prev = list;
-}
-
-/* add an element before the specified one */
-static inline void list_add_before( struct list *elem, struct list *to_add )
-{
-    to_add->next = elem;
-    to_add->prev = elem->prev;
-    elem->prev->next = to_add;
-    elem->prev = to_add;
-}
-
-/* add element at the tail of the list */
-static inline void list_add_tail( struct list *list, struct list *elem )
-{
-    list_add_before( list, elem );
-}
-
-/* remove an element from its list */
-static inline void list_remove( struct list *elem )
-{
-    elem->next->prev = elem->prev;
-    elem->prev->next = elem->next;
-}
-
-/* get the next element */
-static inline struct list *list_next( const struct list *list, const struct list *elem )
-{
-    struct list *ret = elem->next;
-    if (elem->next == list) ret = NULL;
-    return ret;
-}
-
-/* get the first element */
-static inline struct list *list_head( const struct list *list )
-{
-    return list_next( list, list );
-}
-
 
 /*
  *  Data structure for updating resources.
@@ -263,16 +215,6 @@
 
     return resdata;
 }
-
-/* get pointer to object containing list element */
-#define LIST_ENTRY(elem, type, field) \
-    ((type *)((char *)(elem) - (unsigned int)(&((type *)0)->field)))
-
-/* iterate through the list using a list entry */
-#define LIST_FOR_EACH_ENTRY(elem, list, type, field) \
-    for ((elem) = LIST_ENTRY((list)->next, type, field); \
-         &(elem)->field != (list); \
-         (elem) = LIST_ENTRY((elem)->field.next, type, field))
 
 static void add_resource_dir_entry( struct list *dir, struct resource_dir_entry *resdir )
 {



More information about the Ros-diffs mailing list