mirror of
https://github.com/reactos/reactos.git
synced 2025-07-13 09:04:12 +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
5 changed files with 13 additions and 68 deletions
|
@ -88,6 +88,7 @@ GetLogicalDriveStringsA(DWORD nBufferLength,
|
||||||
{
|
{
|
||||||
DWORD drive, count;
|
DWORD drive, count;
|
||||||
DWORD dwDriveMap;
|
DWORD dwDriveMap;
|
||||||
|
LPSTR p;
|
||||||
|
|
||||||
dwDriveMap = GetLogicalDrives();
|
dwDriveMap = GetLogicalDrives();
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ GetLogicalDriveStringsA(DWORD nBufferLength,
|
||||||
|
|
||||||
if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
|
if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
|
||||||
|
|
||||||
LPSTR p = lpBuffer;
|
p = lpBuffer;
|
||||||
|
|
||||||
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
|
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
|
||||||
if (dwDriveMap & (1<<drive))
|
if (dwDriveMap & (1<<drive))
|
||||||
|
@ -126,6 +127,7 @@ GetLogicalDriveStringsW(DWORD nBufferLength,
|
||||||
{
|
{
|
||||||
DWORD drive, count;
|
DWORD drive, count;
|
||||||
DWORD dwDriveMap;
|
DWORD dwDriveMap;
|
||||||
|
LPWSTR p;
|
||||||
|
|
||||||
dwDriveMap = GetLogicalDrives();
|
dwDriveMap = GetLogicalDrives();
|
||||||
|
|
||||||
|
@ -137,7 +139,7 @@ GetLogicalDriveStringsW(DWORD nBufferLength,
|
||||||
|
|
||||||
if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
|
if ((count * 4) + 1 > nBufferLength) return ((count * 4) + 1);
|
||||||
|
|
||||||
LPWSTR p = lpBuffer;
|
p = lpBuffer;
|
||||||
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
|
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
|
||||||
if (dwDriveMap & (1<<drive))
|
if (dwDriveMap & (1<<drive))
|
||||||
{
|
{
|
||||||
|
@ -934,7 +936,7 @@ GetVolumeNameForVolumeMountPointW(
|
||||||
BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength;
|
BufferLength = sizeof(MOUNTDEV_NAME) + MountDevName->NameLength;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NtClose(FileHandle);
|
NtClose(FileHandle);
|
||||||
SetLastErrorByStatus(Status);
|
SetLastErrorByStatus(Status);
|
||||||
|
@ -1023,7 +1025,7 @@ GetVolumeNameForVolumeMountPointW(
|
||||||
{
|
{
|
||||||
MountPoint = MountPoints->MountPoints + Index;
|
MountPoint = MountPoints->MountPoints + Index;
|
||||||
SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset;
|
SymbolicLinkName = (PUCHAR)MountPoints + MountPoint->SymbolicLinkNameOffset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\"
|
* Check for "\\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\"
|
||||||
* (with the last slash being optional) style symbolic links.
|
* (with the last slash being optional) style symbolic links.
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
/* C Headers */
|
/* C Headers */
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ CreateActCtxW(
|
||||||
|
|
||||||
DPRINT("CreateActCtxW(%p %08lx)\n", pActCtx, pActCtx ? pActCtx->dwFlags : 0);
|
DPRINT("CreateActCtxW(%p %08lx)\n", pActCtx, pActCtx ? pActCtx->dwFlags : 0);
|
||||||
|
|
||||||
Status = RtlCreateActivationContext(&hActCtx, &pActCtx);
|
Status = RtlCreateActivationContext(&hActCtx, (PVOID*)&pActCtx);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
|
@ -318,6 +318,6 @@ ZombifyActCtx(
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1550,10 +1550,10 @@ GetGeoInfoA(
|
||||||
case GEO_FRIENDLYNAME:
|
case GEO_FRIENDLYNAME:
|
||||||
{
|
{
|
||||||
WCHAR szBuffer[MAX_PATH];
|
WCHAR szBuffer[MAX_PATH];
|
||||||
int Ret;
|
|
||||||
|
|
||||||
Ret = NLS_GetGeoFriendlyName(Location, szBuffer, cchData);
|
|
||||||
char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)];
|
char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)];
|
||||||
|
int Ret;
|
||||||
|
|
||||||
|
Ret = NLS_GetGeoFriendlyName(Location, szBuffer, cchData);
|
||||||
|
|
||||||
WideCharToMultiByte(CP_ACP, 0, szBuffer, -1, szBufferA, sizeof(szBufferA), 0, 0);
|
WideCharToMultiByte(CP_ACP, 0, szBuffer, -1, szBufferA, sizeof(szBufferA), 0, 0);
|
||||||
strcpy(lpGeoData, szBufferA);
|
strcpy(lpGeoData, szBufferA);
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <k32.h>
|
#include <k32.h>
|
||||||
|
#include <wine/list.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -21,55 +22,6 @@
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
|
||||||
DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
|
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.
|
* Data structure for updating resources.
|
||||||
* Type/Name/Language is a keyset for accessing resource data.
|
* 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;
|
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 )
|
static void add_resource_dir_entry( struct list *dir, struct resource_dir_entry *resdir )
|
||||||
{
|
{
|
||||||
struct resource_dir_entry *ent;
|
struct resource_dir_entry *ent;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue