mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
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? svn path=/trunk/; revision=41560
This commit is contained in:
parent
4f96f16ac2
commit
e89c456751
|
@ -88,6 +88,7 @@ GetLogicalDriveStringsA(DWORD nBufferLength,
|
|||
{
|
||||
DWORD drive, count;
|
||||
DWORD dwDriveMap;
|
||||
LPSTR p;
|
||||
|
||||
dwDriveMap = GetLogicalDrives();
|
||||
|
||||
|
@ -100,7 +101,7 @@ GetLogicalDriveStringsA(DWORD nBufferLength,
|
|||
|
||||
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 @@ GetLogicalDriveStringsW(DWORD nBufferLength,
|
|||
{
|
||||
DWORD drive, count;
|
||||
DWORD dwDriveMap;
|
||||
LPWSTR p;
|
||||
|
||||
dwDriveMap = GetLogicalDrives();
|
||||
|
||||
|
@ -137,7 +139,7 @@ GetLogicalDriveStringsW(DWORD nBufferLength,
|
|||
|
||||
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))
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
/* C Headers */
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ CreateActCtxW(
|
|||
|
||||
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));
|
||||
|
|
|
@ -1550,10 +1550,10 @@ GetGeoInfoA(
|
|||
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);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include <k32.h>
|
||||
#include <wine/list.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -21,55 +22,6 @@
|
|||
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.
|
||||
* Type/Name/Language is a keyset for accessing resource data.
|
||||
|
@ -264,16 +216,6 @@ static struct resource_data *allocate_resource_data( WORD Language, DWORD codepa
|
|||
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 )
|
||||
{
|
||||
struct resource_dir_entry *ent;
|
||||
|
|
Loading…
Reference in a new issue