ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
669 discussions
Start a n
N
ew thread
[hpoussin] 17519: Cleanup i8042prt.h
by hpoussin@svn.reactos.com
Cleanup i8042prt.h Remove $Id$ tags Replace Win32 types by their kernel counterparts (DWORD -> ULONG, ...) Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.h Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c Modified: trunk/reactos/drivers/input/i8042prt/mouse.c Modified: trunk/reactos/drivers/input/i8042prt/ps2pp.c Modified: trunk/reactos/drivers/input/i8042prt/registry.c Property changes on: trunk/reactos/drivers/input/i8042prt/README.txt ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c --- trunk/reactos/drivers/input/i8042prt/i8042prt.c 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/i8042prt.c 2005-08-24 20:34:50 UTC (rev 17519) @@ -10,11 +10,9 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - +#ifndef NDEBUG #define NDEBUG +#endif #include <debug.h> #include "i8042prt.h" @@ -34,18 +32,18 @@ /* * FUNCTION: Write data to a port, waiting first for it to become ready */ -BOOLEAN I8042Write(PDEVICE_EXTENSION DevExt, int addr, BYTE data) +BOOLEAN I8042Write(PDEVICE_EXTENSION DevExt, PUCHAR addr, UCHAR data) { ULONG ResendIterations = DevExt->Settings.PollingIterations; - while ((KBD_IBF & READ_PORT_UCHAR((PUCHAR)I8042_CTRL_PORT)) && + while ((KBD_IBF & READ_PORT_UCHAR(I8042_CTRL_PORT)) && (ResendIterations--)) { KeStallExecutionProcessor(50); } if (ResendIterations) { - WRITE_PORT_UCHAR((PUCHAR)addr,data); + WRITE_PORT_UCHAR(addr,data); DPRINT("Sent %x to %x\n", data, addr); return TRUE; } @@ -56,7 +54,7 @@ /* * FUNCTION: Write data to a port, without waiting first */ -static BOOLEAN I8042WriteNoWait(PDEVICE_EXTENSION DevExt, int addr, BYTE data) +static BOOLEAN I8042WriteNoWait(PDEVICE_EXTENSION DevExt, int addr, UCHAR data) { WRITE_PORT_UCHAR((PUCHAR)addr,data); DPRINT("Sent %x to %x\n", data, addr); @@ -67,10 +65,10 @@ /* * FUNCTION: Read data from port 0x60 */ -NTSTATUS I8042ReadData(BYTE *Data) +NTSTATUS I8042ReadData(UCHAR *Data) { - BYTE Status; - Status=READ_PORT_UCHAR((PUCHAR)I8042_CTRL_PORT); + UCHAR Status; + Status=READ_PORT_UCHAR(I8042_CTRL_PORT); // If data is available if ((Status & KBD_OBF)) { @@ -84,16 +82,16 @@ return STATUS_UNSUCCESSFUL; } -NTSTATUS I8042ReadStatus(BYTE *Status) +NTSTATUS I8042ReadStatus(UCHAR *Status) { - Status[0]=READ_PORT_UCHAR((PUCHAR)I8042_CTRL_PORT); + Status[0]=READ_PORT_UCHAR(I8042_CTRL_PORT); return STATUS_SUCCESS; } /* * FUNCTION: Read data from port 0x60 */ -NTSTATUS I8042ReadDataWait(PDEVICE_EXTENSION DevExt, BYTE *Data) +NTSTATUS I8042ReadDataWait(PDEVICE_EXTENSION DevExt, UCHAR *Data) { ULONG Counter = DevExt->Settings.PollingIterations; NTSTATUS Status; @@ -112,7 +110,7 @@ VOID I8042Flush() { - BYTE Ignore; + UCHAR Ignore; while (STATUS_SUCCESS == I8042ReadData(&Ignore)) { ; /* drop */ @@ -141,7 +139,7 @@ { NTSTATUS Status; UCHAR Ack; - UINT ResendIterations = DevExt->Settings.ResendIterations + 1; + ULONG ResendIterations = DevExt->Settings.ResendIterations + 1; do { if (Port) @@ -311,7 +309,7 @@ VOID I8042PacketDpc(PDEVICE_EXTENSION DevExt) { - BOOL FinishIrp = FALSE; + BOOLEAN FinishIrp = FALSE; NTSTATUS Result = STATUS_INTERNAL_ERROR; /* Shouldn't happen */ KIRQL Irql; @@ -512,7 +510,7 @@ { NTSTATUS Status; UCHAR Value = 0; - UINT Counter; + ULONG Counter; DevExt->MouseExists = FALSE; DevExt->KeyboardExists = FALSE; Property changes on: trunk/reactos/drivers/input/i8042prt/i8042prt.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.h --- trunk/reactos/drivers/input/i8042prt/i8042prt.h 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/i8042prt.h 2005-08-24 20:34:50 UTC (rev 17519) @@ -1,51 +1,19 @@ #ifndef _I8042DRV_H #define _I8042DRV_H -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> +#include <ntddk.h> +#include <kbdmou.h> +#include <ntdd8042.h> + +#ifdef _MSC_VER + #define STDCALL + #define DDKAPI +#endif + #define KEYBOARD_IRQ 1 #define MOUSE_IRQ 12 #define KBD_BUFFER_SIZE 32 -// should be in ntdd8042.h - -typedef VOID DDKAPI -(*KEYBOARD_CLASS_SERVICE_CALLBACK) ( - IN PDEVICE_OBJECT DeviceObject, - IN PKEYBOARD_INPUT_DATA InputDataStart, - IN PKEYBOARD_INPUT_DATA InputDataEnd, - IN OUT PULONG InputDataConsumed -); - -/* I'm not actually sure if this is in the ddk, would seem logical */ -typedef VOID DDKAPI -(*MOUSE_CLASS_SERVICE_CALLBACK) ( - IN PDEVICE_OBJECT DeviceObject, - IN PMOUSE_INPUT_DATA InputDataStart, - IN PMOUSE_INPUT_DATA InputDataEnd, - IN OUT PULONG InputDataConsumed -); - -typedef struct _CONNECT_DATA { - PDEVICE_OBJECT ClassDeviceObject; - PVOID ClassService; -} CONNECT_DATA, *PCONNECT_DATA; - -#define IOCTL_INTERNAL_KEYBOARD_CONNECT \ - CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS) - -#define IOCTL_INTERNAL_MOUSE_CONNECT \ - CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS) - -/* For some bizarre reason, these are different from the defines in - * w32api. I'm quite sure these are correct though, needs to be checked - * against the ddk - */ -#define KEYBOARD_SCROLL_LOCK_ON 0x01 -#define KEYBOARD_NUM_LOCK_ON 0x02 -#define KEYBOARD_CAPS_LOCK_ON 0x04 - #define WHEEL_DELTA 120 /*----------------------------------------------------- @@ -77,21 +45,21 @@ /* TODO: part of this should be in the _ATTRIBUTES structs instead */ typedef struct _I8042_SETTINGS { - DWORD Headless; /* done */ - DWORD CrashScroll; - DWORD CrashSysRq; /* done */ - DWORD ReportResetErrors; - DWORD PollStatusIterations; /* done */ - DWORD ResendIterations; /* done */ - DWORD PollingIterations; - DWORD PollingIterationsMaximum; - DWORD OverrideKeyboardType; - DWORD OverrideKeyboardSubtype; - DWORD MouseResendStallTime; - DWORD MouseSynchIn100ns; /* done */ - DWORD MouseResolution; /* done */ - DWORD NumberOfButtons; - DWORD EnableWheelDetection; + ULONG Headless; /* done */ + ULONG CrashScroll; + ULONG CrashSysRq; /* done */ + ULONG ReportResetErrors; + ULONG PollStatusIterations; /* done */ + ULONG ResendIterations; /* done */ + ULONG PollingIterations; + ULONG PollingIterationsMaximum; + ULONG OverrideKeyboardType; + ULONG OverrideKeyboardSubtype; + ULONG MouseResendStallTime; + ULONG MouseSynchIn100ns; /* done */ + ULONG MouseResolution; /* done */ + ULONG NumberOfButtons; + ULONG EnableWheelDetection; } I8042_SETTINGS, *PI8042_SETTINGS; typedef enum _I8042_MOUSE_TYPE @@ -178,7 +146,7 @@ I8042_MOUSE_TYPE MouseType; OUTPUT_PACKET Packet; - UINT PacketResends; + ULONG PacketResends; BOOLEAN PacketComplete; NTSTATUS PacketResult; UCHAR PacketBuffer[16]; @@ -228,8 +196,8 @@ * Keyboard controller ports */ -#define I8042_DATA_PORT 0x60 -#define I8042_CTRL_PORT 0x64 +#define I8042_DATA_PORT ((PUCHAR)0x60) +#define I8042_CTRL_PORT ((PUCHAR)0x64) /* @@ -295,11 +263,11 @@ #define MOUSE_NACK 0xFE /* i8042prt.c */ -NTSTATUS I8042ReadData(BYTE *Data); +NTSTATUS I8042ReadData(UCHAR *Data); -NTSTATUS I8042ReadStatus(BYTE *Status); +NTSTATUS I8042ReadStatus(UCHAR *Status); -NTSTATUS I8042ReadDataWait(PDEVICE_EXTENSION DevExt, BYTE *Data); +NTSTATUS I8042ReadDataWait(PDEVICE_EXTENSION DevExt, UCHAR *Data); VOID I8042Flush(); @@ -326,7 +294,7 @@ VOID STDCALL I8042SendHookWorkItem(PDEVICE_OBJECT DeviceObject, PVOID Context); -BOOLEAN I8042Write(PDEVICE_EXTENSION DevExt, int addr, BYTE data); +BOOLEAN I8042Write(PDEVICE_EXTENSION DevExt, PUCHAR addr, UCHAR data); /* keyboard.c */ VOID STDCALL I8042IsrWritePortKbd(PVOID Context, @@ -382,12 +350,12 @@ USHORT Mask); VOID STDCALL I8042MouseHandle(PDEVICE_EXTENSION DevExt, - BYTE Output); + UCHAR Output); BOOLEAN STDCALL I8042MouseEnable(PDEVICE_EXTENSION DevExt); BOOLEAN STDCALL I8042MouseDisable(PDEVICE_EXTENSION DevExt); /* ps2pp.c */ -VOID I8042MouseHandlePs2pp(PDEVICE_EXTENSION DevExt, BYTE Input); +VOID I8042MouseHandlePs2pp(PDEVICE_EXTENSION DevExt, UCHAR Input); #endif // _KEYBOARD_H_ Property changes on: trunk/reactos/drivers/input/i8042prt/i8042prt.h ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision Property changes on: trunk/reactos/drivers/input/i8042prt/i8042prt.rc ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c --- trunk/reactos/drivers/input/i8042prt/keyboard.c 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/keyboard.c 2005-08-24 20:34:50 UTC (rev 17519) @@ -11,18 +11,16 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - +#ifndef NDEBUG #define NDEBUG +#endif #include <debug.h> #include "i8042prt.h" /* GLOBALS *******************************************************************/ -static BYTE TypematicTable[] = { +static UCHAR TypematicTable[] = { 0x00, 0x00, 0x00, 0x05, 0x08, 0x0B, 0x0D, 0x0F, 0x10, 0x12, /* 0-9 */ 0x13, 0x14, 0x15, 0x16, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1A, /* 10-19 */ 0x1B, 0x1C, 0x1C, 0x1C, 0x1D, 0x1D, 0x1E }; @@ -87,12 +85,12 @@ BOOLEAN STDCALL I8042InterruptServiceKbd(struct _KINTERRUPT *Interrupt, VOID * Context) { - BYTE Output; - BYTE PortStatus; + UCHAR Output; + UCHAR PortStatus; NTSTATUS Status; PDEVICE_EXTENSION DevExt = (PDEVICE_EXTENSION) Context; BOOLEAN HookContinue = FALSE, HookReturn; - UINT Iterations = 0; + ULONG Iterations = 0; KEYBOARD_INPUT_DATA *InputData = DevExt->KeyboardBuffer + DevExt->KeysInBuffer; @@ -228,7 +226,7 @@ if (!DevExt->KeyboardData.ClassService) return; - ((KEYBOARD_CLASS_SERVICE_CALLBACK) DevExt->KeyboardData.ClassService)( + ((PSERVICE_CALLBACK_ROUTINE) DevExt->KeyboardData.ClassService)( DevExt->KeyboardData.ClassDeviceObject, DevExt->KeyboardBuffer, DevExt->KeyboardBuffer + KeysInBufferCopy, @@ -240,9 +238,9 @@ } /* You have to send the rate/delay in a somewhat awkward format */ -static USHORT I8042GetTypematicByte(USHORT Rate, USHORT Delay) +static UCHAR I8042GetTypematicByte(USHORT Rate, USHORT Delay) { - USHORT ret; + UCHAR ret; if (Rate < 3) { ret = 0x0; @@ -630,7 +628,7 @@ { NTSTATUS Status; UCHAR Value; - UINT RetryCount = 10; + ULONG RetryCount = 10; DPRINT("Detecting keyboard\n"); @@ -713,6 +711,7 @@ /* debug stuff */ VOID STDCALL KdpServiceDispatcher(ULONG Code, PVOID Context1, PVOID Context2); +#define EnterDebugger ((PVOID)0x25) static VOID STDCALL I8042DebugWorkItem(PDEVICE_OBJECT DeviceObject, PVOID Context) @@ -727,5 +726,10 @@ if (!Key) return; - KdpServiceDispatcher(TAG('R', 'o', 's', ' '), (PVOID)Key, NULL); +#ifdef __REACTOS__ + /* We hope kernel would understand this. If + * that's not the case, nothing would happen. + */ + KdpServiceDispatcher(TAG('R', 'o', 's', ' '), EnterDebugger, NULL); +#endif /* __REACTOS__ */ } Property changes on: trunk/reactos/drivers/input/i8042prt/keyboard.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/mouse.c --- trunk/reactos/drivers/input/i8042prt/mouse.c 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/mouse.c 2005-08-24 20:34:50 UTC (rev 17519) @@ -11,11 +11,9 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - +#ifndef NDEBUG #define NDEBUG +#endif #include <debug.h> #include "i8042prt.h" @@ -147,7 +145,7 @@ DevExt->MouseExists = FALSE; DevExt->MouseState = MouseIdle; DPRINT1("Mouse returned bad reset reply part two: " - "%x (expected 0)\n", Value); + "%x (expected 0)\n", *Value); } return TRUE; case ExpectingGetDeviceIdACK: @@ -312,7 +310,7 @@ return TRUE; case ExpectingSetSamplingRateACK: I8042IsrWritePortMouse(DevExt, - DevExt->MouseAttributes.SampleRate); + (UCHAR)DevExt->MouseAttributes.SampleRate); DevExt->MouseResetState++; return TRUE; case ExpectingSetSamplingRateValueACK: @@ -328,7 +326,7 @@ return TRUE; case ExpectingFinalResolutionACK: I8042IsrWritePortMouse(DevExt, - DevExt->Settings.MouseResolution & 0xff); + (UCHAR)(DevExt->Settings.MouseResolution & 0xff)); DPRINT("%x\n", DevExt->Settings.MouseResolution); DevExt->MouseResetState = ExpectingFinalResolutionValueACK; return TRUE; @@ -383,7 +381,7 @@ { PMOUSE_INPUT_DATA MouseInput = DevExt->MouseBuffer + DevExt->MouseInBuffer; - USHORT NewButtonData = MouseInput->RawButtons & Mask; + USHORT NewButtonData = (USHORT)(MouseInput->RawButtons & Mask); USHORT ButtonDiff = (NewButtonData ^ DevExt->MouseButtonState) & Mask; /* Note that the defines are such: @@ -404,7 +402,7 @@ } VOID STDCALL I8042MouseHandle(PDEVICE_EXTENSION DevExt, - BYTE Output) + UCHAR Output) { PMOUSE_INPUT_DATA MouseInput = DevExt->MouseBuffer + DevExt->MouseInBuffer; @@ -515,10 +513,10 @@ BOOLEAN STDCALL I8042InterruptServiceMouse(struct _KINTERRUPT *Interrupt, VOID *Context) { - BYTE Output, PortStatus; + UCHAR Output, PortStatus; NTSTATUS Status; PDEVICE_EXTENSION DevExt = (PDEVICE_EXTENSION) Context; - UINT Iterations = 0; + ULONG Iterations = 0; do { Status = I8042ReadStatus(&PortStatus); @@ -616,7 +614,7 @@ if (!DevExt->MouseData.ClassService) return; - ((MOUSE_CLASS_SERVICE_CALLBACK) DevExt->MouseData.ClassService)( + ((PSERVICE_CALLBACK_ROUTINE) DevExt->MouseData.ClassService)( DevExt->MouseData.ClassDeviceObject, DevExt->MouseBuffer, DevExt->MouseBuffer + MouseInBufferCopy, Property changes on: trunk/reactos/drivers/input/i8042prt/mouse.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/ps2pp.c --- trunk/reactos/drivers/input/i8042prt/ps2pp.c 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/ps2pp.c 2005-08-24 20:34:50 UTC (rev 17519) @@ -9,17 +9,15 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - +#ifndef NDEBUG #define NDEBUG +#endif #include <debug.h> #include "i8042prt.h" -VOID I8042MouseHandlePs2pp(PDEVICE_EXTENSION DevExt, BYTE Input) +VOID I8042MouseHandlePs2pp(PDEVICE_EXTENSION DevExt, UCHAR Input) { UCHAR PktType; PMOUSE_INPUT_DATA MouseInput = DevExt->MouseBuffer + Property changes on: trunk/reactos/drivers/input/i8042prt/ps2pp.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/input/i8042prt/registry.c --- trunk/reactos/drivers/input/i8042prt/registry.c 2005-08-24 20:06:54 UTC (rev 17518) +++ trunk/reactos/drivers/input/i8042prt/registry.c 2005-08-24 20:34:50 UTC (rev 17519) @@ -11,11 +11,9 @@ /* INCLUDES ****************************************************************/ -#include <ddk/ntddk.h> -#include <ddk/ntddkbd.h> -#include <ddk/ntdd8042.h> - +#ifndef NDEBUG #define NDEBUG +#endif #include <debug.h> #include "i8042prt.h" @@ -38,24 +36,24 @@ NTSTATUS Status; - DWORD DefaultHeadless = 0; - DWORD DefaultCrashScroll = 0; - DWORD DefaultCrashSysRq = 0; - DWORD DefaultReportResetErrors = 0; - DWORD DefaultPollStatusIterations = 1; - DWORD DefaultResendIterations = 3; - DWORD DefaultPollingIterations = 12000; - DWORD DefaultPollingIterationsMaximum = 12000; - DWORD DefaultKeyboardDataQueueSize = 100; - DWORD DefaultOverrideKeyboardType = 0; - DWORD DefaultOverrideKeyboardSubtype = 0; - DWORD DefaultMouseDataQueueSize = 100; - DWORD DefaultMouseResendStallTime = 1000; - DWORD DefaultMouseSynchIn100ns = 20000000; - DWORD DefaultMouseResolution = 3; - DWORD DefaultSampleRate = 60; - DWORD DefaultNumberOfButtons = 2; - DWORD DefaultEnableWheelDetection = 1; + ULONG DefaultHeadless = 0; + ULONG DefaultCrashScroll = 0; + ULONG DefaultCrashSysRq = 0; + ULONG DefaultReportResetErrors = 0; + ULONG DefaultPollStatusIterations = 1; + ULONG DefaultResendIterations = 3; + ULONG DefaultPollingIterations = 12000; + ULONG DefaultPollingIterationsMaximum = 12000; + ULONG DefaultKeyboardDataQueueSize = 100; + ULONG DefaultOverrideKeyboardType = 0; + ULONG DefaultOverrideKeyboardSubtype = 0; + ULONG DefaultMouseDataQueueSize = 100; + ULONG DefaultMouseResendStallTime = 1000; + ULONG DefaultMouseSynchIn100ns = 20000000; + ULONG DefaultMouseResolution = 3; + ULONG DefaultSampleRate = 60; + ULONG DefaultNumberOfButtons = 2; + ULONG DefaultEnableWheelDetection = 1; RtlInitUnicodeString(&ParametersPath, NULL); ParametersPath.MaximumLength = (wcslen(RegistryPath) * @@ -212,15 +210,15 @@ NULL); if (!NT_SUCCESS(Status)) { - DPRINT1 ("Can't read registry: %x\n", Status); /* Actually, the defaults are not set when the function * fails, as would happen during setup, so you have to * set them manually anyway... */ RTL_QUERY_REGISTRY_TABLE *Current = Parameters; + DPRINT1 ("Can't read registry: %x\n", Status); while (Current->Name) { - *((DWORD *)Current->EntryContext) = - *((DWORD *)Current->DefaultData); + *((PULONG)Current->EntryContext) = + *((PULONG)Current->DefaultData); Current++; } DPRINT1 ("Manually set defaults\n"); Property changes on: trunk/reactos/drivers/input/i8042prt/registry.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision
19 years, 4 months
1
0
0
0
[royce] 17518: added some verbosity
by royce@svn.reactos.com
added some verbosity standardized back on printf from cout fixed loop variable conflict Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 19:58:07 UTC (rev 17517) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 20:06:54 UTC (rev 17518) @@ -61,7 +61,7 @@ string filename = ProjectNode.name + ".dsw"; - cout << "Creating MSVC project: " << filename << endl; + printf ( "Creating MSVC workspace: %s\n", filename.c_str() ); ProcessModules(); @@ -69,7 +69,7 @@ if ( !m_dswFile ) { - cout << "Could not open file." << endl; + printf ( "Could not create file '%s'.\n", filename.c_str() ); return; } _generate_wine_dsw ( m_dswFile ); @@ -101,7 +101,7 @@ // The MSVC build still needs the mingw backend. //ProcessModules(); - cout << "Done." << endl << endl; + printf ( "Done.\n" ); /*cout << "Don't expect the MSVC backend to work yet. "<< endl << endl; _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 19:58:07 UTC (rev 17517) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 20:06:54 UTC (rev 17518) @@ -20,6 +20,7 @@ const bool wine = false; string dsp_file = DspFileName(module); + printf ( "Creating MSVC project: '%s'\n", dsp_file.c_str() ); FILE* OUT = fopen ( dsp_file.c_str(), "w" ); vector<string> imports; @@ -553,9 +554,9 @@ fprintf ( OUT, "\n" ); fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\n" ); - for ( i = 0; i < source_files.size(); i++ ) + for ( size_t isrcfile = 0; isrcfile < source_files.size(); isrcfile++ ) { - string source_file = DosSeparator(source_files[i]); + string source_file = DosSeparator(source_files[isrcfile]); if ( strncmp ( source_file.c_str(), ".\\", 2 ) ) {
19 years, 4 months
1
0
0
0
[royce] 17517: invoke _generate_dsp() have it open the output file, and fix some path parsing and const issues.
by royce@svn.reactos.com
invoke _generate_dsp() have it open the output file, and fix some path parsing and const issues. Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 18:29:45 UTC (rev 17516) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp 2005-08-24 19:58:07 UTC (rev 17517) @@ -119,12 +119,14 @@ { Module &module = *ProjectNode.modules[i]; - for(size_t k = 0; k < module.non_if_data.files.size(); k++) + this->_generate_dsp ( module ); + + /*for(size_t k = 0; k < module.non_if_data.files.size(); k++) { File &file = *module.non_if_data.files[k]; ProcessFile(file.name); - } + }*/ } } _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.h --- trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 18:29:45 UTC (rev 17516) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.h 2005-08-24 19:58:07 UTC (rev 17517) @@ -64,7 +64,7 @@ // functions in msvcmaker.cpp: - void _generate_dsp ( FILE* OUT, const std::string& moduleName ); + void _generate_dsp ( const Module& module ); void _generate_dsw_header ( FILE* OUT ); _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 18:29:45 UTC (rev 17516) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 19:58:07 UTC (rev 17517) @@ -13,15 +13,15 @@ using std::vector; void -MSVCBackend::_generate_dsp ( FILE* OUT, const std::string& moduleName ) +MSVCBackend::_generate_dsp ( const Module& module ) { size_t i; // TODO FIXME wine hack? const bool wine = false; - Module& module = *ProjectNode.LocateModule ( moduleName ); + string dsp_file = DspFileName(module); + FILE* OUT = fopen ( dsp_file.c_str(), "w" ); - string dsp_file = DspFileName(module); vector<string> imports; for ( i = 0; i < module.non_if_data.libraries.size(); i++ ) { @@ -32,19 +32,20 @@ bool lib = (module_type == "lib"); bool dll = (module_type == "dll"); bool exe = (module_type == "exe"); + // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? bool console = exe; // FIXME: Not always correct // TODO FIXME - not sure if the count here is right... - int parts = 1; - const char* p = strchr ( dsp_file.c_str(), '/' ); + int parts = 0; + const char* p = strpbrk ( dsp_file.c_str(), "/\\" ); while ( p ) { ++parts; - p = strchr ( p+1, '/' ); + p = strpbrk ( p+1, "/\\" ); } string msvc_wine_dir = ".."; - while ( parts-- ) + while ( --parts ) msvc_wine_dir += "\\.."; string wine_include_dir = msvc_wine_dir + "\\include"; @@ -54,16 +55,16 @@ // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? vector<string> c_srcs, source_files, resource_files; - vector<IfableData*> ifs_list; + vector<const IfableData*> ifs_list; ifs_list.push_back ( &module.non_if_data ); while ( ifs_list.size() ) { - IfableData& data = *ifs_list.back(); + const IfableData& data = *ifs_list.back(); ifs_list.pop_back(); // TODO FIXME - refactor needed - we're discarding if conditions for ( i = 0; i < data.ifs.size(); i++ ) ifs_list.push_back ( &data.ifs[i]->data ); - vector<File*>& files = data.files; + const vector<File*>& files = data.files; for ( i = 0; i < files.size(); i++ ) { // TODO FIXME - do we want the full path of the file here?
19 years, 4 months
1
0
0
0
[hpoussin] 17516: Remove $Id$ tags
by hpoussin@svn.reactos.com
Remove $Id$ tags Use FATEntry.ShortName field instead of FATEntry.FileName when dealing with full name Remove LL suffix on long long constants Replace Win32 types by their kernel counterparts (DWORD -> ULONG, ...) Modified: trunk/reactos/drivers/fs/vfat/cleanup.c Modified: trunk/reactos/drivers/fs/vfat/close.c Modified: trunk/reactos/drivers/fs/vfat/create.c Modified: trunk/reactos/drivers/fs/vfat/dir.c Modified: trunk/reactos/drivers/fs/vfat/direntry.c Modified: trunk/reactos/drivers/fs/vfat/dirwr.c Modified: trunk/reactos/drivers/fs/vfat/ea.c Modified: trunk/reactos/drivers/fs/vfat/fastio.c Modified: trunk/reactos/drivers/fs/vfat/fat.c Modified: trunk/reactos/drivers/fs/vfat/fcb.c Modified: trunk/reactos/drivers/fs/vfat/finfo.c Modified: trunk/reactos/drivers/fs/vfat/flush.c Modified: trunk/reactos/drivers/fs/vfat/fsctl.c Modified: trunk/reactos/drivers/fs/vfat/iface.c Modified: trunk/reactos/drivers/fs/vfat/misc.c Modified: trunk/reactos/drivers/fs/vfat/rw.c Modified: trunk/reactos/drivers/fs/vfat/shutdown.c Modified: trunk/reactos/drivers/fs/vfat/string.c Modified: trunk/reactos/drivers/fs/vfat/vfatfs.rc Modified: trunk/reactos/drivers/fs/vfat/volume.c Property changes on: trunk/reactos/drivers/fs/vfat/blockdev.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/cleanup.c --- trunk/reactos/drivers/fs/vfat/cleanup.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/cleanup.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/cleanup.c Property changes on: trunk/reactos/drivers/fs/vfat/cleanup.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/close.c --- trunk/reactos/drivers/fs/vfat/close.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/close.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/close.c Property changes on: trunk/reactos/drivers/fs/vfat/close.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/create.c --- trunk/reactos/drivers/fs/vfat/create.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/create.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/create.c * PURPOSE: VFAT Filesystem @@ -38,7 +37,7 @@ USHORT Length; CHAR cString[12]; - RtlCopyMemory(cString, pEntry->Filename, 11); + RtlCopyMemory(cString, pEntry->ShortName, 11); cString[11] = 0; if (cString[0] == 0x05) { @@ -695,8 +694,7 @@ /* Supersede the file */ if (RequestedDisposition == FILE_SUPERSEDE) { - LARGE_INTEGER AllocationSize; - AllocationSize.QuadPart = 0LL; + AllocationSize.QuadPart = 0; VfatSetAllocationSizeInformation(FileObject, pFcb, DeviceExt, &AllocationSize); Irp->IoStatus.Information = FILE_SUPERSEDED; } Property changes on: trunk/reactos/drivers/fs/vfat/create.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/dir.c --- trunk/reactos/drivers/fs/vfat/dir.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/dir.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ /* - * $Id$ - * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/dir.c @@ -115,8 +113,8 @@ pInfo->ChangeTime = pInfo->LastWriteTime; if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) { - pInfo->EndOfFile.QuadPart = 0LL; - pInfo->AllocationSize.QuadPart = 0LL; + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; } else { @@ -141,8 +139,8 @@ pInfo->ChangeTime = pInfo->LastWriteTime; if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) { - pInfo->EndOfFile.QuadPart = 0LL; - pInfo->AllocationSize.QuadPart = 0LL; + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; } else { @@ -242,8 +240,8 @@ pInfo->ChangeTime = pInfo->LastWriteTime; if (DirContext->DirEntry.FatX.Attrib & FILE_ATTRIBUTE_DIRECTORY) { - pInfo->EndOfFile.QuadPart = 0LL; - pInfo->AllocationSize.QuadPart = 0LL; + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; } else { @@ -275,8 +273,8 @@ pInfo->ChangeTime = pInfo->LastWriteTime; if (DirContext->DirEntry.Fat.Attrib & FILE_ATTRIBUTE_DIRECTORY) { - pInfo->EndOfFile.QuadPart = 0LL; - pInfo->AllocationSize.QuadPart = 0LL; + pInfo->EndOfFile.QuadPart = 0; + pInfo->AllocationSize.QuadPart = 0; } else { Property changes on: trunk/reactos/drivers/fs/vfat/dir.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/direntry.c --- trunk/reactos/drivers/fs/vfat/direntry.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/direntry.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ -/* $Id$ - * - * +/* * FILE: DirEntry.c * PURPOSE: Routines to manipulate directory entries. * COPYRIGHT: See COPYING in the top level directory @@ -55,7 +53,7 @@ Index = 2; } - FileOffset.QuadPart = 0LL; + FileOffset.QuadPart = 0; MaxIndex = Fcb->RFCB.FileSize.u.LowPart / sizeof(FAT_DIR_ENTRY); while (Index < MaxIndex) @@ -101,7 +99,7 @@ Index = 0; - FileOffset.QuadPart = 0LL; + FileOffset.QuadPart = 0; MaxIndex = Fcb->RFCB.FileSize.u.LowPart / sizeof(FATX_DIR_ENTRY); while (Index < MaxIndex) @@ -306,7 +304,7 @@ { shortCheckSum = (((shortCheckSum & 1) << 7) | ((shortCheckSum & 0xfe) >> 1)) - + fatDirEntry->Filename[i]; + + fatDirEntry->ShortName[i]; } if (shortCheckSum != CheckSum && DirContext->LongNameU.Buffer[0]) { Property changes on: trunk/reactos/drivers/fs/vfat/direntry.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/dirwr.c --- trunk/reactos/drivers/fs/vfat/dirwr.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/dirwr.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/dirwr.c @@ -320,7 +319,7 @@ } DPRINT ("'%s', '%wZ', needTilde=%d, needLong=%d\n", aName, &DirContext.LongNameU, needTilde, needLong); - memset(DirContext.DirEntry.Fat.Filename, ' ', 11); + memset(DirContext.DirEntry.Fat.ShortName, ' ', 11); for (i = 0; i < 8 && aName[i] && aName[i] != '.'; i++) { DirContext.DirEntry.Fat.Filename[i] = aName[i]; @@ -496,9 +495,9 @@ RtlZeroMemory (pFatEntry, DeviceExt->FatInfo.BytesPerCluster); /* create '.' and '..' */ RtlCopyMemory (&pFatEntry[0].Attrib, &DirContext.DirEntry.Fat.Attrib, sizeof(FAT_DIR_ENTRY) - 11); - RtlCopyMemory (pFatEntry[0].Filename, ". ", 11); + RtlCopyMemory (pFatEntry[0].ShortName, ". ", 11); RtlCopyMemory (&pFatEntry[1].Attrib, &DirContext.DirEntry.Fat.Attrib, sizeof(FAT_DIR_ENTRY) - 11); - RtlCopyMemory (pFatEntry[1].Filename, ".. ", 11); + RtlCopyMemory (pFatEntry[1].ShortName, ".. ", 11); pFatEntry[1].FirstCluster = ParentFcb->entry.Fat.FirstCluster; pFatEntry[1].FirstClusterHigh = ParentFcb->entry.Fat.FirstClusterHigh; if (vfatFCBIsRoot(ParentFcb)) Property changes on: trunk/reactos/drivers/fs/vfat/dirwr.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/ea.c --- trunk/reactos/drivers/fs/vfat/ea.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/ea.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/ea.c * PURPOSE: VFAT Filesystem Property changes on: trunk/reactos/drivers/fs/vfat/ea.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/fastio.c --- trunk/reactos/drivers/fs/vfat/fastio.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/fastio.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ -/* $Id$ - * - * +/* * FILE: drivers/fs/vfat/fastio.c * PURPOSE: Fast IO routines. * COPYRIGHT: See COPYING in the top level directory Property changes on: trunk/reactos/drivers/fs/vfat/fastio.c ___________________________________________________________________ Name: svn:keywords + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/fat.c --- trunk/reactos/drivers/fs/vfat/fat.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/fat.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ /* - * $Id$ - * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/fat.c Property changes on: trunk/reactos/drivers/fs/vfat/fat.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/fcb.c --- trunk/reactos/drivers/fs/vfat/fcb.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/fcb.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ -/* $Id$ - * - * +/* * FILE: drivers/fs/vfat/fcb.c * PURPOSE: Routines to manipulate FCBs. * COPYRIGHT: See COPYING in the top level directory @@ -380,7 +378,7 @@ } else { - memset(FCB->entry.Fat.Filename, ' ', 11); + memset(FCB->entry.Fat.ShortName, ' ', 11); FCB->entry.Fat.FileSize = pVCB->FatInfo.rootDirectorySectors * pVCB->FatInfo.BytesPerSector; FCB->entry.Fat.Attrib = FILE_ATTRIBUTE_DIRECTORY; if (pVCB->FatInfo.FatType == FAT32) Property changes on: trunk/reactos/drivers/fs/vfat/fcb.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/finfo.c --- trunk/reactos/drivers/fs/vfat/finfo.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/finfo.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/finfo.c @@ -83,8 +82,8 @@ if (vfatFCBIsDirectory(FCB)) { - StandardInfo->AllocationSize.QuadPart = 0LL; - StandardInfo->EndOfFile.QuadPart = 0LL; + StandardInfo->AllocationSize.QuadPart = 0; + StandardInfo->EndOfFile.QuadPart = 0; StandardInfo->Directory = TRUE; } else Property changes on: trunk/reactos/drivers/fs/vfat/finfo.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/flush.c --- trunk/reactos/drivers/fs/vfat/flush.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/flush.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/flush.c Property changes on: trunk/reactos/drivers/fs/vfat/flush.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/fsctl.c --- trunk/reactos/drivers/fs/vfat/fsctl.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/fsctl.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/fsctl.c @@ -422,7 +421,7 @@ HashTableSize = FCB_HASH_TABLE_SIZE; DPRINT("VFAT: Recognized volume\n"); Status = IoCreateDevice(VfatGlobalData->DriverObject, - ROUND_UP(sizeof (DEVICE_EXTENSION), sizeof(DWORD)) + sizeof(HASHENTRY*) * HashTableSize, + ROUND_UP(sizeof (DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize, NULL, FILE_DEVICE_FILE_SYSTEM, 0, @@ -435,8 +434,8 @@ DeviceObject->Flags = DeviceObject->Flags | DO_DIRECT_IO; DeviceExt = (PVOID) DeviceObject->DeviceExtension; - RtlZeroMemory(DeviceExt, ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(DWORD)) + sizeof(HASHENTRY*) * HashTableSize); - DeviceExt->FcbHashTable = (HASHENTRY**)((ULONG_PTR)DeviceExt + ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(DWORD))); + RtlZeroMemory(DeviceExt, ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(ULONG)) + sizeof(HASHENTRY*) * HashTableSize); + DeviceExt->FcbHashTable = (HASHENTRY**)((ULONG_PTR)DeviceExt + ROUND_UP(sizeof(DEVICE_EXTENSION), sizeof(ULONG))); DeviceExt->HashTableSize = HashTableSize; /* use same vpb as device disk */ Property changes on: trunk/reactos/drivers/fs/vfat/fsctl.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/iface.c --- trunk/reactos/drivers/fs/vfat/iface.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/iface.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/iface.c * PURPOSE: VFAT Filesystem @@ -83,7 +82,7 @@ VfatGlobalData->DriverObject = DriverObject; VfatGlobalData->DeviceObject = DeviceObject; - DeviceObject->Flags = DO_DIRECT_IO; + DeviceObject->Flags |= DO_DIRECT_IO; DriverObject->MajorFunction[IRP_MJ_CLOSE] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_CREATE] = VfatBuildRequest; DriverObject->MajorFunction[IRP_MJ_READ] = VfatBuildRequest; Property changes on: trunk/reactos/drivers/fs/vfat/iface.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/misc.c --- trunk/reactos/drivers/fs/vfat/misc.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/misc.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/misc.c Property changes on: trunk/reactos/drivers/fs/vfat/misc.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/rw.c --- trunk/reactos/drivers/fs/vfat/rw.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/rw.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,6 +1,4 @@ - -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/rw.c Property changes on: trunk/reactos/drivers/fs/vfat/rw.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/shutdown.c --- trunk/reactos/drivers/fs/vfat/shutdown.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/shutdown.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/shutdown.c Property changes on: trunk/reactos/drivers/fs/vfat/shutdown.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/string.c --- trunk/reactos/drivers/fs/vfat/string.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/string.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/string.c Property changes on: trunk/reactos/drivers/fs/vfat/string.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision Property changes on: trunk/reactos/drivers/fs/vfat/vfat005.1st ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision Property changes on: trunk/reactos/drivers/fs/vfat/vfat_fr.txt ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision Property changes on: trunk/reactos/drivers/fs/vfat/vfatfs.def ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/vfatfs.rc --- trunk/reactos/drivers/fs/vfat/vfatfs.rc 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/vfatfs.rc 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,3 @@ -/* $Id$ */ - #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "VFAT IFS Driver\0" #define REACTOS_STR_INTERNAL_NAME "vfatfs\0" Property changes on: trunk/reactos/drivers/fs/vfat/vfatfs.rc ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision _____ Modified: trunk/reactos/drivers/fs/vfat/volume.c --- trunk/reactos/drivers/fs/vfat/volume.c 2005-08-24 18:13:00 UTC (rev 17515) +++ trunk/reactos/drivers/fs/vfat/volume.c 2005-08-24 18:29:45 UTC (rev 17516) @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/vfat/volume.c Property changes on: trunk/reactos/drivers/fs/vfat/volume.c ___________________________________________________________________ Name: svn:keywords - author date id revision + author date revision
19 years, 4 months
1
0
0
0
[royce] 17515: _generate_dsp() compiles now, haven't tested yet
by royce@svn.reactos.com
_generate_dsp() compiles now, haven't tested yet Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp Modified: trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/rbuild.h _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 15:37:04 UTC (rev 17514) +++ trunk/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp 2005-08-24 18:13:00 UTC (rev 17515) @@ -12,22 +12,28 @@ using std::string; using std::vector; -#if 0 void MSVCBackend::_generate_dsp ( FILE* OUT, const std::string& moduleName ) { size_t i; + // TODO FIXME wine hack? + const bool wine = false; Module& module = *ProjectNode.LocateModule ( moduleName ); - std::string dsp_file = DspFileName(module); - my @imports = @{module->{imports}}; + string dsp_file = DspFileName(module); + vector<string> imports; + for ( i = 0; i < module.non_if_data.libraries.size(); i++ ) + { + imports.push_back ( module.non_if_data.libraries[i]->name ); + } - bool lib = (module->{type} eq "lib"); - my $dll = (module->{type} eq "dll"); - my $exe = (module->{type} eq "exe"); + string module_type = Right(module.GetTargetName(),3); + bool lib = (module_type == "lib"); + bool dll = (module_type == "dll"); + bool exe = (module_type == "exe"); - my $console = $exe; # FIXME: Not always correct + bool console = exe; // FIXME: Not always correct // TODO FIXME - not sure if the count here is right... int parts = 1; @@ -37,37 +43,59 @@ ++parts; p = strchr ( p+1, '/' ); } - std::string msvc_wine_dir = ".."; + string msvc_wine_dir = ".."; while ( parts-- ) msvc_wine_dir += "\\.."; - std::string wine_include_dir = msvc_wine_dir + "\\include"; + string wine_include_dir = msvc_wine_dir + "\\include"; //$progress_current++; //$output->progress("$dsp_file (file $progress_current of $progress_max)"); - my @c_srcs = @{module->{c_srcs}}; - my @source_files = @{module->{source_files}}; + // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? + vector<string> c_srcs, source_files, resource_files; + vector<IfableData*> ifs_list; + ifs_list.push_back ( &module.non_if_data ); + while ( ifs_list.size() ) + { + IfableData& data = *ifs_list.back(); + ifs_list.pop_back(); + // TODO FIXME - refactor needed - we're discarding if conditions + for ( i = 0; i < data.ifs.size(); i++ ) + ifs_list.push_back ( &data.ifs[i]->data ); + vector<File*>& files = data.files; + for ( i = 0; i < files.size(); i++ ) + { + // TODO FIXME - do we want the full path of the file here? + const string& file = files[i]->name; + source_files.push_back ( file ); + if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) + c_srcs.push_back ( file ); + if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) + resource_files.push_back ( file ); + } + } // TODO FIXME - we don't include header files in our build system //my @header_files = @{module->{header_files}}; vector<string> header_files; - my @resource_files = @{module->{resource_files}}; - if (module.name !~ /^wine(?:_unicode|build|runtests|test)?$/ && + // TODO FIXME - wine hack? + /*if (module.name !~ /^wine(?:_unicode|build|runtests|test)?$/ && module.name !~ /^(?:gdi32)_.+?$/ && module.name !~ /_test$/) { push @source_files, "$project.spec" ); @source_files = sort(@source_files); - } + }*/ bool no_cpp = true; bool no_msvc_headers = true; - if (module.name =~ /^wine(?:runtests|test)$/ + // TODO FIXME - wine hack? + /*if (module.name =~ /^wine(?:runtests|test)$/ || module.name =~ /_test$/) { no_msvc_headers = false; - } + }*/ std::vector<std::string> cfgs; @@ -85,7 +113,8 @@ cfgs = _cfgs; } - if (!no_release) + // TODO FIXME - wine hack? + /*if (!no_release) { std::vector<std::string> _cfgs; for ( i = 0; i < cfgs.size(); i++ ) @@ -95,7 +124,7 @@ } cfgs.resize(0); cfgs = _cfgs; - } + }*/ if (!no_msvc_headers) { @@ -145,7 +174,7 @@ fprintf ( OUT, "!MESSAGE \n" ); for ( i = 0; i < cfgs.size(); i++ ) { - string& cfg = cfgs[i]; + const string& cfg = cfgs[i]; if ( lib ) { fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Static Library\")\n", cfg.c_str() ); @@ -180,13 +209,13 @@ { if ( n == 0 ) { - fprintf ( OUT, "!IF \"\$(CFG)\" == \"%s\"\n", cfg.c_str() ); + fprintf ( OUT, "!IF \"$(CFG)\" == \"%s\"\n", cfg.c_str() ); fprintf ( OUT, "\n" ); } else { fprintf ( OUT, "\n" ); - fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"%s\"\n", cfg.c_str() ); + fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"%s\"\n", cfg.c_str() ); fprintf ( OUT, "\n" ); } } @@ -208,8 +237,9 @@ output_dir = Replace(cfg,module.name + " - ",""); output_dir = Replace(output_dir," ","_"); output_dir = Replace(output_dir,"C++","Cxx"); - if ( output_prefix_dir.size() ) - output_dir = output_prefix_dir + "\\" + output_dir; + // TODO FIXME - wine hack? + //if ( output_prefix_dir.size() ) + // output_dir = output_prefix_dir + "\\" + output_dir; fprintf ( OUT, "# PROP BASE Output_Dir \"%s\"\n", output_dir.c_str() ); fprintf ( OUT, "# PROP BASE Intermediate_Dir \"%s\"\n", output_dir.c_str() ); @@ -228,7 +258,7 @@ fprintf ( OUT, "# PROP Output_Dir \"%s\"\n", output_dir.c_str() ); fprintf ( OUT, "# PROP Intermediate_Dir \"%s\"\n", output_dir.c_str() ); - fprintf ( OUT, "# PROP Ignore_Export_Lib 0\n" if $dll; + if ( dll ) fprintf ( OUT, "# PROP Ignore_Export_Lib 0\n" ); fprintf ( OUT, "# PROP Target_Dir \"\"\n" ); vector<string> defines; @@ -252,7 +282,8 @@ fprintf ( OUT, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); defines.push_back ( "_WINDOWS" ); defines.push_back ( "_USRDLL" ); - defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); + // TODO FIXME - wine hack? + //defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); } } else @@ -268,7 +299,8 @@ fprintf ( OUT, "# ADD BASE CPP /nologo /MT /W3 /GX /O2" ); defines.push_back ( "_WINDOWS" ); defines.push_back ( "_USRDLL" ); - defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); + // TODO FIXME - wine hack? + //defines.push_back ( string("\U") + module.name + "\E_EXPORTS" ); } } @@ -293,7 +325,7 @@ defines2.push_back ( "WIN32" ); defines2.push_back ( "_WINDOWS" ); defines2.push_back ( "_MBCS" ); - if(debug) + if ( debug ) { defines2.push_back ( "_DEBUG" ); if(lib) @@ -323,11 +355,14 @@ } std::vector<std::string> includes; + // TODO FIXME - wine hack? if ( wine ) { - defines2.push_back ( string("_\U") + module.name + "\E_" ); - if ( module.name !~ /^(?:wine(?:build|test)|.*?_test)$/ ) - defines2.push_back ( "__WINESRC__" ); + // TODO FIXME - wine hack? + //defines2.push_back ( string("_\U") + module.name + "\E_" ); + // TODO FIXME - wine hack? + /*if ( module.name !~ /^(?:wine(?:build|test)|.*?_test)$/ ) + defines2.push_back ( "__WINESRC__" );*/ if ( msvc_headers ) defines2.push_back ( "__WINE_USE_NATIVE_HEADERS" ); string output_dir2 = Replace(output_dir,"\\","\\\\"); @@ -353,7 +388,7 @@ { for ( i = 0; i < includes.size(); i++ ); { - string& include = includes[i]; + const string& include = includes[i]; if ( strpbrk ( include.c_str(), "[\\\"]" ) ) { fprintf ( OUT, " /I \"%s\"", include.c_str() ); @@ -367,7 +402,7 @@ for ( i = 0; i < defines2.size(); i++ ) { - string& define = defines2[i]; + const string& define = defines2[i]; if ( strpbrk ( define.c_str(), "[\\\"]" ) ) { fprintf ( OUT, " /D \"%s\"", define.c_str() ); @@ -390,9 +425,12 @@ if ( debug ) { - fprintf ( OUT, "# SUBTRACT CPP /X /YX\n" if $dll; - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; - fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" if $dll; + if ( dll ) + { + fprintf ( OUT, "# SUBTRACT CPP /X /YX\n" ); + fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" ); + fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\n" ); + } fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"_DEBUG\"\n" ); fprintf ( OUT, "# ADD RSC /l 0x41d" ); if ( wine ) @@ -418,7 +456,6 @@ { for ( i = 0; i < includes.size(); i++ ) fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); - } } fprintf ( OUT, "/d \"NDEBUG\"\n" ); } @@ -430,9 +467,19 @@ { fprintf ( OUT, "LINK32=link.exe\n" ); fprintf ( OUT, "# ADD BASE LINK32 " ); - my @libraries = qw(kernel32.lib user32.lib gdi32.lib winspool.lib - comdlg32.lib advapi32.lib shell32.lib ole32.lib - oleaut32.lib uuid.lib odbc32.lib odbccp32.lib); + vector<string> libraries; + libraries.push_back ( "kernel32.lib" ); + libraries.push_back ( "user32.lib" ); + libraries.push_back ( "gdi32.lib" ); + libraries.push_back ( "winspool.lib" ); + libraries.push_back ( "comdlg32.lib" ); + libraries.push_back ( "advapi32.lib" ); + libraries.push_back ( "shell32.lib" ); + libraries.push_back ( "ole32.lib" ); + libraries.push_back ( "oleaut32.lib" ); + libraries.push_back ( "uuid.lib" ); + libraries.push_back ( "odbc32.lib" ); + libraries.push_back ( "odbccp32.lib" ); for ( i = 0; i < libraries.size(); i++ ) { fprintf ( OUT, "%s ", libraries[i].c_str() ); @@ -461,7 +508,7 @@ fprintf ( OUT, " /machine:I386" ); // TODO FIXME - do we need their kludge? //fprintf ( OUT, " /nodefaultlib" if $project =~ /^ntdll$/; # FIXME: Kludge - if ( dll ) fprintf ( OUT, " /def:\"%s.def\"", module.name.c_str() ) + if ( dll ) fprintf ( OUT, " /def:\"%s.def\"", module.name.c_str() ); if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); fprintf ( OUT, "\n" ); } @@ -485,11 +532,13 @@ if ( module.name == "winebuild" ) { fprintf ( OUT, "# Begin Special Build Tool\n" ); - fprintf ( OUT, "SOURCE=\"\$(InputPath)\"\n" ); + fprintf ( OUT, "SOURCE=\"$(InputPath)\"\n" ); fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\n" ); fprintf ( OUT, "PostBuild_Cmds=" ); - fprintf ( OUT, "copy ..\\..\\library\\$output_dir\\wine.dll \$(OutDir)\t" ); - fprintf ( OUT, "copy ..\\..\\unicode\\$output_dir\\wine_unicode.dll \$(OutDir)\n" ); + fprintf ( OUT, "copy ..\\..\\library\\%s\\wine.dll $(OutDir)\t", + output_dir.c_str() ); + fprintf ( OUT, "copy ..\\..\\unicode\\%s\\wine_unicode.dll $(OutDir)\n", + output_dir.c_str() ); fprintf ( OUT, "# End Special Build Tool\n" ); } fprintf ( OUT, "# Begin Target\n" ); @@ -505,18 +554,19 @@ for ( i = 0; i < source_files.size(); i++ ) { - string source_file = DosSeparators(source_files[i]); + string source_file = DosSeparator(source_files[i]); if ( strncmp ( source_file.c_str(), ".\\", 2 ) ) { - source_file = string(".\\") + source_file ); + source_file = string(".\\") + source_file; } if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) { - string basename = string ( source_file, source_file.size() - 5 ); + string basename = string ( source_file.c_str(), source_file.size() - 5 ); - if ( $basename !~ /\..{1,3}$/; ) basename += string(".dll"); + // TODO FIXME - not sure what this is doing? wine hack maybe? + //if ( $basename !~ /\..{1,3}$/; ) basename += string(".dll"); string dbg_c_file = basename + ".dbg.c"; fprintf ( OUT, "# Begin Source File\n" ); @@ -532,12 +582,13 @@ if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) { - string basename = string ( source_file, source_file.size() - 5 ); + string basename = string ( source_file.c_str(), source_file.size() - 5 ); string spec_file = source_file; string def_file = basename + ".def"; - if ( $basename !~ /\..{1,3}$/; ) basename += ".dll"; + // TODO FIXME - not sure what this is doing? wine hack maybe? + //if ( $basename !~ /\..{1,3}$/; ) basename += ".dll"; string dbg_file = basename + ".dbg"; string dbg_c_file = basename + ".dbg.c"; @@ -552,7 +603,7 @@ spec_file.c_str(), def_file.c_str() ); - if ( module.name =~ /^ntdll$/ ) + if ( module.name == "ntdll" ) { int n = 0; for ( i = 0; i < c_srcs.size(); i++ ) @@ -598,11 +649,11 @@ fprintf ( OUT, "\t\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", def_file.c_str() ); - fprintf ( OUT, " \$(BuildCmds)\n" ); + fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n", def_file.c_str() ); + fprintf ( OUT, " $(BuildCmds)\n" ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", dbg_c_file.c_str() ); - fprintf ( OUT, " \$(BuildCmds)\n" ); + fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n", dbg_c_file.c_str() ); + fprintf ( OUT, " $(BuildCmds)\n" ); fprintf ( OUT, "# End Custom Build\n" ); } /*else if ( source_file =~ /([^\\]*?\.h)$/ ) @@ -613,11 +664,11 @@ if($#cfgs == 0) { # Nothing } elsif($n == 0) { - fprintf ( OUT, "!IF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "!IF \"$(CFG)\" == \"$cfg\"\n" ); fprintf ( OUT, "\n" ); } else { fprintf ( OUT, "\n" ); - fprintf ( OUT, "!ELSEIF \"\$(CFG)\" == \"$cfg\"\n" ); + fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"$cfg\"\n" ); fprintf ( OUT, "\n" ); } @@ -633,8 +684,8 @@ fprintf ( OUT, "OutDir=%s\n", output_dir.c_str() ); fprintf ( OUT, "InputPath=%s\n", source_file.c_str() ); fprintf ( OUT, "\n" ); - fprintf ( OUT, "\"\$(OutDir)\\wine\\%s\" : \$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"\n", h_file.c_str() ); - fprintf ( OUT, "\tcopy \"\$(InputPath)\" \"\$(OutDir)\\wine\"\n" ); + fprintf ( OUT, "\"$(OutDir)\\wine\\%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\n", h_file.c_str() ); + fprintf ( OUT, "\tcopy \"$(InputPath)\" \"$(OutDir)\\wine\"\n" ); fprintf ( OUT, "\n" ); fprintf ( OUT, "# End Custom Build\n" ); } @@ -684,7 +735,7 @@ fclose(OUT); } -#endif + void MSVCBackend::_generate_dsw_header ( FILE* OUT ) { _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-08-24 15:37:04 UTC (rev 17514) +++ trunk/reactos/tools/rbuild/module.cpp 2005-08-24 18:13:00 UTC (rev 17515) @@ -24,6 +24,14 @@ using std::vector; string +Right ( const string& s, size_t n ) +{ + if ( n > s.size() ) + return s; + return string ( &s[s.size()-n] ); +} + +string Replace ( const string& s, const string& find, const string& with ) { string ret; _____ Modified: trunk/reactos/tools/rbuild/rbuild.h --- trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 15:37:04 UTC (rev 17514) +++ trunk/reactos/tools/rbuild/rbuild.h 2005-08-24 18:13:00 UTC (rev 17515) @@ -740,6 +740,9 @@ }; extern std::string +Right ( const std::string& s, size_t n ); + +extern std::string Replace ( const std::string& s, const std::string& find, const std::string& with ); extern std::string
19 years, 4 months
1
0
0
0
[hpoussin] 17514: Fix IRP_MJ_QUERY_INFORMATION/FileStandardInformation (current code was trying to dereference NULL pointer)
by hpoussin@svn.reactos.com
Fix IRP_MJ_QUERY_INFORMATION/FileStandardInformation (current code was trying to dereference NULL pointer) Replace MmGetSystemAddressForMdl by MmGetSystemAddressForMdlSafe Modified: trunk/reactos/drivers/dd/serial/devctrl.c Modified: trunk/reactos/drivers/dd/serial/info.c Modified: trunk/reactos/drivers/dd/serial/pnp.c _____ Modified: trunk/reactos/drivers/dd/serial/devctrl.c --- trunk/reactos/drivers/dd/serial/devctrl.c 2005-08-24 15:33:58 UTC (rev 17513) +++ trunk/reactos/drivers/dd/serial/devctrl.c 2005-08-24 15:37:04 UTC (rev 17514) @@ -31,7 +31,7 @@ case METHOD_IN_DIRECT: case METHOD_OUT_DIRECT: *BufferIn = Irp->AssociatedIrp.SystemBuffer; - *BufferOut = MmGetSystemAddressForMdl(Irp->MdlAddress); + *BufferOut = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority); break; case METHOD_NEITHER: *BufferIn = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.Type3Input Buffer; _____ Modified: trunk/reactos/drivers/dd/serial/info.c --- trunk/reactos/drivers/dd/serial/info.c 2005-08-24 15:33:58 UTC (rev 17513) +++ trunk/reactos/drivers/dd/serial/info.c 2005-08-24 15:37:04 UTC (rev 17514) @@ -38,6 +38,7 @@ Status = STATUS_BUFFER_OVERFLOW; else if (!StandardInfo) Status = STATUS_INVALID_PARAMETER; + else { StandardInfo->AllocationSize.QuadPart = 0; StandardInfo->EndOfFile.QuadPart = 0; _____ Modified: trunk/reactos/drivers/dd/serial/pnp.c --- trunk/reactos/drivers/dd/serial/pnp.c 2005-08-24 15:33:58 UTC (rev 17513) +++ trunk/reactos/drivers/dd/serial/pnp.c 2005-08-24 15:37:04 UTC (rev 17514) @@ -274,7 +274,7 @@ if (NT_SUCCESS(Status)) { /* Key = \Device\Serialx, Value = COMx */ - ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, &ComPortBuffer, ComPort.Length + sizeof(WCHAR)); + ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, ComPortBuffer, ComPort.Length + sizeof(WCHAR)); ZwClose(hKey); }
19 years, 4 months
1
0
0
0
[hpoussin] 17513: Replace ExAllocatePool by ExAllocatePoolWithTag
by hpoussin@svn.reactos.com
Replace ExAllocatePool by ExAllocatePoolWithTag Fix CHECKPOINT1 definition for MSVC compiler Modified: trunk/reactos/drivers/bus/serenum/detect.c Modified: trunk/reactos/drivers/bus/serenum/fdo.c Modified: trunk/reactos/drivers/bus/serenum/misc.c Modified: trunk/reactos/drivers/bus/serenum/pdo.c Modified: trunk/reactos/drivers/bus/serenum/serenum.h _____ Modified: trunk/reactos/drivers/bus/serenum/detect.c --- trunk/reactos/drivers/bus/serenum/detect.c 2005-08-24 14:15:54 UTC (rev 17512) +++ trunk/reactos/drivers/bus/serenum/detect.c 2005-08-24 15:33:58 UTC (rev 17513) @@ -193,6 +193,7 @@ ByeBye: if (Pdo) { + ASSERT(PdoDeviceExtension); if (PdoDeviceExtension->DeviceDescription.Buffer) RtlFreeUnicodeString(&PdoDeviceExtension->DeviceDescription); if (PdoDeviceExtension->DeviceId.Buffer) _____ Modified: trunk/reactos/drivers/bus/serenum/fdo.c --- trunk/reactos/drivers/bus/serenum/fdo.c 2005-08-24 14:15:54 UTC (rev 17512) +++ trunk/reactos/drivers/bus/serenum/fdo.c 2005-08-24 15:33:58 UTC (rev 17513) @@ -124,9 +124,10 @@ } NumPDO = (DeviceExtension->AttachedPdo != NULL ? 1 : 0); - DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool( + DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag( PagedPool, - sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1)); + sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (NumPDO - 1), + SERENUM_TAG); if (!DeviceRelations) return STATUS_INSUFFICIENT_RESOURCES; _____ Modified: trunk/reactos/drivers/bus/serenum/misc.c --- trunk/reactos/drivers/bus/serenum/misc.c 2005-08-24 14:15:54 UTC (rev 17512) +++ trunk/reactos/drivers/bus/serenum/misc.c 2005-08-24 15:33:58 UTC (rev 17513) @@ -25,7 +25,7 @@ return STATUS_SUCCESS; } - Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength); + Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG); if (Destination->Buffer == NULL) { return STATUS_INSUFFICIENT_RESOURCES; _____ Modified: trunk/reactos/drivers/bus/serenum/pdo.c --- trunk/reactos/drivers/bus/serenum/pdo.c 2005-08-24 14:15:54 UTC (rev 17512) +++ trunk/reactos/drivers/bus/serenum/pdo.c 2005-08-24 15:33:58 UTC (rev 17513) @@ -233,7 +233,7 @@ DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n"); Source = &((PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->DeviceDescripti on; - Description = ExAllocatePool(PagedPool, Source->Length + sizeof(WCHAR)); + Description = ExAllocatePoolWithTag(PagedPool, Source->Length + sizeof(WCHAR), SERENUM_TAG); if (!Description) Status = STATUS_INSUFFICIENT_RESOURCES; else @@ -277,7 +277,7 @@ PPNP_BUS_INFORMATION BusInfo; DPRINT("Serenum: IRP_MJ_PNP / IRP_MN_QUERY_BUS_INFORMATION\n"); - BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION)); + BusInfo = (PPNP_BUS_INFORMATION)ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), SERENUM_TAG); if (!BusInfo) Status = STATUS_INSUFFICIENT_RESOURCES; else _____ Modified: trunk/reactos/drivers/bus/serenum/serenum.h --- trunk/reactos/drivers/bus/serenum/serenum.h 2005-08-24 14:15:54 UTC (rev 17512) +++ trunk/reactos/drivers/bus/serenum/serenum.h 2005-08-24 15:33:58 UTC (rev 17513) @@ -17,7 +17,7 @@ #define STDCALL #define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint - #define CHECKPOINT1 DbgPrint("(%s:%d)\n") + #define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__) #define DPRINT DPRINT1 #define CHECKPOINT CHECKPOINT1 #else
19 years, 4 months
1
0
0
0
[navaraf] 17512: Make BusyLoop volatile. Spotted by Thomas.
by navaraf@svn.reactos.com
Make BusyLoop volatile. Spotted by Thomas. Modified: trunk/reactos/drivers/net/ndis/ndis/control.c _____ Modified: trunk/reactos/drivers/net/ndis/ndis/control.c --- trunk/reactos/drivers/net/ndis/ndis/control.c 2005-08-24 12:21:18 UTC (rev 17511) +++ trunk/reactos/drivers/net/ndis/ndis/control.c 2005-08-24 14:15:54 UTC (rev 17512) @@ -50,7 +50,7 @@ { ULONG RefCount; UCHAR ProcessorNumber; - UCHAR BusyLoop; + volatile UCHAR BusyLoop; ASSERT_IRQL(DISPATCH_LEVEL);
19 years, 4 months
1
0
0
0
[navaraf] 17511: Implement the most over-optimized lock in NT - the NDIS_RW_LOCK.
by navaraf@svn.reactos.com
Implement the most over-optimized lock in NT - the NDIS_RW_LOCK. Modified: trunk/reactos/drivers/net/ndis/ndis/control.c Modified: trunk/reactos/drivers/net/ndis/ndis/main.c Modified: trunk/reactos/drivers/net/ndis/ndis/stubs.c _____ Modified: trunk/reactos/drivers/net/ndis/ndis/control.c --- trunk/reactos/drivers/net/ndis/ndis/control.c 2005-08-24 12:20:59 UTC (rev 17510) +++ trunk/reactos/drivers/net/ndis/ndis/control.c 2005-08-24 12:21:18 UTC (rev 17511) @@ -14,10 +14,29 @@ /* - * @unimplemented + * @implemented */ VOID EXPORT +NdisInitializeReadWriteLock( + IN PNDIS_RW_LOCK Lock) +/* + * FUNCTION: Initialize a NDIS_RW_LOCK + * ARGUMENTS: + * Lock: pointer to the lock to initialize + * NOTES: + * NDIS 5.0 + */ +{ + RtlZeroMemory(Lock, sizeof(NDIS_RW_LOCK)); +} + + +/* + * @implemented + */ +VOID +EXPORT NdisAcquireReadWriteLock( IN PNDIS_RW_LOCK Lock, IN BOOLEAN fWrite, @@ -29,13 +48,88 @@ * NDIS 5.0 */ { - UNIMPLEMENTED + ULONG RefCount; + UCHAR ProcessorNumber; + UCHAR BusyLoop; + + ASSERT_IRQL(DISPATCH_LEVEL); + + if (fWrite) { + if (Lock->Context == PsGetCurrentThread()) { + LockState->LockState = 2; + } else { + KeAcquireSpinLock(&Lock->SpinLock, &LockState->OldIrql); + /* Check if any other processor helds a shared lock. */ + for (ProcessorNumber = KeNumberProcessors; ProcessorNumber--; ) { + if (ProcessorNumber != KeGetCurrentProcessorNumber()) { + /* Wait till the shared lock is released. */ + while (Lock->RefCount[ProcessorNumber].RefCount != 0) { + for (BusyLoop = 32; BusyLoop--; ) + ; + } + } + } + Lock->Context = PsGetCurrentThread(); + LockState->LockState = 4; + } + } else { + KeRaiseIrql(DISPATCH_LEVEL, &LockState->OldIrql); + RefCount = InterlockedIncrement((PLONG)&Lock->RefCount[KeGetCurrentProcessorNumber( )].RefCount); + /* Racing with a exclusive write lock case. */ + if (Lock->SpinLock != 0) { + if (RefCount == 1) { + if (Lock->Context != PsGetCurrentThread()) { + /* Wait for the exclusive lock to be released. */ + Lock->RefCount[KeGetCurrentProcessorNumber()].RefCount--; + KefAcquireSpinLockAtDpcLevel(&Lock->SpinLock); + Lock->RefCount[KeGetCurrentProcessorNumber()].RefCount++; + KefReleaseSpinLockFromDpcLevel(&Lock->SpinLock); + } + } + } + LockState->LockState = 3; + } } /* * @implemented */ +VOID +EXPORT +NdisReleaseReadWriteLock( + IN PNDIS_RW_LOCK Lock, + IN PLOCK_STATE LockState) +/* + * FUNCTION: + * ARGUMENTS: + * NOTES: + * NDIS 5.0 + */ +{ + switch (LockState->LockState) { + case 2: /* Exclusive write lock, recursive */ + return; + + case 3: /* Shared read lock */ + Lock->RefCount[KeGetCurrentProcessorNumber()].RefCount--; + LockState->LockState = -1; + if (LockState->OldIrql < DISPATCH_LEVEL) + KeLowerIrql(LockState->OldIrql); + return; + + case 4: /* Exclusive write lock */ + Lock->Context = NULL; + LockState->LockState = -1; + KfReleaseSpinLock(&Lock->SpinLock, LockState->OldIrql); + return; + } +} + + +/* + * @implemented + */ #undef NdisAcquireSpinLock VOID EXPORT _____ Modified: trunk/reactos/drivers/net/ndis/ndis/main.c --- trunk/reactos/drivers/net/ndis/ndis/main.c 2005-08-24 12:20:59 UTC (rev 17510) +++ trunk/reactos/drivers/net/ndis/ndis/main.c 2005-08-24 12:21:18 UTC (rev 17511) @@ -97,25 +97,6 @@ /* * @implemented */ -VOID -EXPORT -NdisInitializeReadWriteLock( - IN PNDIS_RW_LOCK Lock) -/* - * FUNCTION: Initialize a NDIS_RW_LOCK - * ARGUMENTS: - * Lock: pointer to the lock to initialize - * NOTES: - * NDIS 5.0 - */ -{ - memset(Lock,0,sizeof(NDIS_RW_LOCK)); -} - - -/* - * @implemented - */ NDIS_STATUS EXPORT NdisWriteEventLogEntry( _____ Modified: trunk/reactos/drivers/net/ndis/ndis/stubs.c --- trunk/reactos/drivers/net/ndis/ndis/stubs.c 2005-08-24 12:20:59 UTC (rev 17510) +++ trunk/reactos/drivers/net/ndis/ndis/stubs.c 2005-08-24 12:21:18 UTC (rev 17511) @@ -857,24 +857,6 @@ /* * @unimplemented */ -VOID -EXPORT -NdisReleaseReadWriteLock( - IN PNDIS_RW_LOCK Lock, - IN PLOCK_STATE LockState) -/* - * FUNCTION: - * ARGUMENTS: - * NOTES: - * NDIS 5.0 - */ -{ - UNIMPLEMENTED -} - -/* - * @unimplemented - */ ULONG EXPORT NdisWritePcmciaAttributeMemory(
19 years, 4 months
1
0
0
0
[navaraf] 17510: Fix the NDIS_RW_LOCK structure.
by navaraf@svn.reactos.com
Fix the NDIS_RW_LOCK structure. Modified: trunk/reactos/w32api/include/ddk/ndis.h _____ Modified: trunk/reactos/w32api/include/ddk/ndis.h --- trunk/reactos/w32api/include/ddk/ndis.h 2005-08-24 09:50:18 UTC (rev 17509) +++ trunk/reactos/w32api/include/ddk/ndis.h 2005-08-24 12:20:59 UTC (rev 17510) @@ -251,9 +251,9 @@ struct { KSPIN_LOCK SpinLock; PVOID Context; - } s; + }; UCHAR Reserved[16]; - } u; + }; NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS]; } NDIS_RW_LOCK, *PNDIS_RW_LOCK;
19 years, 4 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200