Compare commits

...

5 Commits

Author SHA1 Message Date
KJK::Hyperion
98dee81dd1 Fixes for GCC compilation, also fixed w32api definition of LUID
svn path=/branches/rox-u/; revision=16208
2005-06-21 18:44:20 +00:00
KJK::Hyperion
abea25e736 fixes for Visual C++:
- repositioned __stdcall in several declarations
 - replaced __attribute__ with __declspec when possible
 - reimplemented some inline assembly
 - use RESTRICTED_POINTER instead of __restrict
 - change some w32api conditional compilation to take Visual C++ in consideration
 - fixed RVA macro
 - moved variable declarations to the beginning of the scope block
 - corrected mismatching DLL linkage for exported symbols in ntoskrnl
 - corrected some non-standard casts
 - do PVOID arithmetic with the RVA macro
 - removed (unused) nested function
 - corrected wrong macro definitions that took a parameter when they shouldn't
 - use the appropriate _M_XXX macros for architecture-specific conditional compilation
 - miscellaneous hacks tagged with /* ROX-U */

svn path=/branches/rox-u/; revision=16198
2005-06-21 00:23:09 +00:00
KJK::Hyperion
76431b873b Merge from trunk for a fresh start
svn path=/branches/rox-u/; revision=16184
2005-06-20 21:08:26 +00:00
KJK::Hyperion
c4a1b84860 make SVN merge happy
svn path=/branches/rox-u/; revision=16137
2005-06-20 05:11:48 +00:00
KJK::Hyperion
2091f47a64 Deleting in the hope SVN will merge painlessly
svn path=/branches/rox-u/; revision=16062
2005-06-18 21:10:48 +00:00
261 changed files with 3139 additions and 994 deletions

View File

@@ -1,20 +0,0 @@
#ifndef __INCLUDE_DDK_NTIFS_H
#define __INCLUDE_DDK_NTIFS_H
#include_next <ddk/ntifs.h>
NTSTATUS STDCALL
CcRosInitializeFileCache (PFILE_OBJECT FileObject,
ULONG CacheSegmentSize);
NTSTATUS STDCALL
CcRosReleaseFileCache (PFILE_OBJECT FileObject);
#define FSCTL_ROS_QUERY_LCN_MAPPING \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef struct _ROS_QUERY_LCN_MAPPING
{
LARGE_INTEGER LcnDiskOffset;
} ROS_QUERY_LCN_MAPPING, *PROS_QUERY_LCN_MAPPING;
#endif /* __INCLUDE_DDK_NTIFS_H */

View File

@@ -239,6 +239,7 @@ typedef struct _TEB
PVOID WineDebugInfo; /* Needed for WINE DLL's */
} TEB, *PTEB;
#if 0 /* ROX-U */
#if (!defined(__USE_W32API) || __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5)
/* FIXME: at least NtCurrentTeb should be defined in winnt.h */
@@ -331,4 +332,6 @@ static inline struct _PEB * NtCurrentPeb(void)
#define NtCurrentPeb() (NtCurrentTeb()->Peb)
#endif
#endif
#endif /* __INCLUDE_INTERNAL_TEB */

View File

@@ -1,7 +1,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_LDR_H
#define __NTOSKRNL_INCLUDE_INTERNAL_LDR_H
#include <roscfg.h>
/*#include <roscfg.h>*/
#ifndef _NTNDK_
#include <napi/teb.h>
#endif
@@ -85,7 +85,7 @@ typedef struct _LDR_SYMBOL_INFO {
} LDR_SYMBOL_INFO, *PLDR_SYMBOL_INFO;
#define RVA(m, b) ((ULONG)b + m)
#define RVA(m, b) ((PVOID)((ULONG)b + (PBYTE)m))
#if defined(KDBG) || defined(DBG)

View File

@@ -75,7 +75,6 @@
#include "ntos/registry.h"
#include "ntos/security.h"
#include "ntos/synch.h"
#include "ntos/time.h"
#include "napi/i386/segment.h"
#include "napi/types.h"
#include "napi/dbg.h"

View File

@@ -2182,7 +2182,7 @@ RtlQueryInformationAcl (PACL Acl,
ACL_INFORMATION_CLASS InformationClass);
NTSTATUS STDCALL
RtlQueryTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
RtlQueryTimeZoneInformation (IN OUT TIME_ZONE_INFORMATION * TimeZoneInformation);
VOID STDCALL
RtlRaiseException (IN PEXCEPTION_RECORD ExceptionRecord);
@@ -2375,7 +2375,7 @@ RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,
PUCHAR RMControl);
NTSTATUS STDCALL
RtlSetTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation);
RtlSetTimeZoneInformation (IN OUT TIME_ZONE_INFORMATION * TimeZoneInformation);
ULONG STDCALL
RtlSizeHeap(

View File

@@ -136,7 +136,7 @@ ReadCacheSegmentChain(PBCB Bcb, ULONG ReadOffset, ULONG Length,
while (current2 != NULL && !current2->Valid && current_size < MAX_RW_LENGTH)
{
PVOID address = current2->BaseAddress;
for (i = 0; i < (Bcb->CacheSegmentSize / PAGE_SIZE); i++, address += PAGE_SIZE)
for (i = 0; i < (Bcb->CacheSegmentSize / PAGE_SIZE); i++, address = RVA(address, PAGE_SIZE))
{
*MdlPages++ = MmGetPfnForProcess(NULL, address);
}

View File

@@ -39,9 +39,8 @@ CcGetDirtyPages (
IN PVOID Context2
)
{
UNIMPLEMENTED;
LARGE_INTEGER i;
UNIMPLEMENTED;
i.QuadPart = 0;
return i;
}
@@ -69,9 +68,8 @@ CcGetLsnForFileObject (
OUT PLARGE_INTEGER OldestLsn OPTIONAL
)
{
UNIMPLEMENTED;
LARGE_INTEGER i;
UNIMPLEMENTED;
i.QuadPart = 0;
return i;
}

View File

@@ -121,8 +121,8 @@ CmpFindObject(POBJECT_ATTRIBUTES ObjectAttributes,
DPRINT("current %S\n",current);
CurrentHeader = BODY_TO_HEADER(CurrentObject);
DPRINT("Current ObjectType %wZ\n",
&CurrentHeader->Type->TypeName);
/*DPRINT("Current ObjectType %wZ\n",
&CurrentHeader->Type->TypeName);*/ /* ROX-U */
if (CurrentHeader->Type->TypeInfo.ParseProcedure == NULL)
{

View File

@@ -18,7 +18,7 @@
/* GLOBALS *******************************************************************/
POBJECT_TYPE EXPORTED ExEventPairObjectType = NULL;
POBJECT_TYPE ExEventPairObjectType = NULL;
static GENERIC_MAPPING ExEventPairMapping = {
STANDARD_RIGHTS_READ,

View File

@@ -496,7 +496,7 @@ ExpInitializeExecutive(VOID)
KeCreateApplicationProcessorIdleThread(KeNumberProcessors);
/* Allocate a stack for use when booting the processor */
ProcessorStack = Ki386InitialStackArray[((int)KeNumberProcessors)] + MM_STACK_SIZE;
ProcessorStack = RVA(Ki386InitialStackArray[((int)KeNumberProcessors)], MM_STACK_SIZE);
/* Tell HAL a new CPU is being started */
HalStartNextProcessor(0, (ULONG)ProcessorStack - 2*sizeof(FX_SAVE_AREA));

View File

@@ -835,6 +835,10 @@ ObpGetNextHandleByProcessCount(PSYSTEM_HANDLE_TABLE_ENTRY_INFO pshi,
/* Class 16 - Handle Information */
QSI_DEF(SystemHandleInformation)
{
PEPROCESS pr, syspr;
int curSize, i = 0;
ULONG hCount = 0;
PSYSTEM_HANDLE_INFORMATION Shi =
(PSYSTEM_HANDLE_INFORMATION) Buffer;
@@ -848,10 +852,6 @@ QSI_DEF(SystemHandleInformation)
DPRINT("SystemHandleInformation 1\n");
PEPROCESS pr, syspr;
int curSize, i = 0;
ULONG hCount = 0;
/* First Calc Size from Count. */
syspr = PsGetNextProcess(NULL);
pr = syspr;
@@ -937,6 +937,7 @@ QSI_DEF(SystemObjectInformation)
/* Class 18 - Information */
QSI_DEF(SystemPageFileInformation)
{
UNICODE_STRING FileName; /* FIXME */
SYSTEM_PAGEFILE_INFORMATION *Spfi = (SYSTEM_PAGEFILE_INFORMATION *) Buffer;
if (Size < sizeof (SYSTEM_PAGEFILE_INFORMATION))
@@ -945,7 +946,6 @@ QSI_DEF(SystemPageFileInformation)
return (STATUS_INFO_LENGTH_MISMATCH);
}
UNICODE_STRING FileName; /* FIXME */
RtlInitUnicodeString(&FileName, NULL); /* FIXME */
/* FIXME */
@@ -1321,7 +1321,7 @@ SSI_DEF(SystemCurrentTimeZoneInformation)
return STATUS_INFO_LENGTH_MISMATCH;
}
return ExpSetTimeZoneInformation((PTIME_ZONE_INFORMATION)Buffer);
return ExpSetTimeZoneInformation((TIME_ZONE_INFORMATION *)Buffer);
}

View File

@@ -76,7 +76,7 @@ ExpInitTimeZoneInfo(VOID)
NTSTATUS
ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation)
ExpSetTimeZoneInformation(TIME_ZONE_INFORMATION * TimeZoneInformation)
{
LARGE_INTEGER LocalTime;
LARGE_INTEGER SystemTime;

View File

@@ -149,7 +149,7 @@ static UCHAR LegalAnsiCharacterArray[] =
FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL /* 0x7f */
};
PUCHAR EXPORTED FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
PUCHAR FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
/* FUNCTIONS *****************************************************************/

View File

@@ -19,7 +19,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARCH_KE_H
#define __NTOSKRNL_INCLUDE_INTERNAL_ARCH_KE_H
#ifdef i386
#ifdef _M_IX86
#include "../i386/ke.h"
#else
#error "Unknown processor"

View File

@@ -19,7 +19,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARCH_MM_H
#define __NTOSKRNL_INCLUDE_INTERNAL_ARCH_MM_H
#ifdef i386
#ifdef _M_IX86
#include <internal/i386/mm.h>
#else
#error "Unknown processor"

View File

@@ -19,7 +19,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARCH_PS_H
#define __NTOSKRNL_INCLUDE_INTERNAL_ARCH_PS_H
#ifdef i386
#ifdef _M_IX86
#include <internal/i386/ps.h>
#define KiArchContextSwitch KiSwapContext
#define KiArchInitThreadWithContext Ke386InitThreadWithContext

View File

@@ -81,8 +81,8 @@
#else /* DBG */
#define CPRINT(args...)
#define DPRINT1(args...)
/*#define CPRINT(args...)
#define DPRINT1(args...)*/ /* ROX-U */
#ifndef __USE_W32API
#define assert(x)
#define ASSERT(x)

View File

@@ -185,7 +185,7 @@ ExfpInterlockedExchange64(LONGLONG volatile * Destination,
PLONGLONG Exchange);
NTSTATUS
ExpSetTimeZoneInformation(PTIME_ZONE_INFORMATION TimeZoneInformation);
ExpSetTimeZoneInformation(TIME_ZONE_INFORMATION * TimeZoneInformation);
NTSTATUS
ExpAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId);

View File

@@ -189,8 +189,7 @@ KeCreateApplicationProcessorIdleThread(ULONG Id);
typedef
VOID
STDCALL
(*PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine,
(STDCALL*PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine,
PVOID StartContext);
VOID
@@ -215,7 +214,7 @@ KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
#define LOCK "lock ; "
#else
#define LOCK ""
#define KeGetCurrentIrql(X) (((PKPCR)KPCR_BASE)->Irql)
#define KeGetCurrentIrql() (((PKPCR)KPCR_BASE)->Irql)
#endif
#if defined(__GNUC__)

View File

@@ -224,13 +224,13 @@ struct _KEXCEPTION_FRAME;
/* MACROS *************************************************************************/
#define KeEnterCriticalRegion(X) \
#define KeEnterCriticalRegion() \
{ \
PKTHREAD _Thread = KeGetCurrentThread(); \
if (_Thread) _Thread->KernelApcDisable--; \
}
#define KeLeaveCriticalRegion(X) \
#define KeLeaveCriticalRegion() \
{ \
PKTHREAD _Thread = KeGetCurrentThread(); \
if((_Thread) && (++_Thread->KernelApcDisable == 0)) \
@@ -354,8 +354,8 @@ extern PLOADER_MODULE CachedModules[MaximumCachedModuleType];
VOID STDCALL
DbgBreakPointNoBugCheck(VOID);
STDCALL
VOID
STDCALL
KeInitializeProfile(struct _KPROFILE* Profile,
struct _KPROCESS* Process,
PVOID ImageBase,
@@ -364,21 +364,22 @@ KeInitializeProfile(struct _KPROFILE* Profile,
KPROFILE_SOURCE ProfileSource,
KAFFINITY Affinity);
STDCALL
VOID
STDCALL
KeStartProfile(struct _KPROFILE* Profile,
PVOID Buffer);
STDCALL
VOID
STDCALL
KeStopProfile(struct _KPROFILE* Profile);
STDCALL
ULONG
STDCALL
KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource);
STDCALL
VOID
STDCALL
KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource,
ULONG Interval);

View File

@@ -10,10 +10,17 @@
/*
* Use these to place a function in a specific section of the executable
*/
#ifdef __GNUC__
#define PLACE_IN_SECTION(s) __attribute__((section (s)))
#define INIT_FUNCTION PLACE_IN_SECTION("init")
#define PAGE_LOCKED_FUNCTION PLACE_IN_SECTION("pagelk")
#define PAGE_UNLOCKED_FUNCTION PLACE_IN_SECTION("pagepo")
#else /* TODO */ /* ROX-U */
#define PLACE_IN_SECTION(s)
#define INIT_FUNCTION
#define PAGE_LOCKED_FUNCTION
#define PAGE_UNLOCKED_FUNCTION
#endif
#include <pshpack1.h>
/*

View File

@@ -160,7 +160,7 @@ typedef struct _ETHREAD
ULONG OwnsSessionWorkingSetShared:1;
ULONG ApcNeeded:1;
};
ULONG SameThreadPassiveFlags; /* 248 */
ULONG SameThreadApcFlags; /* 248 */
};
UCHAR ForwardClusterOnly; /* 24C */
UCHAR DisablePageFaultClustering; /* 24D */

View File

@@ -14,7 +14,7 @@
#undef IO_TYPE_FILE
#define IO_TYPE_FILE 0x0F5L /* Temp Hack */
#include <roscfg.h>
/*#include <roscfg.h>*/ /* ROX-U */
#include <reactos/version.h>
#include <reactos/resource.h>
#include <reactos/bugcodes.h>
@@ -78,4 +78,18 @@
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
#endif
NTSTATUS STDCALL
CcRosInitializeFileCache (PFILE_OBJECT FileObject,
ULONG CacheSegmentSize);
NTSTATUS STDCALL
CcRosReleaseFileCache (PFILE_OBJECT FileObject);
#define FSCTL_ROS_QUERY_LCN_MAPPING \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, FILE_ANY_ACCESS)
typedef struct _ROS_QUERY_LCN_MAPPING
{
LARGE_INTEGER LcnDiskOffset;
} ROS_QUERY_LCN_MAPPING, *PROS_QUERY_LCN_MAPPING;
#endif /* INCLUDE_NTOSKRNL_H */

View File

@@ -311,7 +311,11 @@ IopSaveBootLogToFile(VOID)
return;
}
Status = IopWriteLogFile(L"ReactOS "KERNEL_VERSION_STR);
#if 0 /* ROX-U */
Status = IopWriteLogFile(L"ReactOS " KERNEL_VERSION_WSTR);
#else
Status = IopWriteLogFile(L"ReactOS");
#endif
if (!NT_SUCCESS(Status))
{
DPRINT1("IopWriteLogFile() failed (Status %lx)\n", Status);

View File

@@ -337,8 +337,8 @@ INIT_FUNCTION
IopDisplayLoadingMessage(PVOID ServiceName,
BOOLEAN Unicode)
{
if (SetupMode) return;
CHAR TextBuffer[256];
if (SetupMode) return;
if (Unicode)
{
sprintf(TextBuffer, "Loading %S...\n", (PWCHAR)ServiceName);

View File

@@ -71,10 +71,10 @@ IopCreateFile(PVOID ObjectBody,
if (ParentObjectType != IoDeviceObjectType &&
ParentObjectType != IoFileObjectType)
{
DPRINT("Parent [%wZ] is a %S which is neither a file type nor a device type ; remaining path = %S\n",
/* ROX-U */ /*DPRINT("Parent [%wZ] is a %S which is neither a file type nor a device type ; remaining path = %S\n",
&BODY_TO_HEADER(Parent)->NameInfo->Name,
BODY_TO_HEADER(Parent)->Type->Name.Buffer,
RemainingPath);
RemainingPath);*/
return(STATUS_UNSUCCESSFUL);
}
@@ -427,7 +427,7 @@ IopQueryNameFile(PVOID ObjectBody,
ExFreePool (LocalInfo);
return Status;
}
DPRINT ("Device path: %wZ\n", &LocalInfo->Name);
/*DPRINT ("Device path: %wZ\n", &LocalInfo->Name);*/
/* Write Device Path */
Status = RtlAppendUnicodeStringToString(&ObjectNameInfo->Name,

View File

@@ -15,16 +15,16 @@
/* DATA ********************************************************************/
POBJECT_TYPE EXPORTED IoDeviceObjectType = NULL;
POBJECT_TYPE EXPORTED IoFileObjectType = NULL;
POBJECT_TYPE IoDeviceObjectType = NULL;
POBJECT_TYPE IoFileObjectType = NULL;
extern POBJECT_TYPE IoControllerObjectType;
ULONG EXPORTED IoReadOperationCount = 0;
LARGE_INTEGER EXPORTED IoReadTransferCount = {{0, 0}};
ULONG EXPORTED IoWriteOperationCount = 0;
LARGE_INTEGER EXPORTED IoWriteTransferCount = {{0, 0}};
ULONG IoOtherOperationCount = 0;
LARGE_INTEGER IoOtherTransferCount = {{0, 0}};
KSPIN_LOCK EXPORTED IoStatisticsLock = 0;
ULONG IoReadOperationCount = 0;
LARGE_INTEGER IoReadTransferCount = {{0, 0}};
ULONG IoWriteOperationCount = 0;
LARGE_INTEGER IoWriteTransferCount = {{0, 0}};
ULONG IoOtherOperationCount = 0;
LARGE_INTEGER IoOtherTransferCount = {{0, 0}};
KSPIN_LOCK IoStatisticsLock = 0;
GENERIC_MAPPING IopFileMapping = {
FILE_GENERIC_READ,

View File

@@ -618,14 +618,6 @@ IoBuildAsynchronousFsdRequest(ULONG MajorFunction,
AccessType = IoReadAccess;
}
/* Probe and Lock */
_SEH_FILTER(FreeAndGoOn)
{
/* Free the IRP and its MDL */
IoFreeMdl(Irp->MdlAddress);
IoFreeIrp(Irp);
return EXCEPTION_CONTINUE_SEARCH;
}
_SEH_TRY
{
/* Do the probe */

View File

@@ -19,8 +19,8 @@
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIRegistrationControl(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG Action
@@ -33,8 +33,8 @@ IoWMIRegistrationControl(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIAllocateInstanceIds(
IN GUID *Guid,
IN ULONG InstanceCount,
@@ -48,8 +48,8 @@ IoWMIAllocateInstanceIds(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMISuggestInstanceName(
IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
IN PUNICODE_STRING SymbolicLinkName OPTIONAL,
@@ -64,8 +64,8 @@ IoWMISuggestInstanceName(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIWriteEvent(
IN PVOID WnodeEventItem
)
@@ -77,8 +77,8 @@ IoWMIWriteEvent(
/*
* @unimplemented
*/
STDCALL
NTSTATUS IoWMIOpenBlock(
NTSTATUS
STDCALL IoWMIOpenBlock(
IN GUID *DataBlockGuid,
IN ULONG DesiredAccess,
OUT PVOID *DataBlockObject
@@ -91,8 +91,8 @@ NTSTATUS IoWMIOpenBlock(
/*
* @unimplemented
*/
STDCALL
NTSTATUS IoWMIQueryAllData(
NTSTATUS
STDCALL IoWMIQueryAllData(
IN PVOID DataBlockObject,
IN OUT ULONG *InOutBufferSize,
OUT PVOID OutBuffer
@@ -105,8 +105,8 @@ NTSTATUS IoWMIQueryAllData(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIQueryAllDataMultiple(
IN PVOID *DataBlockObjectList,
IN ULONG ObjectCount,
@@ -121,8 +121,8 @@ IoWMIQueryAllDataMultiple(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIQuerySingleInstance(
IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
@@ -137,8 +137,8 @@ IoWMIQuerySingleInstance(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIQuerySingleInstanceMultiple(
IN PVOID *DataBlockObjectList,
IN PUNICODE_STRING InstanceNames,
@@ -154,8 +154,8 @@ IoWMIQuerySingleInstanceMultiple(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMISetSingleInstance(
IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
@@ -171,8 +171,8 @@ IoWMISetSingleInstance(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMISetSingleItem(
IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
@@ -189,8 +189,8 @@ IoWMISetSingleItem(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIExecuteMethod(
IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
@@ -207,8 +207,8 @@ IoWMIExecuteMethod(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMISetNotificationCallback(
IN PVOID Object,
IN WMI_NOTIFICATION_CALLBACK Callback,
@@ -222,8 +222,8 @@ IoWMISetNotificationCallback(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIHandleToInstanceName(
IN PVOID DataBlockObject,
IN HANDLE FileHandle,
@@ -237,8 +237,8 @@ IoWMIHandleToInstanceName(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
IoWMIDeviceObjectToInstanceName(
IN PVOID DataBlockObject,
IN PDEVICE_OBJECT DeviceObject,

View File

@@ -89,7 +89,7 @@ KiIpiServiceRoutine(IN PKTRAP_FRAME TrapFrame,
#endif
}
}
((VOID STDCALL(*)(PVOID))(Prcb->SignalDone->WorkerRoutine))(Prcb->SignalDone->CurrentPacket[0]);
((VOID (STDCALL*)(PVOID))(Prcb->SignalDone->WorkerRoutine))(Prcb->SignalDone->CurrentPacket[0]);
Ke386TestAndClearBit(KeGetCurrentProcessorNumber(), &Prcb->SignalDone->TargetSet);
if (InterlockedCompareExchangeUL(&Prcb->SignalDone->CurrentPacket[2], 0, 0))
{
@@ -116,7 +116,7 @@ KiIpiServiceRoutine(IN PKTRAP_FRAME TrapFrame,
VOID
STDCALL
KiIpiSendPacket(ULONG TargetSet, VOID STDCALL (*WorkerRoutine)(PVOID), PVOID Argument, ULONG Count, BOOLEAN Synchronize)
KiIpiSendPacket(ULONG TargetSet, VOID (STDCALL*WorkerRoutine)(PVOID), PVOID Argument, ULONG Count, BOOLEAN Synchronize)
{
ULONG i, Processor, CurrentProcessor;
PKPRCB Prcb, CurrentPrcb;

View File

@@ -245,8 +245,8 @@ KeRemoveByKeyDeviceQueue (IN PKDEVICE_QUEUE DeviceQueue,
/*
* @unimplemented
*/
STDCALL
PKDEVICE_QUEUE_ENTRY
STDCALL
KeRemoveByKeyDeviceQueueIfBusy(IN PKDEVICE_QUEUE DeviceQueue,
IN ULONG SortKey)
{

View File

@@ -82,7 +82,9 @@ KeGetRecommendedSharedDataAlignment(VOID)
}
VOID
#ifdef __GNUC__
__attribute((noinline))
#endif
KiSystemStartup(BOOLEAN BootProcessor)
{
DPRINT("KiSystemStartup(%d)\n", BootProcessor);

View File

@@ -203,7 +203,9 @@ KiSwapProcess(PKPROCESS NewProcess,
{
/* FIXME: Write this in ASM. Much easier */
DPRINT("Switching CR3 to: %x\n", NewProcess->DirectoryTableBase.u.LowPart);
#if 0 /* ROX-U */
Ke386SetPageTableDirectory(NewProcess->DirectoryTableBase.u.LowPart);
#endif
}
/*

View File

@@ -22,8 +22,8 @@ ULONG KiProfileTimeInterval = 78125; /* Default resolution 7.8ms (sysinternals)
/* FUNCTIONS *****************************************************************/
STDCALL
VOID
STDCALL
KeInitializeProfile(PKPROFILE Profile,
PKPROCESS Process,
PVOID ImageBase,
@@ -40,14 +40,14 @@ KeInitializeProfile(PKPROFILE Profile,
Profile->Process = Process;
Profile->RegionStart = ImageBase;
Profile->BucketShift = BucketSize - 2; /* See ntinternals.net -- Alex */
Profile->RegionEnd = (PVOID)(ULONG_PTR)ImageBase + ImageSize;
Profile->RegionEnd = (PVOID)((ULONG_PTR)ImageBase + ImageSize);
Profile->Active = FALSE;
Profile->Source = ProfileSource;
Profile->Affinity = Affinity;
}
STDCALL
VOID
STDCALL
KeStartProfile(PKPROFILE Profile,
PVOID Buffer)
{
@@ -133,8 +133,8 @@ KeStartProfile(PKPROFILE Profile,
if (!FreeBuffer) ExFreePool(SourceBuffer);
}
STDCALL
VOID
STDCALL
KeStopProfile(PKPROFILE Profile)
{
KIRQL OldIrql;
@@ -178,8 +178,8 @@ KeStopProfile(PKPROFILE Profile)
if (CurrentSource) ExFreePool(CurrentSource);
}
STDCALL
ULONG
STDCALL
KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource)
{
/* Check if this is the timer profile */
@@ -200,8 +200,8 @@ KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource)
}
}
STDCALL
VOID
STDCALL
KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource,
ULONG Interval)
{
@@ -224,8 +224,8 @@ KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource,
/*
* @implemented
*/
STDCALL
VOID
STDCALL
KeProfileInterrupt(PKTRAP_FRAME TrapFrame)
{
/* Called from HAL for Timer Profiling */
@@ -257,7 +257,7 @@ KiParseProfileList(IN PKTRAP_FRAME TrapFrame,
}
/* Get the Pointer to the Bucket Value representing this EIP */
BucketValue = (PULONG)(((ULONG_PTR)(Profile->Buffer +
BucketValue = (PULONG)((((ULONG_PTR)Profile->Buffer +
(TrapFrame->Eip - (ULONG_PTR)Profile->RegionStart))
>> Profile->BucketShift) &~ 0x3);
@@ -276,8 +276,8 @@ KiParseProfileList(IN PKTRAP_FRAME TrapFrame,
* from the trap frame into the buffer, while using buckets and
* shifting like we specified. -- Alex
*/
STDCALL
VOID
STDCALL
KeProfileInterruptWithSource(IN PKTRAP_FRAME TrapFrame,
IN KPROFILE_SOURCE Source)
{
@@ -291,8 +291,8 @@ KeProfileInterruptWithSource(IN PKTRAP_FRAME TrapFrame,
/*
* @implemented
*/
STDCALL
VOID
STDCALL
KeSetProfileIrql(IN KIRQL ProfileIrql)
{
/* Set the IRQL at which Profiling will run */

View File

@@ -910,7 +910,7 @@ LdrPEProcessModule(
Protect = PAGE_EXECUTE_READWRITE;
}
#endif
if (PageAddress < DriverBase + DriverSize)
if (PageAddress < RVA(DriverBase, DriverSize))
{
MmSetPageProtect(NULL, PageAddress, Protect);
}
@@ -937,14 +937,14 @@ LdrPEProcessModule(
PageAddress = (PVOID)((ULONG_PTR)PageAddress + PAGE_SIZE);
while ((ULONG_PTR)PageAddress + PAGE_SIZE < (ULONG_PTR)BaseAddress + Length)
{
if (PageAddress < DriverBase + DriverSize)
if (PageAddress < RVA(DriverBase, DriverSize))
{
MmSetPageProtect(NULL, PageAddress, Protect);
}
PageAddress = (PVOID)((ULONG_PTR)PageAddress + PAGE_SIZE);
}
if (PageAddress < (PVOID)((ULONG_PTR)BaseAddress + Length) &&
PageAddress < DriverBase + DriverSize)
PageAddress < RVA(DriverBase, DriverSize))
{
Protect = LdrLookupPageProtection(PageAddress, DriverBase, &PENtHeaders->FileHeader, PESectionHeaders);
MmSetPageProtect(NULL, PageAddress, Protect);
@@ -1214,20 +1214,20 @@ LdrPEPerformRelocations (
Delta = (ULONG_PTR)DriverBase - NtHeaders->OptionalHeader.ImageBase;
RelocationDir = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)DriverBase + RelocationDDir->VirtualAddress);
RelocationEnd = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + RelocationDDir->Size);
MaxAddress = DriverBase + DriverSize;
MaxAddress = RVA(DriverBase, DriverSize);
while (RelocationDir < RelocationEnd &&
RelocationDir->SizeOfBlock > 0)
{
Count = (RelocationDir->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(USHORT);
Address = DriverBase + RelocationDir->VirtualAddress;
Address = RVA(DriverBase, RelocationDir->VirtualAddress);
TypeOffset = (PUSHORT)(RelocationDir + 1);
for (i = 0; i < Count; i++)
{
Offset = *TypeOffset & 0xFFF;
Type = *TypeOffset >> 12;
ShortPtr = (PUSHORT)(Address + Offset);
ShortPtr = (PUSHORT)(RVA(Address, Offset));
/* Don't relocate after the end of the loaded driver */
if ((PVOID)ShortPtr >= MaxAddress)
@@ -1277,6 +1277,10 @@ LdrPEPerformRelocations (
return STATUS_SUCCESS;
}
#ifndef PATH_MAX
#define PATH_MAX 260
#endif
static NTSTATUS
LdrPEGetOrLoadModule (
PMODULE_OBJECT Module,
@@ -1552,16 +1556,16 @@ LdrPEProcessImportDirectoryEntry(
}
/* Get the import address list. */
ImportAddressList = (PVOID*)(DriverBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk);
ImportAddressList = (PVOID*)RVA(DriverBase, ImportModuleDirectory->FirstThunk);
/* Get the list of functions to import. */
if (ImportModuleDirectory->OriginalFirstThunk != 0)
{
FunctionNameList = (PULONG) (DriverBase + (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk);
FunctionNameList = (PULONG)RVA(DriverBase, ImportModuleDirectory->OriginalFirstThunk);
}
else
{
FunctionNameList = (PULONG)(DriverBase + (ULONG_PTR)ImportModuleDirectory->FirstThunk);
FunctionNameList = (PULONG)RVA(DriverBase, ImportModuleDirectory->FirstThunk);
}
/* Walk through function list and fixup addresses. */

View File

@@ -195,8 +195,8 @@ found:;
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
LdrFindResourceDirectory_U(
IN PVOID BaseAddress,
IN PLDR_RESOURCE_INFO ResourceInfo,
@@ -211,8 +211,8 @@ LdrFindResourceDirectory_U(
/*
* @unimplemented
*/
STDCALL
NTSTATUS
STDCALL
LdrEnumResources(
IN PVOID BaseAddress,
IN PLDR_RESOURCE_INFO ResourceInfo,

View File

@@ -17,8 +17,6 @@
/* FUNCTIONS ****************************************************************/
#define RVA(m, b) ((ULONG)b + m)
NTSTATUS STDCALL
LdrGetProcedureAddress (IN PVOID BaseAddress,
IN PANSI_STRING Name,

View File

@@ -145,7 +145,7 @@ MmUnmapIoSpace (IN PVOID BaseAddress,
PVOID Address = BaseAddress;
Offset = (ULONG_PTR)Address % PAGE_SIZE;
Address -= Offset;
Address = RVA(Address, - Offset);
NumberOfBytes += Offset;
MmLockAddressSpace(MmGetKernelAddressSpace());

View File

@@ -28,8 +28,8 @@ MiCreatePebOrTeb(PEPROCESS Process,
PMADDRESS_SPACE ProcessAddressSpace = &Process->AddressSpace;
PMEMORY_AREA MemoryArea;
PHYSICAL_ADDRESS BoundaryAddressMultiple;
BoundaryAddressMultiple.QuadPart = 0;
PVOID AllocatedBase = BaseAddress;
BoundaryAddressMultiple.QuadPart = 0;
/* Acquire the Lock */
MmLockAddressSpace(ProcessAddressSpace);
@@ -54,7 +54,7 @@ MiCreatePebOrTeb(PEPROCESS Process,
TRUE,
FALSE,
BoundaryAddressMultiple);
AllocatedBase = AllocatedBase - PAGE_SIZE;
AllocatedBase = RVA(AllocatedBase, -PAGE_SIZE);
} while (Status != STATUS_SUCCESS);
/* Initialize the Region */
@@ -69,7 +69,7 @@ MiCreatePebOrTeb(PEPROCESS Process,
/* Unlock Address Space */
DPRINT("Returning\n");
MmUnlockAddressSpace(ProcessAddressSpace);
return AllocatedBase + PAGE_SIZE;
return RVA(AllocatedBase, PAGE_SIZE);
}
VOID
@@ -345,9 +345,9 @@ MmCreateProcessAddressSpace(IN PEPROCESS Process,
PVOID BaseAddress;
PMEMORY_AREA MemoryArea;
PHYSICAL_ADDRESS BoundaryAddressMultiple;
BoundaryAddressMultiple.QuadPart = 0;
ULONG ViewSize = 0;
PVOID ImageBase = 0;
BoundaryAddressMultiple.QuadPart = 0;
/* Initialize the Addresss Space */
MmInitializeAddressSpace(Process, ProcessAddressSpace);

View File

@@ -1952,7 +1952,7 @@ MmQuerySectionView(PMEMORY_AREA MemoryArea,
if (Section->AllocationAttributes & SEC_IMAGE)
{
Segment = MemoryArea->Data.SectionData.Segment;
Info->AllocationBase = MemoryArea->StartingAddress - Segment->VirtualAddress;
Info->AllocationBase = (PBYTE)MemoryArea->StartingAddress - Segment->VirtualAddress;
Info->Type = MEM_IMAGE;
}
else

View File

@@ -60,8 +60,8 @@ static VOID
ObpDecrementHandleCount(PVOID ObjectBody)
{
POBJECT_HEADER ObjectHeader = BODY_TO_HEADER(ObjectBody);
DPRINT("Header: %x\n", ObjectHeader);
LONG NewHandleCount = InterlockedDecrement(&ObjectHeader->HandleCount);
DPRINT("Header: %x\n", ObjectHeader);
DPRINT("NewHandleCount: %x\n", NewHandleCount);
DPRINT("HEADER_TO_OBJECT_NAME: %x\n", HEADER_TO_OBJECT_NAME(ObjectHeader));
@@ -833,7 +833,7 @@ ObReferenceObjectByHandle(HANDLE Handle,
if (ObjectType != NULL && ObjectType != ObjectHeader->Type)
{
DPRINT("ObjectType mismatch: %wZ vs %wZ (handle 0x%x)\n", &ObjectType->TypeName, ObjectHeader->Type ? &ObjectHeader->Type->TypeName : NULL, Handle);
/* ROX-U */ /*DPRINT("ObjectType mismatch: %wZ vs %wZ (handle 0x%x)\n", &ObjectType->TypeName, ObjectHeader->Type ? &ObjectHeader->Type->TypeName : NULL, Handle);*/
ExUnlockHandleTableEntry(HandleTable,
HandleEntry);
@@ -1008,14 +1008,14 @@ ObInsertObject(IN PVOID Object,
if (FoundHeader && FoundHeader->Type == ObDirectoryType &&
RemainingPath.Buffer)
{
ObpAddEntryDirectory(FoundObject, Header, NULL);
ObjectAttached = TRUE;
/* The name was changed so let's update it */
/* FIXME: TEMPORARY HACK This will go in ObFindObject in the next commit */
PVOID NewName;
PWSTR BufferPos = RemainingPath.Buffer;
ULONG Delta = 0;
ObpAddEntryDirectory(FoundObject, Header, NULL);
ObjectAttached = TRUE;
ObjectNameInfo = HEADER_TO_OBJECT_NAME(Header);
@@ -1141,8 +1141,8 @@ ObInsertObject(IN PVOID Object,
DesiredAccess,
ObjectCreateInfo->Attributes & OBJ_INHERIT,
Handle);
DPRINT("handle Created: %d. refcount. handlecount %d %d\n",
*Handle, Header->RefCount, Header->HandleCount);
/* ROX-U */ /*DPRINT("handle Created: %d. refcount. handlecount %d %d\n",
*Handle, Header->RefCount, Header->HandleCount);*/
}
/* We can delete the Create Info now */

View File

@@ -860,12 +860,12 @@ ObReferenceObjectByPointer(IN PVOID Object,
if (ObjectType != NULL && Header->Type != ObjectType)
{
DPRINT("Failed %p (type was %x %wZ) should be %x %wZ\n",
/* ROX-U */ /*DPRINT("Failed %p (type was %x %wZ) should be %x %wZ\n",
Header,
Header->Type,
&BODY_TO_HEADER(Header->Type)->NameInfo,
ObjectType,
&BODY_TO_HEADER(ObjectType)->NameInfo);
&BODY_TO_HEADER(ObjectType)->NameInfo);*/
return(STATUS_UNSUCCESSFUL);
}
if (Header->Type == PsProcessType)

View File

@@ -24,8 +24,8 @@ extern FAST_MUTEX PspActiveProcessMutex;
/* FUNCTIONS *****************************************************************/
STDCALL
VOID
STDCALL
PspReapRoutine(PVOID Context)
{
KIRQL OldIrql;

View File

@@ -173,8 +173,7 @@ PsInitProcessManagment(VOID)
ProcessObject,
sizeof(EPROCESS),
FALSE);
PsIdleProcess->Pcb.DirectoryTableBase =
(LARGE_INTEGER)(LONGLONG)(ULONG)MmGetPageDirectory();
PsIdleProcess->Pcb.DirectoryTableBase.QuadPart = (ULONG_PTR)MmGetPageDirectory();
strcpy(PsIdleProcess->ImageFileName, "Idle");
/*
@@ -234,6 +233,7 @@ PsInitProcessManagment(VOID)
InitializeListHead(&PsInitialSystemProcess->ThreadListHead);
#ifndef SCHED_REWRITE
{
PTOKEN BootToken;
/* No parent, this is the Initial System Process. Assign Boot Token */
@@ -241,6 +241,7 @@ PsInitProcessManagment(VOID)
BootToken->TokenInUse = TRUE;
PsInitialSystemProcess->Token.Object = BootToken; /* FIXME */
ObReferenceObject(BootToken);
}
#endif
}

View File

@@ -15,8 +15,8 @@
/* GLOBALS ******************************************************************/
PACL EXPORTED SePublicDefaultDacl = NULL;
PACL EXPORTED SeSystemDefaultDacl = NULL;
PACL SePublicDefaultDacl = NULL;
PACL SeSystemDefaultDacl = NULL;
PACL SePublicDefaultUnrestrictedDacl = NULL;
PACL SePublicOpenDacl = NULL;

View File

@@ -39,7 +39,7 @@ ExpAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId)
/* atomically increment the luid */
do
{
PrevLuid = (volatile LARGE_INTEGER)LuidValue;
PrevLuid = LuidValue;
NewLuid = RtlLargeIntegerAdd(PrevLuid,
LuidIncrement);
} while(ExfInterlockedCompareExchange64(&LuidValue.QuadPart,

View File

@@ -16,7 +16,7 @@
/* GLOBALS ******************************************************************/
PSE_EXPORTS EXPORTED SeExports = NULL;
PSE_EXPORTS SeExports = NULL;
SE_EXPORTS SepExports;
static ERESOURCE SepSubjectContextLock;

View File

@@ -1820,18 +1820,19 @@ SepCreateSystemProcessToken(VOID)
NTSTATUS Status;
ULONG uSize;
ULONG i;
ULONG uLocalSystemLength;
ULONG uWorldLength;
ULONG uAuthUserLength;
ULONG uAdminsLength;
PTOKEN AccessToken;
PVOID SidArea;
PAGED_CODE();
ULONG uLocalSystemLength = RtlLengthSid(SeLocalSystemSid);
ULONG uWorldLength = RtlLengthSid(SeWorldSid);
ULONG uAuthUserLength = RtlLengthSid(SeAuthenticatedUserSid);
ULONG uAdminsLength = RtlLengthSid(SeAliasAdminsSid);
PTOKEN AccessToken;
PVOID SidArea;
uLocalSystemLength = RtlLengthSid(SeLocalSystemSid);
uWorldLength = RtlLengthSid(SeWorldSid);
uAuthUserLength = RtlLengthSid(SeAuthenticatedUserSid);
uAdminsLength = RtlLengthSid(SeAliasAdminsSid);
/*
* Initialize the token
*/

View File

@@ -183,12 +183,12 @@ typedef struct _BATTERY_WAIT_STATUS {
CTL_CODE(FILE_DEVICE_BATTERY, 0x13, METHOD_BUFFERED, FILE_READ_ACCESS)
typedef NTSTATUS DDKAPI
(*BCLASS_DISABLE_STATUS_NOTIFY)(
typedef NTSTATUS
(DDKAPI*BCLASS_DISABLE_STATUS_NOTIFY)(
IN PVOID Context);
typedef NTSTATUS DDKAPI
(*BCLASS_QUERY_INFORMATION)(
typedef NTSTATUS
(DDKAPI*BCLASS_QUERY_INFORMATION)(
IN PVOID Context,
IN ULONG BatteryTag,
IN BATTERY_QUERY_INFORMATION_LEVEL Level,
@@ -197,26 +197,26 @@ typedef NTSTATUS DDKAPI
IN ULONG BufferLength,
OUT PULONG ReturnedLength);
typedef NTSTATUS DDKAPI
(*BCLASS_QUERY_STATUS)(
typedef NTSTATUS
(DDKAPI*BCLASS_QUERY_STATUS)(
IN PVOID Context,
IN ULONG BatteryTag,
OUT PBATTERY_STATUS BatteryStatus);
typedef NTSTATUS DDKAPI
(*BCLASS_QUERY_TAG)(
typedef NTSTATUS
(DDKAPI*BCLASS_QUERY_TAG)(
IN PVOID Context,
OUT PULONG BatteryTag);
typedef NTSTATUS DDKAPI
(*BCLASS_SET_INFORMATION)(
typedef NTSTATUS
(DDKAPI*BCLASS_SET_INFORMATION)(
IN PVOID Context,
IN ULONG BatteryTag,
IN BATTERY_SET_INFORMATION_LEVEL Level,
IN PVOID Buffer OPTIONAL);
typedef NTSTATUS DDKAPI
(*BCLASS_SET_STATUS_NOTIFY)(
typedef NTSTATUS
(DDKAPI*BCLASS_SET_STATUS_NOTIFY)(
IN PVOID Context,
IN ULONG BatteryTag,
IN PBATTERY_NOTIFY BatteryNotify);

View File

@@ -50,11 +50,11 @@ typedef CONST char *PCSZ;
#endif
#ifndef DECL_IMPORT
#define DECL_IMPORT __attribute__((dllimport))
#define DECL_IMPORT __declspec(dllimport)
#endif
#ifndef DECL_EXPORT
#define DECL_EXPORT __attribute__((dllexport))
#define DECL_EXPORT __declspec(dllexport)
#endif
/* Windows NT status codes */

View File

@@ -585,7 +585,7 @@ typedef struct _KAPC_STATE {
BOOLEAN KernelApcInProgress;
BOOLEAN KernelApcPending;
BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *__restrict PRKAPC_STATE;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
#if (VER_PRODUCTBUILD >= 2600)
@@ -2291,15 +2291,15 @@ FsRtlCheckLockForWriteAccess (
);
typedef
VOID NTAPI
(*POPLOCK_WAIT_COMPLETE_ROUTINE) (
VOID
(NTAPI*POPLOCK_WAIT_COMPLETE_ROUTINE) (
IN PVOID Context,
IN PIRP Irp
);
typedef
VOID NTAPI
(*POPLOCK_FS_PREPOST_IRP) (
VOID
(NTAPI*POPLOCK_FS_PREPOST_IRP) (
IN PVOID Context,
IN PIRP Irp
);

View File

@@ -43,8 +43,8 @@ typedef struct _PROCESSOR_IDLE_TIMES {
ULONG IdleHandlerReserved[4];
} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
typedef BOOLEAN DDKFASTAPI
(*PPROCESSOR_IDLE_HANDLER)(
typedef BOOLEAN
(DDKFASTAPI*PPROCESSOR_IDLE_HANDLER)(
IN OUT PPROCESSOR_IDLE_TIMES IdleTimes);
typedef struct _PROCESSOR_IDLE_HANDLER_INFO {
@@ -52,12 +52,12 @@ typedef struct _PROCESSOR_IDLE_HANDLER_INFO {
PPROCESSOR_IDLE_HANDLER Handler;
} PROCESSOR_IDLE_HANDLER_INFO, *PPROCESSOR_IDLE_HANDLER_INFO;
typedef VOID DDKFASTAPI
(*PSET_PROCESSOR_THROTTLE)(
typedef VOID
(DDKFASTAPI*PSET_PROCESSOR_THROTTLE)(
IN UCHAR Throttle);
typedef NTSTATUS DDKFASTAPI
(*PSET_PROCESSOR_THROTTLE2)(
typedef NTSTATUS
(DDKFASTAPI*PSET_PROCESSOR_THROTTLE2)(
IN UCHAR Throttle);
#define MAX_IDLE_HANDLERS 3
@@ -81,12 +81,12 @@ typedef enum _POWER_STATE_HANDLER_TYPE {
PowerStateMaximum
} POWER_STATE_HANDLER_TYPE, *PPOWER_STATE_HANDLER_TYPE;
typedef NTSTATUS DDKAPI
(*PENTER_STATE_SYSTEM_HANDLER)(
typedef NTSTATUS
(DDKAPI*PENTER_STATE_SYSTEM_HANDLER)(
IN PVOID SystemContext);
typedef NTSTATUS DDKAPI
(*PENTER_STATE_HANDLER)(
typedef NTSTATUS
(DDKAPI*PENTER_STATE_HANDLER)(
IN PVOID Context,
IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL,
IN PVOID SystemContext,
@@ -101,8 +101,8 @@ typedef struct _POWER_STATE_HANDLER {
PVOID Context;
} POWER_STATE_HANDLER, *PPOWER_STATE_HANDLER;
typedef NTSTATUS STDCALL
(*PENTER_STATE_NOTIFY_HANDLER)(
typedef NTSTATUS
(STDCALL*PENTER_STATE_NOTIFY_HANDLER)(
IN POWER_STATE_HANDLER_TYPE State,
IN PVOID Context,
IN BOOLEAN Entering);

View File

@@ -34,9 +34,9 @@ extern "C" {
/*
** Definitions specific to this Device Driver Kit
*/
#define DDKAPI __attribute__((stdcall))
#define DDKFASTAPI __attribute__((fastcall))
#define DDKCDECLAPI __attribute__((cdecl))
#define DDKAPI __stdcall
#define DDKFASTAPI __fastcall
#define DDKCDECLAPI __cdecl
#if defined(_NTOSKRNL_)
#ifndef NTOSAPI
@@ -128,11 +128,15 @@ static __inline struct _KPCR * KeGetCurrentKPCR(
VOID)
{
ULONG Value;
#if defined(__GNUC__)
__asm__ __volatile__ ("movl %%fs:0x1C, %0\n\t"
: "=r" (Value)
: /* no inputs */
);
#elif defined(_MSC_VER)
__asm mov eax, fs:[1Ch]
__asm mov [Value], eax
#endif
return (struct _KPCR *) Value;
}
@@ -140,11 +144,15 @@ static __inline struct _KPRCB * KeGetCurrentPrcb(
VOID)
{
ULONG Value;
#if defined(__GNUC__)
__asm__ __volatile__ ("movl %%fs:0x20, %0\n\t"
: "=r" (Value)
: /* no inputs */
);
#elif defined(_MSC_VER)
__asm mov eax, fs:[20h]
__asm mov [Value], eax
#endif
return (struct _KPRCB *) Value;
}
@@ -4331,8 +4339,8 @@ typedef struct _DISK_SIGNATURE {
} DUMMYUNIONNAME;
} DISK_SIGNATURE, *PDISK_SIGNATURE;
typedef VOID DDKFASTAPI
(*PTIME_UPDATE_NOTIFY_ROUTINE)(
typedef VOID
(DDKFASTAPI*PTIME_UPDATE_NOTIFY_ROUTINE)(
IN HANDLE ThreadId,
IN KPROCESSOR_MODE Mode);
@@ -8088,7 +8096,11 @@ KeMemoryBarrier(
VOID)
{
volatile LONG Barrier;
#if defined(__GNUC__)
__asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax");
#elif defined(_MSC_VER)
__asm xchg [Barrier], eax
#endif
}
NTOSAPI

View File

@@ -4,6 +4,9 @@
#pragma GCC system_header
#endif
/* TODO: some compilers support this */
#define RESTRICTED_POINTER
#define NTAPI __stdcall
#define OBJ_INHERIT 0x00000002
#define OBJ_PERMANENT 0x00000010

View File

@@ -118,6 +118,9 @@ extern "C" {
#elif defined(__WATCOMC__)
#define DECLSPEC_NORETURN
#define DECLARE_STDCALL_P( type ) type __stdcall
#elif defined(_MSC_VER)
#define DECLSPEC_NORETURN __declspec(noreturn)
#define DECLARE_STDCALL_P( type ) type __stdcall
#endif /* __GNUC__/__WATCOMC__ */
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
@@ -160,7 +163,7 @@ extern "C" {
#endif /* __cplusplus */
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
#endif /* NONAMELESSUNION */
#elif defined(__WATCOMC__)
#elif defined(__WATCOMC__) || defined(_MSC_VER)
#define _ANONYMOUS_UNION
#define _ANONYMOUS_STRUCT
#endif /* __GNUC__/__WATCOMC__ */

View File

@@ -1358,7 +1358,7 @@ typedef struct _GUID {
unsigned short Data3;
unsigned char Data4[8];
} GUID, *REFGUID, *LPGUID;
#define SYSTEM_LUID { QuadPart:999 }
#define SYSTEM_LUID { 0x3E7, 0x0 }
#endif /* GUID_DEFINED */
/* ACE Access Types, also in ntifs.h */
@@ -2039,7 +2039,10 @@ typedef union _ULARGE_INTEGER {
#endif /* NONAMELESSUNION */
ULONGLONG QuadPart;
} ULARGE_INTEGER, *PULARGE_INTEGER;
typedef LARGE_INTEGER LUID,*PLUID;
typedef struct _LUID {
DWORD LowPart;
LONG HighPart;
} LUID, *PLUID;
#pragma pack(push,4)
typedef struct _LUID_AND_ATTRIBUTES {
LUID Luid;
@@ -3413,17 +3416,6 @@ static __inline__ PVOID GetCurrentFiber(void)
return ret;
}
static __inline__ PVOID GetFiberData(void)
{
void* ret;
__asm__ __volatile__ (
"movl %%fs:0x10,%0\n"
"movl (%0),%0"
: "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
);
return ret;
}
static __inline__ struct _TEB * NtCurrentTeb(void)
{
struct _TEB *ret;
@@ -3437,7 +3429,7 @@ static __inline__ struct _TEB * NtCurrentTeb(void)
return ret;
}
#else
#elif defined(__WATCOMC__)
extern PVOID GetCurrentFiber(void);
#pragma aux GetCurrentFiber = \
@@ -3445,14 +3437,36 @@ extern PVOID GetCurrentFiber(void);
value [eax] \
modify [eax];
extern PVOID GetFiberData(void);
#pragma aux GetFiberData = \
"mov eax, dword ptr fs:0x10" \
"mov eax, [eax]" \
extern struct _TEB * NtCurrentTeb(void);
#pragma aux NtCurrentTeb = \
"mov eax, dword ptr fs:0x18" \
value [eax] \
modify [eax];
#endif /* __GNUC__ */
#elif defined(_MSC_VER)
static __inline PVOID GetCurrentFiber(void)
{
PVOID p;
__asm mov eax, fs:[10h]
__asm mov [p], eax
return p;
}
static __inline struct _TEB * NtCurrentTeb(void)
{
struct _TEB *p;
__asm mov eax, fs:[18h]
__asm mov [p], eax
return p;
}
#endif /* __GNUC__/__WATCOMC__/_MSC_VER */
static __inline PVOID GetFiberData(void)
{
return *((PVOID *)GetCurrentFiber());
}
#endif /* RC_INVOKED */

3
rosapps/.cvsignore Normal file
View File

@@ -0,0 +1,3 @@
*.zip
*.map
doxy-doc

118
rosapps/Makefile Normal file
View File

@@ -0,0 +1,118 @@
#
# Global makefile for the ROSAPPS package
#
include rules.mak
#
# Available applications
#
APPS = cmdutils \
cmdutils$(SEP)mode \
cmdutils$(SEP)touch \
demos$(SEP)maze \
devutils$(SEP)genguid \
devutils$(SEP)zoomin \
dflat32 \
games$(SEP)winemine \
games$(SEP)solitaire \
mc \
notevil \
packmgr$(SEP)lib \
packmgr$(SEP)cmd-line \
packmgr$(SEP)gui \
sysutils \
sysutils$(SEP)ctm \
sysutils$(SEP)kill \
sysutils$(SEP)tcat \
sysutils$(SEP)tlist \
net$(SEP)niclist \
net$(SEP)ncftp \
sysutils$(SEP)regexpl \
welcome \
winfile
all: $(APPS)
.PHONY: all
implib:
.PHONY: implib
clean: $(APPS:%=%_clean)
.PHONY: clean
install: $(APPS:%=%_install)
.PHONY: install
floppy: make_floppy_dirs $(APPS:%=%_floppy)
dist: clean_dist_dir make_dist_dirs $(APPS:%=%_dist)
.PHONY: dist
#
# Applications
#
$(APPS): %:
$(MAKE) -C $*
$(APPS:%=%_clean): %_clean:
$(MAKE) -C $* clean
$(APPS:%=%_floppy): %_floppy:
$(MAKE) -C $* floppy
$(APPS:%=%_dist): %_dist:
$(MAKE) -C $* dist
$(APPS:%=%_install): %_install:
$(MAKE) -C $* install
.PHONY: $(APPS) $(APPS:%=%_clean) $(APPS:%=%_floppy) $(APPS:%=%_dist) $(APPS:%=%_install)
#
# Make an install floppy
#
#install: all
# ./install.sh /mnt/hda1
make_floppy_dirs:
ifeq ($(DOSCLI),yes)
mkdir $(FLOPPY_DIR)\apps
else
mkdir $(FLOPPY_DIR)/apps
endif
.PHONY: make_floppy_dirs
#
# Make a distribution saveset
#
clean_dist_dir:
ifeq ($(DOSCLI),yes)
# $(RM) $(DIST_DIR)\apps\*.*
# $(RMDIR) $(DIST_DIR)\apps
# $(RMDIR) $(DIST_DIR)
else
$(RM) -r $(DIST_DIR)
endif
make_dist_dirs:
ifeq ($(DOSCLI),yes)
mkdir $(DIST_DIR)
mkdir $(DIST_DIR)\apps
else
mkdir $(DIST_DIR)
mkdir $(DIST_DIR)/apps
endif
#dist: $(TOOLS_PATH)/rcopy$(EXE_POSTFIX) dist_clean dist_dirs \
# $(WINE_MODULES:%=%_dist)
.PHONY: clean_dist_dir make_dist_dirs
# EOF

View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -1,52 +0,0 @@
<directory name="mode">
<xi:include href="mode/mode.xml" />
</directory>
<directory name="touch">
<xi:include href="touch/touch.xml" />
</directory>
<module name="find" type="win32cui" installbase="system32" installname="find.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>find.c</file>
<file>find.rc</file>
</module>
<module name="more" type="win32cui" installbase="system32" installname="more.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>more.c</file>
<file>more.rc</file>
</module>
<module name="sort" type="win32cui" installbase="system32" installname="sort.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>sort.c</file>
<file>sort.rc</file>
</module>
<module name="tee" type="win32cui" installbase="system32" installname="tee.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>tee.c</file>
<file>tee.rc</file>
</module>
<module name="y" type="win32cui" installbase="system32" installname="y.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>y.c</file>
<file>y.rc</file>
</module>

67
rosapps/cmdutils/makefile Normal file
View File

@@ -0,0 +1,67 @@
#
# ReactOS cmdutils makefile
#
PATH_TO_TOP=..
TARGET=find.exe more.exe sort.exe tee.exe y.exe
all: $(TARGET)
CLEAN_FILES = *.o *.exe *.sym *.coff
find.exe: find.o find.coff
$(CC) find.o -lkernel32 -lmsvcrt -o find.exe find.coff
$(NM) --numeric-sort find.exe > find.sym
more.exe: more.o more.coff
$(CC) more.o -lkernel32 -lmsvcrt -o more.exe more.coff
$(NM) --numeric-sort more.exe > more.sym
sort.exe: sort.o sort.coff
$(CC) sort.o -lkernel32 -lmsvcrt -o sort.exe sort.coff
$(NM) --numeric-sort sort.exe > sort.sym
tee.exe: tee.o tee.coff
$(CC) tee.o -lkernel32 -lmsvcrt -o tee.exe tee.coff
$(NM) --numeric-sort tee.exe > tee.sym
y.exe: y.o y.coff
$(CC) y.o -lkernel32 -lmsvcrt -o y.exe y.coff
$(NM) --numeric-sort y.exe > y.sym
install:
.phony: install
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:
- $(RM) $*
.phony: clean $(CLEAN_FILES:%=%_clean)
floppy: $(TARGET:%=$(FLOPPY_DIR)/apps/%)
$(TARGET:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(FLOPPY_DIR)\apps\$*
else
$(CP) $* $(FLOPPY_DIR)/apps/$*
endif
dist: $(TARGET:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%)
$(TARGET:%=$(PATH_TO_TOP)/$(DIST_DIR)/apps/%): $(PATH_TO_TOP)/$(DIST_DIR)/apps/%: %
ifeq ($(DOSCLI),yes)
$(CP) $* $(PATH_TO_TOP)\$(DIST_DIR)\apps\$*
else
$(CP) $* $(PATH_TO_TOP)/$(DIST_DIR)/apps/$*
endif
include $(PATH_TO_TOP)/rules.mak

View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -0,0 +1,20 @@
PATH_TO_TOP=../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = mode
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_CFLAGS = -D__USE_W32API
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,10 +0,0 @@
<module name="mode" type="win32cui" installbase="system32" installname="mode.exe" warnings="true">
<include base="mode">.</include>
<include base="mode">.</include>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<file>mode.c</file>
<file>mode.rc</file>
</module>

View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -0,0 +1,21 @@
PATH_TO_TOP=../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = touch
TARGET_SDKLIBS = ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o \
err.o
TARGET_GCCLIBS = iberty
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,10 +0,0 @@
<module name="touch" type="win32cui" installbase="system32" installname="touch.exe" warnings="true">
<include base="touch">.</include>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>ntdll</library>
<file>err.c</file>
<file>touch.c</file>
<file>touch.rc</file>
</module>

View File

@@ -1,3 +0,0 @@
<directory name="maze">
<xi:include href="maze/maze.xml" />
</directory>

View File

@@ -0,0 +1,7 @@
maze.exe
maze.nostrip.exe
maze.sym
maze.coff
.*.d
*.o
*.map

View File

@@ -1,9 +0,0 @@
<module name="maze" type="win32gui" installbase="system32" installname="maze.exe">
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="__USE_W32API" />
<library>kernel32</library>
<library>gdi32</library>
<file>maze.c</file>
<file>maze.rc</file>
</module>

View File

@@ -1,11 +0,0 @@
<directory name="gdb2">
<xi:include href="gdb2/gdb2.xml" />
</directory>
<directory name="genguid">
<xi:include href="genguid/genguid.xml" />
</directory>
<directory name="zoomin">
<xi:include href="zoomin/zoomin.xml" />
</directory>

View File

@@ -0,0 +1,13 @@
# $Id: Makefile,v 1.1 2001/04/15 23:43:12 narnaoud Exp $
#
# ReactOS makefile for gdb2
#
include ../../rules.mak
TARGET_NAME=gdb2
all: $(TARGET_NAME)$(EXE_POSTFIX)
gdb2.exe : gdb2.cpp ph.h
gcc gdb2.cpp -o gdb2.exe

View File

@@ -1,7 +0,0 @@
<module name="gdb2" type="win32cui" installbase="system32" installname="gdb2.exe">
<include base="gdb2">.</include>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<file>gdb2.cpp</file>
</module>

View File

@@ -0,0 +1,12 @@
*.exe
*.o
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -0,0 +1,23 @@
# $Id: Makefile,v 1.1 2003/08/22 07:26:41 sedwards Exp $
PATH_TO_TOP = ../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = genguid
TARGET_CFLAGS = -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__USE_W32API
TARGET_SDKLIBS = kernel32.a
TARGET_GCCLIBS = ole32 uuid
TARGET_OBJECTS = genguid.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,9 +0,0 @@
<module name="genguid" type="win32cui" installbase="system32" installname="genguid.exe">
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<library>ole32</library>
<library>uuid</library>
<file>genguid.c</file>
</module>

View File

@@ -0,0 +1,12 @@
*.exe
*.o
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -0,0 +1,42 @@
# $Id: makefile,v 1.2 2004/06/02 02:27:04 royce Exp $
#
# ReactOS zoomin
#
# Makefile
#
# Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
PATH_TO_TOP = ../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = zoomin
TARGET_CFLAGS = -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__USE_W32API
TARGET_SDKLIBS = kernel32.a gdi32.a user32.a
TARGET_OBJECTS = framewnd.o main.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,12 +0,0 @@
<module name="zoomin" type="win32gui" installbase="system32" installname="zoomin.exe">
<include base="zoomin">.</include>
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="__USE_W32API" />
<library>kernel32</library>
<library>gdi32</library>
<library>user32</library>
<file>framewnd.c</file>
<file>main.c</file>
<file>zoomin.rc</file>
</module>

View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -1,53 +0,0 @@
<module name="dflat32" type="win32cui" installbase="system32" installname="dflat32.exe" warnings="true">
<include base="ReactOS">include/wine</include>
<include base="dflat32">.</include>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<library>gdi32</library>
<file>applicat.c</file>
<file>barchart.c</file>
<file>box.c</file>
<file>button.c</file>
<file>calendar.c</file>
<file>checkbox.c</file>
<file>clipbord.c</file>
<file>combobox.c</file>
<file>config.c</file>
<file>console.c</file>
<file>decomp.c</file>
<file>dfalloc.c</file>
<file>dialbox.c</file>
<file>dialogs.c</file>
<file>direct.c</file>
<file>edit.c</file>
<file>editbox.c</file>
<file>fileopen.c</file>
<file>helpbox.c</file>
<file>htree.c</file>
<file>keys.c</file>
<file>listbox.c</file>
<file>lists.c</file>
<file>log.c</file>
<file>menu.c</file>
<file>menubar.c</file>
<file>menus.c</file>
<file>message.c</file>
<file>msgbox.c</file>
<file>normal.c</file>
<file>pictbox.c</file>
<file>popdown.c</file>
<file>radio.c</file>
<file>rect.c</file>
<file>search.c</file>
<file>slidebox.c</file>
<file>spinbutt.c</file>
<file>statbar.c</file>
<file>sysmenu.c</file>
<file>text.c</file>
<file>textbox.c</file>
<file>video.c</file>
<file>watch.c</file>
<file>window.c</file>
</module>

41
rosapps/dflat32/makefile Normal file
View File

@@ -0,0 +1,41 @@
#
# ReactOS D-Flat/32
#
# Makefile
#
PATH_TO_TOP = ../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = edit
WINE_MODE = yes
WINE_RC = $(TARGET_NAME)
WINE_INCLUDE = ./
TARGET_CFLAGS = -D__USE_W32API
#WITH_DEBUGGING=yes
TARGET_SDKLIBS = \
kernel32.a \
user32.a
TARGET_OBJECTS = \
applicat.o barchart.o box.o button.o calendar.o checkbox.o clipbord.o \
combobox.o config.o console.o decomp.o dfalloc.o dialbox.o dialogs.o \
direct.o edit.o editbox.o fileopen.o helpbox.o htree.o keys.o \
listbox.o lists.o log.o menu.o menubar.o menus.o message.o msgbox.o \
normal.o pictbox.o popdown.o radio.o rect.o search.o slidebox.o spinbutt.o \
statbar.o sysmenu.o text.o textbox.o video.o watch.o window.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,55 +0,0 @@
<directory name="cmdutils">
<xi:include href="cmdutils/cmdutils.xml" />
</directory>
<directory name="demos">
<xi:include href="demos/directory.xml" />
</directory>
<directory name="devutils">
<xi:include href="devutils/directory.xml" />
</directory>
<directory name="dflat32">
<xi:include href="dflat32/dflat32.xml" />
</directory>
<directory name="games">
<xi:include href="games/directory.xml" />
</directory>
<!--
<directory name="lib">
<xi:include href="lib/directory.xml" />
</directory>
-->
<directory name="mc">
<xi:include href="mc/mc.xml" />
</directory>
<directory name="net">
<xi:include href="net/directory.xml" />
</directory>
<directory name="notevil">
<xi:include href="notevil/notevil.xml" />
</directory>
<directory name="packmgr">
<xi:include href="packmgr/directory.xml" />
</directory>
<directory name="sysutils">
<xi:include href="sysutils/sysutils.xml" />
</directory>
<directory name="templates">
<xi:include href="templates/directory.xml" />
</directory>
<!--
<directory name="welcome">
<xi:include href="welcome/welcome.xml" />
</directory>
-->
<directory name="winfile">
<xi:include href="winfile/winfile.xml" />
</directory>

View File

@@ -1,7 +0,0 @@
<directory name="solitaire">
<xi:include href="solitaire/solitaire.xml" />
</directory>
<directory name="winemine">
<xi:include href="winemine/winemine.xml" />
</directory>

View File

@@ -0,0 +1,44 @@
PATH_TO_TOP = ../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = windows
# change to console for debugging purposes...
#TARGET_APPTYPE = console
TARGET_INSTALLDIR = system32
TARGET_NAME = sol
TARGET_SDKLIBS = kernel32.a user32.a gdi32.a cards.a comctl32.a
TARGET_GCCLIBS = stdc++
TARGET_OBJECTS = $(SOL_OBJECTS) $(CARDLIB_OBJECTS)
SOL_OBJECTS = \
solcreate.o \
solgame.o \
solitaire.o
CARDLIB_OBJECTS = \
cardlib/cardbitmaps.o \
cardlib/cardbutton.o \
cardlib/cardcolor.o \
cardlib/cardcount.o \
cardlib/cardlib.o \
cardlib/cardregion.o \
cardlib/cardrgndraw.o \
cardlib/cardrgnmouse.o \
cardlib/cardstack.o \
cardlib/cardwindow.o \
cardlib/dropzone.o
TARGET_CPPFLAGS = -Icardlib -Wall -D__USE_W32API -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__REACTOS__
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,33 +0,0 @@
<module name="sol" type="win32gui" installbase="system32" installname="solitaire.exe" warnings="true">
<include base="sol">.</include>
<include base="sol">cardlib</include>
<linkerflag>-lstdc++</linkerflag>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="__REACTOS__" />
<library>kernel32</library>
<library>user32</library>
<library>gdi32</library>
<library>cards</library>
<library>comctl32</library>
<file>solcreate.cpp</file>
<file>solgame.cpp</file>
<file>solitaire.cpp</file>
<directory name="cardlib">
<file>cardbitmaps.cpp</file>
<file>cardbutton.cpp</file>
<file>cardcolor.cpp</file>
<file>cardcount.cpp</file>
<file>cardlib.cpp</file>
<file>cardregion.cpp</file>
<file>cardrgndraw.cpp</file>
<file>cardrgnmouse.cpp</file>
<file>cardstack.cpp</file>
<file>cardwindow.cpp</file>
<file>dropzone.cpp</file>
</directory>
<file>sol.rc</file>
</module>

View File

@@ -0,0 +1,6 @@
*.o
*.d
*.exe
*.coff
*.sym
*.map

View File

@@ -0,0 +1,21 @@
# $Id$
PATH_TO_TOP = ../../../reactos
TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = winemine
TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = main.o dialog.o
TARGET_CFLAGS = -D__USE_W32API
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

View File

@@ -1,10 +0,0 @@
<module name="winemine" type="win32gui" installbase="system32" installname="winemine.exe">
<include base="winemine">.</include>
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<library>kernel32</library>
<library>gdi32</library>
<file>main.c</file>
<file>dialog.c</file>
</module>

View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

View File

@@ -1,43 +0,0 @@
<module name="dflat32lib" type="win32dll" baseadress="0x98000000" installbase="system32" installname="dflat32.dll">
<importlibrary definition="dflat32.def" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x0501</define>
<define name="_WIN32_WINNT">0x0501</define>
<file>applicat.c</file>
<file>box.c</file>
<file>checkbox.c</file>
<file>clipbord.c</file>
<file>config.c</file>
<file>console.c</file>
<file>decomp.c</file>
<file>dfalloc.c</file>
<file>dialbox.c</file>
<file>dialogs.c</file>
<file>dllmain.c</file>
<file>editbox.c</file>
<file>lists.c</file>
<file>helpbox.c</file>
<file>listbox.c</file>
<file>log.c</file>
<file>message.c</file>
<file>menu.c</file>
<file>menubar.c</file>
<file>menus.c</file>
<file>msgbox.c</file>
<file>normal.c</file>
<file>pictbox.c</file>
<file>popdown.c</file>
<file>keys.c</file>
<file>radio.c</file>
<file>rect.c</file>
<file>spinbutt.c</file>
<file>statbar.c</file>
<file>stubs.c</file>
<file>sysmenu.c</file>
<file>text.c</file>
<file>textbox.c</file>
<file>video.c</file>
<file>watch.c</file>
<file>window.c</file>
</module>

View File

@@ -1,3 +0,0 @@
<directory name="dflat32">
<xi:include href="dflat32/dflat32.xml" />
</directory>

17
rosapps/mc/.cvsignore Normal file
View File

@@ -0,0 +1,17 @@
*.sys
*.exe
*.dll
*.cpl
*.a
*.o
*.d
*.coff
*.dsp
*.dsw
*.aps
*.ncb
*.opt
*.sym
*.plg
*.bak
*.map

106
rosapps/mc/Makefile Normal file
View File

@@ -0,0 +1,106 @@
#
# ReactOS mc
#
# Makefile
#
PATH_TO_TOP = ../../reactos
TARGET_TYPE = program
TARGET_OS = NT
TARGET_APPTYPE = console
TARGET_NAME = mc
TARGET_CFLAGS = -I./pc -I./slang -DMC_$(TARGET_OS) -DHAVE_CONFIG_H -D__USE_W32API
TARGET_SDKLIBS = \
kernel32.a \
user32.a
MC_OBJS = \
./src/terms.o \
./src/user.o \
./src/file.o \
./src/listmode.o \
./src/cmd.o \
./src/command.o \
./src/help.o \
./src/menu.o \
./src/view.o \
./src/dir.o \
./src/info.o \
./src/widget.o \
./src/option.o \
./src/dlg.o \
./src/panelize.o \
./src/profile.o \
./src/util.o \
./src/dialog.o \
./src/ext.o \
./src/color.o \
./src/layout.o \
./src/setup.o \
./src/regex.o \
./src/hotlist.o \
./src/tree.o \
./src/win.o \
./src/complete.o \
./src/find.o \
./src/wtools.o \
./src/boxes.o \
./src/background.o \
./src/main.o \
./src/popt.o \
./src/text.o \
./src/screen.o
PC_OBJS= \
./pc/slint_pc.o \
./pc/chmod.o \
./pc/drive.o
NT_OBJS = \
./pc/cons_nt.o \
./pc/dirent_nt.o \
./pc/key_nt.o \
./pc/util_win32.o \
./pc/util_winnt.o \
./pc/util_nt.o
SLANG_NT = slw32tty.o
SLANG_OS2 = slos2tty.o
SLANG_OBJS = \
./slang/slerr.o \
./slang/slgetkey.o \
./slang/slsmg.o \
./slang/slvideo.o \
./slang/$(SLANG_$(TARGET_OS))
MCEDIT_OBJS = \
./edit/edit.o \
./edit/editcmd.o \
./edit/editdraw.o \
./edit/editmenu.o \
./edit/editoptions.o \
./edit/editwidget.o \
./edit/syntax.o \
./edit/wordproc.o
TARGET_OBJECTS = \
$(MC_OBJS) \
$(PC_OBJS) \
$(NT_OBJS) \
$(SLANG_OBJS) \
$(MCEDIT_OBJS) \
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
# EOF

0
rosapps/mc/doc/Makefile Normal file
View File

View File

@@ -0,0 +1,2 @@
*.o
*.map

86
rosapps/mc/edit/Makefile Normal file
View File

@@ -0,0 +1,86 @@
# Generated automatically from Makefile.in by configure.
srcdir = .
rootdir = $(srcdir)/..
include ../Make.common
CFLAGS = $(XCFLAGS)
CPPFLAGS = $(XCPPFLAGS)
LDFLAGS = $(XLDFLAGS)
DEFS = $(XDEFS)
LIBS = $(XLIBS) $(XLIB)
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
AR = /usr/bin/ar
#
# Distribution variables
#
EDITSRC = edit.c editcmd.c editwidget.c edit_key_translator.c editdraw.c \
edit.h editmenu.c editcmddef.h wordproc.c syntax.c editoptions.c
EDITOBJS = edit.o editcmd.o editwidget.o editdraw.o editmenu.o wordproc.o \
syntax.o editoptions.o
DIST = Makefile.in README.edit $(EDITSRC)
all: libedit.a
.c.o:
$(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) -DMIDNIGHT $<
check:
@echo no tests are supplied.
libedit.a: $(EDITOBJS)
$(RMF) $@
$(AR) cr $@ $(EDITOBJS)
-$(RANLIB) $@
mcedit:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
$(LN_S) mc $(DESTDIR)$(bindir)/$(binprefix)mcedit
showlibdep:
@echo 'OBJS="$(EDITOBJS)"'
cross:
$(MAKE) CC=gcc-linux CPP="gcc-linux -E" \
CPPFLAGS="$(CPPFLAGS) -I/usr/local/lib/gcc-lib/i386-linux-linux/include/ncurses "
TAGS: $(EDITSRC)
etags $(EDITSRC)
clean:
$(RMF) *.o core a.out libedit.a
realclean: clean
$(RMF) .depend
$(RMF) TAGS
$(RMF) *~
distclean:
-$(RMF) $(srcdir)/*~ $(srcdir)/*.o $(srcdir)/a.out
-$(RMF) $(srcdir)/core $(srcdir)/libedit.a
-if test $(srcdir) = .; then $(MAKE) realclean; fi
-$(RMF) $(srcdir)/Makefile
install: mcedit
uninstall:
-$(RMF) $(DESTDIR)$(bindir)/$(binprefix)mcedit
distcopy:
$(CP) $(DIST) ../../mc-$(VERSION)/edit
depend dep: mcdep
fastdeploc:
# ***Dependencies***Do not edit***
ifeq (.depend,$(wildcard .depend))
include .depend
endif
# ***End of dependencies***

View File

@@ -1,83 +0,0 @@
<module name="mc" type="win32cui" installbase="system32" installname="mc.exe" warnings="true">
<include base="mc">src</include>
<include base="mc">pc</include>
<include base="mc">slang</include>
<include base="mc">edit</include>
<define name="__USE_W32API" />
<define name="DMC_NT" />
<define name="_OS_NT" />
<define name="HAVE_CONFIG_H" />
<library>kernel32</library>
<library>user32</library>
<directory name="src">
<file>terms.c</file>
<file>user.c</file>
<file>file.c</file>
<file>listmode.c</file>
<file>cmd.c</file>
<file>command.c</file>
<file>help.c</file>
<file>menu.c</file>
<file>view.c</file>
<file>dir.c</file>
<file>info.c</file>
<file>widget.c</file>
<file>option.c</file>
<file>dlg.c</file>
<file>panelize.c</file>
<file>profile.c</file>
<file>util.c</file>
<file>dialog.c</file>
<file>ext.c</file>
<file>color.c</file>
<file>layout.c</file>
<file>setup.c</file>
<file>regex.c</file>
<file>hotlist.c</file>
<file>tree.c</file>
<file>win.c</file>
<file>complete.c</file>
<file>find.c</file>
<file>wtools.c</file>
<file>boxes.c</file>
<file>background.c</file>
<file>main.c</file>
<file>popt.c</file>
<file>text.c</file>
<file>screen.c</file>
</directory>
<directory name="pc">
<file>slint_pc.c</file>
<file>chmod.c</file>
<file>drive.c</file>
<file>cons_nt.c</file>
<file>dirent_nt.c</file>
<file>key_nt.c</file>
<file>util_win32.c</file>
<file>util_winnt.c</file>
<file>util_nt.c</file>
</directory>
<directory name="slang">
<file>slerr.c</file>
<file>slgetkey.c</file>
<file>slsmg.c</file>
<file>slvideo.c</file>
<file>slw32tty.c</file>
</directory>
<directory name="edit">
<file>edit.c</file>
<file>editcmd.c</file>
<file>editdraw.c</file>
<file>editmenu.c</file>
<file>editoptions.c</file>
<file>editwidget.c</file>
<file>syntax.c</file>
<file>wordproc.c</file>
</directory>
<file>mc.rc</file>
</module>

2
rosapps/mc/pc/.cvsignore Normal file
View File

@@ -0,0 +1,2 @@
*.o
*.map

28
rosapps/mc/pc/Makefile Normal file
View File

@@ -0,0 +1,28 @@
TARGET_OS=NT
CC=gcc
LINK=gcc -s
OBJ_SUFFIX=o
OBJ_PLACE=-o
EXE_PLACE=-o
# ---- Compiler-specific optional stuff
MC_MISC_CFLAGS=
OBJS_DIR=release
EXTRA_MC_SRCS=
SPECIFIC_DEFINES=
SPECIFIC_MC_CFLAGS=-O2 $(MC_MISC_CFLAGS)
SPECIFIC_MC_LFLAGS_EXTRA=
SPECIFIC_SLANG_CFLAGS=$(SPECIFIC_MC_CFLAGS)
SPECIFIC_MCEDIT_CFLAGS=$(SPECIFIC_MC_CFLAGS)
# ---- Compiler independent defines
include Makefile.PC
# ---- Linkers are very compiler-specific
SPECIFIC_MC_LFLAGS=$(SPECIFIC_MC_LFLAGS_EXTRA)
MC_LIBS= # -lintl
$(MC_EXE): $(OBJS) $(MCEDIT_OBJS) $(SLANG_OBJS)
$(LINK) $(EXE_PLACE) $(MC_EXE) $(SPECIFIC_MC_LFLAGS) $+ $(MC_LIBS)

Some files were not shown because too many files have changed in this diff Show More