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
October 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
26 participants
737 discussions
Start a n
N
ew thread
[weiden] 18298: fixed warnings when compiled with -Wmissing-declarations
by weiden@svn.reactos.com
fixed warnings when compiled with -Wmissing-declarations Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c Modified: trunk/reactos/boot/freeldr/freeldr/cache/cache.c Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h Modified: trunk/reactos/boot/freeldr/freeldr/include/rtl.h Modified: trunk/reactos/boot/freeldr/freeldr/include/ui.h Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c Modified: trunk/reactos/boot/freeldr/freeldr/reactos/loader.c Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Modified: trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -30,6 +30,7 @@ #include "../../reactos/registry.h" #include "hardware.h" +#include "machpc.h" #define MILLISEC (10) _____ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -89,8 +89,8 @@ // second list. In some cases, only a "stub" VBE may be present, supporting // only AX=4F00h; this case may be assumed if the list of supported video modes // is empty (consisting of a single word of FFFFh) - -VOID BiosSetVideoFont8x16(VOID) +#if 0 +static VOID BiosSetVideoFont8x16(VOID) { REGS Regs; @@ -106,11 +106,11 @@ Int386(0x10, &Regs, &Regs); } -VOID VideoSetTextCursorPosition(ULONG X, ULONG Y) +static VOID VideoSetTextCursorPosition(ULONG X, ULONG Y) { } -ULONG VideoGetTextCursorPositionX(VOID) +static ULONG VideoGetTextCursorPositionX(VOID) { REGS Regs; @@ -135,7 +135,7 @@ return Regs.b.dl; } -ULONG VideoGetTextCursorPositionY(VOID) +static ULONG VideoGetTextCursorPositionY(VOID) { REGS Regs; @@ -159,6 +159,7 @@ return Regs.b.dh; } +#endif USHORT BiosIsVesaSupported(VOID) { _____ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -249,7 +249,8 @@ Int386(0x10, &Regs, &Regs); } -VOID PcVideoSelectAlternatePrintScreen(VOID) +static VOID +PcVideoSelectAlternatePrintScreen(VOID) { REGS Regs; @@ -272,7 +273,8 @@ Int386(0x10, &Regs, &Regs); } -VOID PcVideoDisableCursorEmulation(VOID) +static VOID +PcVideoDisableCursorEmulation(VOID) { REGS Regs; _____ Modified: trunk/reactos/boot/freeldr/freeldr/cache/cache.c --- trunk/reactos/boot/freeldr/freeldr/cache/cache.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/cache/cache.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -23,6 +23,7 @@ #include <mm.h> #include <disk.h> #include <machine.h> +#include <cache.h> #include <rtl.h> #include <debug.h> _____ Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c --- trunk/reactos/boot/freeldr/freeldr/fs/fat.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -616,7 +616,7 @@ return FALSE; } -BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) +static BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) { ULONG EntryCount; ULONG CurrentEntry; _____ Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c --- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -45,7 +45,7 @@ PNTFS_MFT_RECORD NtfsMasterFileTable; NTFS_ATTR_CONTEXT NtfsMFTContext; -PUCHAR NtfsDecodeRun(PUCHAR DataRun, LONGLONG *DataRunOffset, ULONGLONG *DataRunLength) +static PUCHAR NtfsDecodeRun(PUCHAR DataRun, LONGLONG *DataRunOffset, ULONGLONG *DataRunLength) { UCHAR DataRunOffsetSize; UCHAR DataRunLengthSize; @@ -87,7 +87,7 @@ } /* FIXME: Add support for attribute lists! */ -BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, ULONG Type, PWCHAR Name) +static BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, ULONG Type, PWCHAR Name) { PNTFS_ATTR_RECORD AttrRecord; PNTFS_ATTR_RECORD AttrRecordEnd; @@ -148,7 +148,7 @@ } /* FIXME: Optimize for multisector reads. */ -BOOL NtfsDiskRead(ULONGLONG Offset, ULONGLONG Length, PCHAR Buffer) +static BOOL NtfsDiskRead(ULONGLONG Offset, ULONGLONG Length, PCHAR Buffer) { USHORT ReadLength; @@ -190,7 +190,7 @@ return TRUE; } -ULONGLONG NtfsReadAttribute(PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONGLONG Length) +static ULONGLONG NtfsReadAttribute(PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONGLONG Length) { ULONGLONG LastLCN; PUCHAR DataRun; @@ -314,7 +314,7 @@ return AlreadyRead; } -BOOL NtfsFixupRecord(PNTFS_RECORD Record) +static BOOL NtfsFixupRecord(PNTFS_RECORD Record) { USHORT *USA; USHORT USANumber; @@ -338,7 +338,7 @@ return TRUE; } -BOOL NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer) +static BOOL NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer) { ULONGLONG BytesRead; @@ -369,7 +369,7 @@ } #endif -BOOL NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) +static BOOL NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) { PWCHAR EntryFileName; UCHAR EntryFileNameLength; @@ -402,7 +402,7 @@ return TRUE; } -BOOL NtfsFindMftRecord(ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex) +static BOOL NtfsFindMftRecord(ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex) { PNTFS_MFT_RECORD MftRecord; ULONG Magic; @@ -563,7 +563,7 @@ return FALSE; } -BOOL NtfsLookupFile(PCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext) +static BOOL NtfsLookupFile(PCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext) { ULONG NumberOfPathParts; CHAR PathPart[261]; _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h --- trunk/reactos/boot/freeldr/freeldr/include/machine.h 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h 2005-10-06 19:24:15 UTC (rev 18298) @@ -76,6 +76,43 @@ extern MACHVTBL MachVtbl; +VOID MachConsPutChar(int Ch); +BOOL MachConsKbHit(); +int MachConsGetCh(); +VOID MachVideoClearScreen(UCHAR Attr); +VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOL Init); +VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); +ULONG MachVideoGetBufferSize(VOID); +VOID MachVideoSetTextCursorPosition(ULONG X, ULONG Y); +VOID MachVideoHideShowTextCursor(BOOL Show); +VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); +VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer); +BOOL MachVideoIsPaletteFixed(VOID); +VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); +VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue); +VOID MachVideoSync(VOID); +VOID MachVideoPrepareForReactOS(VOID); +ULONG MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); +BOOL MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); +BOOL +MachDiskGetSystemVolume(char *SystemPath, + char *RemainingPath, + PULONG Device, + PULONG DriveNumber, + PULONGLONG StartSector, + PULONGLONG SectorCount, + int *FsType); +BOOL MachDiskGetBootPath(char *BootPath, unsigned Size); +VOID MachDiskGetBootDevice(PULONG BootDevice); +BOOL MachDiskBootingFromFloppy(); +BOOL MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size); +BOOL MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOL MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOL MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); +ULONG MachDiskGetCacheableBlockCount(ULONG DriveNumber); +VOID MachRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second); +VOID MachHwDetect(VOID); + #define MachConsPutChar(Ch) MachVtbl.ConsPutChar(Ch) #define MachConsKbHit() MachVtbl.ConsKbHit() #define MachConsGetCh() MachVtbl.ConsGetCh() _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/rtl.h --- trunk/reactos/boot/freeldr/freeldr/include/rtl.h 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/include/rtl.h 2005-10-06 19:24:15 UTC (rev 18298) @@ -48,8 +48,8 @@ int isdigit(int c); int isxdigit(int c); -char * convert_to_ascii(char *buf, int c, ...); -char * convert_i64_to_ascii(char *buf, int c, ...); +char * convert_to_ascii(char *buf, int c, int num); +char * convert_i64_to_ascii(char *buf, int c, unsigned long long num); void beep(void); void delay(unsigned msec); _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/ui.h --- trunk/reactos/boot/freeldr/freeldr/include/ui.h 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/include/ui.h 2005-10-06 19:24:15 UTC (rev 18298) @@ -55,6 +55,7 @@ // //////////////////////////////////////////////////////////////////////// /////////////// BOOL UiInitialize(BOOLEAN ShowGui); // Initialize User-Interface +BOOL SetupUiInitialize(VOID); // Initialize User-Interface VOID UiUnInitialize(PCHAR BootText); // Un-initialize User-Interface VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c --- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -1256,7 +1256,7 @@ } -BOOL +static BOOL CmiExportHive (PREGISTRY_HIVE Hive, PCHAR KeyName) { _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/loader.c --- trunk/reactos/boot/freeldr/freeldr/reactos/loader.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/reactos/loader.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -231,7 +231,7 @@ * will be used by the Kernel. * *--*/ -VOID +static VOID FASTCALL FrLdrGetKernelBase(VOID) { _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -34,7 +34,7 @@ unsigned long reactos_memory_map_descriptor_size; memory_map_t reactos_memory_map[32]; // Memory map -BOOL +static BOOL STDCALL FrLdrLoadKernel(PCHAR szFileName, INT nPos) @@ -144,7 +144,7 @@ return TRUE; } -BOOL +static BOOL FrLdrLoadNlsFile(PCHAR szFileName, PCHAR szModuleName) { @@ -183,7 +183,7 @@ return(TRUE); } -BOOL +static BOOL FrLdrLoadNlsFiles(PCHAR szSystemRoot, PCHAR szErrorOut) { @@ -301,7 +301,7 @@ return(TRUE); } -BOOL +static BOOL FrLdrLoadDriver(PCHAR szFileName, INT nPos) { @@ -344,7 +344,7 @@ return(TRUE); } -VOID +static VOID FrLdrLoadBootDrivers(PCHAR szSystemRoot, INT nPos) { _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c --- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -308,8 +308,6 @@ return(TRUE); } -BOOL SetupUiInitialize(VOID); - VOID RunLoader(VOID) { ULONG_PTR Base; _____ Modified: trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c --- trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c 2005-10-06 18:51:52 UTC (rev 18297) +++ trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c 2005-10-06 19:24:15 UTC (rev 18298) @@ -17,6 +17,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <rtl.h> + /* * convert_to_ascii() - converts a number to it's ascii equivalent * from:
19 years, 2 months
1
0
0
0
[weiden] 18297: fixed warnings when compiled with -Wmissing-declarations
by weiden@svn.reactos.com
fixed warnings when compiled with -Wmissing-declarations Modified: trunk/reactos/apps/utils/net/finger/finger.c Modified: trunk/reactos/apps/utils/net/finger/getopt.c Modified: trunk/reactos/apps/utils/net/finger/various.h Modified: trunk/reactos/apps/utils/net/ftp/cmds.c Modified: trunk/reactos/apps/utils/net/ftp/cmdtab.c Modified: trunk/reactos/apps/utils/net/ftp/domacro.c Modified: trunk/reactos/apps/utils/net/ftp/fake.c Modified: trunk/reactos/apps/utils/net/ftp/ftp.c Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h Modified: trunk/reactos/apps/utils/net/ftp/main.c Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c Modified: trunk/reactos/apps/utils/net/netstat/netstat.c Modified: trunk/reactos/apps/utils/net/ping/ping.c Modified: trunk/reactos/apps/utils/net/route/route.c Modified: trunk/reactos/apps/utils/net/tracert/tracert.c Modified: trunk/reactos/apps/utils/net/tracert/tracert.h Modified: trunk/reactos/apps/utils/net/whois/whois.c Modified: trunk/reactos/apps/utils/ps/ps.c _____ Modified: trunk/reactos/apps/utils/net/finger/finger.c --- trunk/reactos/apps/utils/net/finger/finger.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/finger/finger.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -74,7 +74,6 @@ static void userlist(int, char **); void usage(); -void netfinger(char *); int main(int argc, char **argv) _____ Modified: trunk/reactos/apps/utils/net/finger/getopt.c --- trunk/reactos/apps/utils/net/finger/getopt.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/finger/getopt.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -42,6 +42,8 @@ #include <stdlib.h> #include <string.h> +#include "getopt.h" + /* * get option letter from argument vector */ _____ Modified: trunk/reactos/apps/utils/net/finger/various.h --- trunk/reactos/apps/utils/net/finger/various.h 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/finger/various.h 2005-10-06 18:51:52 UTC (rev 18297) @@ -31,4 +31,6 @@ #define index(s, c) strchr(s, c) #define rindex(s, c) strrchr(s, c) +void netfinger(char *); + #endif _____ Modified: trunk/reactos/apps/utils/net/ftp/cmds.c --- trunk/reactos/apps/utils/net/ftp/cmds.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/cmds.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -46,7 +46,6 @@ #include "prototypes.h" extern char *globerr; -extern char **glob(); extern char home[]; extern char *remglob(); extern char *getenv(); @@ -67,7 +66,7 @@ */ void setpeer(int argc, char *argv[]) { - char *host, *hookup(); + char *host; if (connected) { printf("Already connected to %s, use close first.\n", @@ -266,9 +265,9 @@ /* * Set file transfer mode. */ -#if 0 + /*ARGSUSED*/ -void setmode(argc, argv) +void fsetmode(argc, argv) char *argv[]; { @@ -276,8 +275,8 @@ (void) fflush(stdout); code = -1; } -#endif + /* * Set file transfer format. */ @@ -379,7 +378,6 @@ { register int i; int ointer; - void mabort(); extern jmp_buf jabort; char *tp; @@ -650,7 +648,8 @@ return (0); } -void +#if 0 +static void mabort() { int ointer; @@ -670,6 +669,7 @@ mflag = 0; longjmp(jabort,0); } +#endif /* * Get multiple files. @@ -679,7 +679,6 @@ { char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN]; int ointer; - void mabort(); extern jmp_buf jabort; if (argc < 2) { @@ -809,7 +808,7 @@ return (buf); } -char * +static char * onoff(bool) int bool; { @@ -1094,7 +1093,6 @@ { char *cp; int ointer; - void mabort(); extern jmp_buf jabort; if (argc < 2) { @@ -1217,7 +1215,6 @@ { char *cmd, mode[1], *dest; int ointer, i; - void mabort(); extern jmp_buf jabort; if (argc < 2) { @@ -1276,7 +1273,7 @@ * Do a shell escape */ /*ARGSUSED*/ -int shell(argc, argv) +void shell(argc, argv) char *argv[]; { #if 0 @@ -1344,7 +1341,7 @@ if (NumBytes == 0) { - return(-1); + return; } AppName = ShellCmd; @@ -1391,21 +1388,12 @@ CloseHandle( ProcessInformation.hProcess); } - - if (Result) - { - return(-1); - } - else - { - return(0); - } } /* * Send new user information (re-login) */ -int user(argc, argv) +void user(argc, argv) int argc; char **argv; { @@ -1425,7 +1413,7 @@ printf("usage: %s username [password] [account]\n", argv[0]); (void) fflush(stdout); code = -1; - return (0); + return; } n = command("USER %s", argv[1]); if (n == CONTINUE) { @@ -1447,12 +1435,11 @@ if (n != COMPLETE) { fprintf(stdout, "Login failed.\n"); (void) fflush(stdout); - return (0); + return; } if (!aflag && argc == 4) { (void) command("ACCT %s", argv[3]); } - return (1); } /* @@ -1717,13 +1704,15 @@ return (*line != 'n' && *line != 'N'); } -void fatal(msg) +#if 0 +static void fatal(msg) char *msg; { fprintf(stderr, "ftp: %s\n", msg); exit(1); } +#endif /* * Glob a local file name specification with @@ -1785,7 +1774,8 @@ jmp_buf abortprox; -void +#if 0 +static void proxabort() { extern int proxy; @@ -1802,12 +1792,12 @@ pswitch(0); longjmp(abortprox,1); } +#endif void doproxy(argc,argv) int argc; char *argv[]; { - void proxabort(); register struct cmd *c; struct cmd *getcmd(); // extern struct cmd cmdtab[]; _____ Modified: trunk/reactos/apps/utils/net/ftp/cmdtab.c --- trunk/reactos/apps/utils/net/ftp/cmdtab.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/cmdtab.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -24,20 +24,6 @@ /* * User FTP -- Command Tables. */ -int setascii(), setbell(), setbinary(), setdebug(), setform(); -int setglob(), sethash(), setmode(), setpeer(), setpassive(), setport(); -int setprompt(), setstruct(); -int settenex(), settrace(), settype(), setverbose(); -int disconnect(), restart(), reget(), syst(); -int cd(), lcd(), delete(), mdelete(), user(); -int ls(), mls(), get(), mget(), help(), append(), put(), mput(); -int quit(), renamefile(), status(); -int quote(), rmthelp(), shell(), site(); -int pwd(), makedir(), removedir(), setcr(); -int account(), doproxy(), reset(), setcase(), setntrans(), setnmap(); -int setsunique(), setrunique(), cdup(), macdef(), domacro(); -int sizecmd(), modtime(), newer(), rmtstatus(); -int do_chmod(), do_umask(), idle(); char accounthelp[] = "send account command to remote server"; char appendhelp[] = "append to a file"; @@ -140,7 +126,7 @@ { "mget", mgethelp, 1, 1, 1, mget }, { "mkdir", mkdirhelp, 0, 1, 1, makedir }, { "mls", mlshelp, 1, 1, 1, mls }, - { "mode", modehelp, 0, 1, 1, setmode }, + { "mode", modehelp, 0, 1, 1, fsetmode }, { "modtime", modtimehelp, 0, 1, 1, modtime }, { "mput", mputhelp, 1, 1, 1, mput }, { "newer", newerhelp, 1, 1, 1, newer }, _____ Modified: trunk/reactos/apps/utils/net/ftp/domacro.c --- trunk/reactos/apps/utils/net/ftp/domacro.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/domacro.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -36,7 +36,6 @@ register char *cp1, *cp2; int count = 2, loopflg = 0; char line2[200]; - extern char **glob(); struct cmd *getcmd(), *c; if (argc < 2) { _____ Modified: trunk/reactos/apps/utils/net/ftp/fake.c --- trunk/reactos/apps/utils/net/ftp/fake.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/fake.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -35,12 +35,11 @@ free(*av++); } -char *glob(register char *v) +char **glob(register char *v) { return NULL; } - int sleep(int time) { return time; @@ -50,8 +49,8 @@ { return 0; } + #if 0 - int gettimeofday(struct timeval *timenow, struct timezone *zone) { @@ -294,11 +293,13 @@ return NULL; } +#if 0 // Stubbed out here. Should be changed in Source code... int access(const char *filename, int accessmethod) { return 0; } +#endif #ifndef __GNUC__ #define EPOCHFILETIME (116444736000000000i64) _____ Modified: trunk/reactos/apps/utils/net/ftp/ftp.c --- trunk/reactos/apps/utils/net/ftp/ftp.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/ftp.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -260,7 +260,7 @@ return (1); } -void +static void cmdabort(int sig) { extern jmp_buf ptabort; @@ -422,7 +422,7 @@ } } -int +static int empty(mask, sec) struct fd_set *mask; int sec; @@ -436,6 +436,7 @@ jmp_buf sendabort; +#if 0 void abortsend() { @@ -445,6 +446,7 @@ (void) fflush(stdout); longjmp(sendabort, 1); } +#endif #define HASHBYTES 1024 @@ -454,7 +456,6 @@ int dout = 0; int (*closefunc)(), _pclose(), fclose(); sig_t (*oldintr)(), (*oldintp)(); - void abortsend(); char buf[BUFSIZ], *bufp; long bytes = 0, hashbytes = HASHBYTES; register int c, d; @@ -710,7 +711,7 @@ jmp_buf recvabort; - +#if 0 void abortrecv() { @@ -720,6 +721,7 @@ (void) fflush(stdout); longjmp(recvabort, 1); } +#endif void recvrequest(char *cmd, char *local, char *remote, char *mode, int printnames) @@ -728,9 +730,8 @@ int din = 0; int (*closefunc)(), _pclose(), fclose(); void (*oldintr)(int), (*oldintp)(int); - void abortrecv(); int oldverbose = 0, oldtype = 0, is_retr, tcrflag, nfnd, bare_lfs = 0; - char *gunique(), msg; + char msg; // static char *buf; // Szurgot: Shouldn't this go SOMEWHERE? char buf[1024]; static int bufsize = 1024; @@ -1417,6 +1418,7 @@ jmp_buf ptabort; int ptabflg; +#if 0 void abortpt() { @@ -1427,12 +1429,12 @@ abrtflag = 0; longjmp(ptabort, 1); } +#endif void proxtrans(cmd, local, remote) char *cmd, *local, *remote; { // void (*oldintr)(int); - //void abortpt(int); int tmptype, oldtype = 0, secndflag = 0, nfnd; extern jmp_buf ptabort; char *cmd2; @@ -1756,6 +1758,7 @@ } } +#if 0 char * gunique(local) char *local; @@ -1802,6 +1805,7 @@ } return(new); } +#endif int null(void) { _____ Modified: trunk/reactos/apps/utils/net/ftp/ftp_var.h --- trunk/reactos/apps/utils/net/ftp/ftp_var.h 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/ftp_var.h 2005-10-06 18:51:52 UTC (rev 18297) @@ -1,18 +1,10 @@ #include <winsock.h> #include "fake.h" +#include "prototypes.h" #include <setjmp.h> //typedef void (*Sig_t)(int); -int fgetcSocket(int s); -char *fputsSocket(char *format, int s); - -char *fprintfSocket(int s, char *format, ...); - -int fputcSocket(int s, char putChar); -int fputSocket(int s, char *putChar, int len); -char *fgetsSocket(int s, char *string); - /* The following defines are from ftp.h and telnet.h from bsd.h */ /* All relevent copyrights below apply. */ @@ -153,7 +145,7 @@ char c_bell; /* give bell when command completes */ char c_conn; /* must be connected to use command */ char c_proxy; /* proxy server may execute */ - int (*c_handler)(); /* function to call */ + void (*c_handler)(); /* function to call */ }; struct macel { @@ -166,11 +158,6 @@ struct macel macros[16]; char macbuf[4096]; -extern char *tail(); -extern char *remglob(); -extern int errno; -extern char *mktemp(); - #if defined(__ANSI__) || defined(sparc) typedef void sig_t; #else @@ -178,4 +165,4 @@ #endif typedef int uid_t; -int herror(char *s); + _____ Modified: trunk/reactos/apps/utils/net/ftp/main.c --- trunk/reactos/apps/utils/net/ftp/main.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/main.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -121,6 +121,7 @@ int options; /* used during socket creation */ +static char *slurpstring(); int main(int argc, char *argv[]) @@ -310,8 +311,6 @@ int top; { register struct cmd *c; - struct cmd *getcmd(); - extern int help(); if (!top) (void) putchar('\n'); @@ -395,7 +394,6 @@ void makeargv() { char **argp; - char *slurpstring(); margc = 0; argp = margv; @@ -411,7 +409,7 @@ * implemented with FSM to * handle quoting and strings */ -char * +static char * slurpstring() { int got_one = 0; @@ -535,7 +533,7 @@ * Help command. * Call each command handler with argc == 0 and argv[0] == name. */ -int help(argc, argv) +void help(argc, argv) int argc; char *argv[]; { @@ -582,7 +580,7 @@ } } (void) fflush(stdout); - return 0; + return; } while (--argc > 0) { register char *arg; @@ -597,5 +595,4 @@ c->c_name, c->c_help); } (void) fflush(stdout); - return 0; } _____ Modified: trunk/reactos/apps/utils/net/ftp/prototypes.h --- trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ftp/prototypes.h 2005-10-06 18:51:52 UTC (rev 18297) @@ -1,4 +1,17 @@ +int fgetcSocket(int s); +char *fputsSocket(char *format, int s); + +char *fprintfSocket(int s, char *format, ...); + +int fputcSocket(int s, char putChar); +int fputSocket(int s, char *putChar, int len); +char *fgetsSocket(int s, char *string); + +char *hookup(); +char **glob(); +int herror(char *s); + int getreply(int expecteof); int ruserpass(char *host, char **aname, char **apass, char **aacct); char *getpass(const char *prompt); @@ -29,3 +42,25 @@ void blkfree(char **av0); int getit(int argc, char *argv[], int restartit, char *mode); int sleep(int time); + +char *tail(); +int errno; +char *mktemp(); +void setbell(), setdebug(); +void setglob(), sethash(), setport(); +void setprompt(); +void settrace(), setverbose(); +void settype(), setform(), setstruct(); +void restart(), syst(); +void cd(), lcd(), delete(), mdelete(); +void ls(), mls(), get(), mget(), help(), append(), put(), mput(), reget(); +void status(); +void renamefile(); +void quote(), rmthelp(), site(); +void pwd(), makedir(), removedir(), setcr(); +void account(), doproxy(), reset(), setcase(), setntrans(), setnmap(); +void setsunique(), setrunique(), cdup(), macdef(); +void sizecmd(), modtime(), newer(), rmtstatus(); +void do_chmod(), do_umask(), idle(); +void shell(), user(), fsetmode(); +struct cmd *getcmd(); _____ Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c --- trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -73,7 +73,7 @@ } } -void PrintPhysicalAddr(PBYTE Addr, UINT len) +static void PrintPhysicalAddr(PBYTE Addr, UINT len) { UINT i=0; for (i=0; i<len; i++) _____ Modified: trunk/reactos/apps/utils/net/netstat/netstat.c --- trunk/reactos/apps/utils/net/netstat/netstat.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/netstat/netstat.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -50,7 +50,7 @@ "DELETE_TCB" }; -VOID PrintError(DWORD ErrorCode) +static VOID PrintError(DWORD ErrorCode) { LPVOID lpMsgBuf; @@ -182,37 +182,6 @@ } #endif -/* -typedef struct { - UINT idLength; - UINT* ids; -} AsnObjectIdentifier; - -VOID SnmpUtilPrintAsnAny(AsnAny* pAny); // pointer to value to print -VOID SnmpUtilPrintOid(AsnObjectIdentifier* Oid); // object identifier to print - - */ -void test_snmp(void) -{ - int nBytes = 500; - BYTE* pCache; - - pCache = (BYTE*)SnmpUtilMemAlloc(nBytes); - if (pCache != NULL) { - AsnObjectIdentifier* pOidSrc = NULL; - AsnObjectIdentifier AsnObId; - if (SnmpUtilOidCpy(&AsnObId, pOidSrc)) { - // - // - // - SnmpUtilOidFree(&AsnObId); - } - SnmpUtilMemFree(pCache); - } else { - _tprintf(_T("ERROR: call to SnmpUtilMemAlloc() failed\n")); - } -} - // Maximum string lengths for ASCII ip address and port names // #define HOSTNAMELEN 256 @@ -264,7 +233,7 @@ // // Translate port numbers into their text equivalent if there is one // -PCHAR +static PCHAR GetPortName(DWORD Flags, UINT port, PCHAR proto, PCHAR name, int namelen) { struct servent *psrvent; @@ -288,7 +257,7 @@ // // Translate IP addresses into their name-resolved form if possible. // -PCHAR +static PCHAR GetIpHostName(DWORD Flags, BOOL local, UINT ipaddr, PCHAR name, int namelen) { // struct hostent *phostent; @@ -352,7 +321,7 @@ return name; } -BOOLEAN usage(void) +static BOOLEAN usage(void) { TCHAR buffer[MAX_RESLEN]; @@ -366,7 +335,7 @@ // // Parses the command line arguments. // -BOOLEAN +static BOOLEAN GetOptions(int argc, char *argv[], PDWORD pFlags) { int i, j; @@ -498,6 +467,37 @@ #else +/* +typedef struct { + UINT idLength; + UINT* ids; +} AsnObjectIdentifier; + +VOID SnmpUtilPrintAsnAny(AsnAny* pAny); // pointer to value to print +VOID SnmpUtilPrintOid(AsnObjectIdentifier* Oid); // object identifier to print + + */ +static void test_snmp(void) +{ + int nBytes = 500; + BYTE* pCache; + + pCache = (BYTE*)SnmpUtilMemAlloc(nBytes); + if (pCache != NULL) { + AsnObjectIdentifier* pOidSrc = NULL; + AsnObjectIdentifier AsnObId; + if (SnmpUtilOidCpy(&AsnObId, pOidSrc)) { + // + // + // + SnmpUtilOidFree(&AsnObId); + } + SnmpUtilMemFree(pCache); + } else { + _tprintf(_T("ERROR: call to SnmpUtilMemAlloc() failed\n")); + } +} + int main(int argc, char *argv[]) { if (argc > 1) { _____ Modified: trunk/reactos/apps/utils/net/ping/ping.c --- trunk/reactos/apps/utils/net/ping/ping.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/ping/ping.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -106,7 +106,7 @@ /* Display the contents of a buffer */ -VOID DisplayBuffer( +static VOID DisplayBuffer( PVOID Buffer, DWORD Size) { @@ -125,7 +125,7 @@ } /* Display usage information on screen */ -VOID Usage(VOID) +static VOID Usage(VOID) { printf("\nUsage: ping [-t] [-n count] [-l size] [-w timeout] destination-host\n\n"); printf("Options:\n"); @@ -137,7 +137,7 @@ } /* Reset configuration to default values */ -VOID Reset(VOID) +static VOID Reset(VOID) { LARGE_INTEGER PerformanceCounterFrequency; @@ -173,7 +173,7 @@ } /* Return ULONG in a string */ -ULONG GetULONG(LPSTR String) +static ULONG GetULONG(LPSTR String) { UINT i, Length; ULONG Value; @@ -191,7 +191,7 @@ } /* Return ULONG in a string. Try next paramter if not successful */ -ULONG GetULONG2(LPSTR String1, LPSTR String2, PINT i) +static ULONG GetULONG2(LPSTR String1, LPSTR String2, PINT i) { ULONG Value; @@ -209,7 +209,7 @@ } /* Parse command line parameters */ -BOOL ParseCmdline(int argc, char* argv[]) +static BOOL ParseCmdline(int argc, char* argv[]) { INT i; BOOL ShowUsage; @@ -278,7 +278,7 @@ } /* Calculate checksum of data */ -WORD Checksum(PUSHORT data, UINT size) +static WORD Checksum(PUSHORT data, UINT size) { ULONG sum = 0; @@ -297,7 +297,7 @@ } /* Prepare to ping target */ -BOOL Setup(VOID) +static BOOL Setup(VOID) { WORD wVersionRequested; WSADATA WsaData; @@ -354,7 +354,7 @@ } /* Close socket */ -VOID Cleanup(VOID) +static VOID Cleanup(VOID) { if (IcmpSock != INVALID_SOCKET) closesocket(IcmpSock); @@ -362,7 +362,7 @@ WSACleanup(); } -VOID QueryTime(PLARGE_INTEGER Time) +static VOID QueryTime(PLARGE_INTEGER Time) { if (UsePerformanceCounter) { if (QueryPerformanceCounter(Time) == 0) { @@ -384,7 +384,7 @@ } } -VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time) +static VOID TimeToMsString(LPSTR String, LARGE_INTEGER Time) { CHAR Convstr[40]; LARGE_INTEGER LargeTime; @@ -398,7 +398,7 @@ /* Locate the ICMP data and print it. Returns TRUE if the packet was good, FALSE if not */ -BOOL DecodeResponse(PCHAR buffer, UINT size, PSOCKADDR_IN from) +static BOOL DecodeResponse(PCHAR buffer, UINT size, PSOCKADDR_IN from) { PIPv4_HEADER IpHeader; PICMP_ECHO_PACKET Icmp; @@ -462,7 +462,7 @@ } /* Send and receive one ping */ -BOOL Ping(VOID) +static BOOL Ping(VOID) { INT Status; SOCKADDR From; _____ Modified: trunk/reactos/apps/utils/net/route/route.c --- trunk/reactos/apps/utils/net/route/route.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/route/route.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -20,7 +20,7 @@ #define IPBUF 17 #define IN_ADDR_OF(x) *((struct in_addr *)&(x)) -int Usage() +static int Usage() { _ftprintf( stderr, _T("route usage:\n" @@ -33,7 +33,7 @@ return 1; } -int PrintRoutes() +static int PrintRoutes() { PMIB_IPFORWARDTABLE IpForwardTable = NULL; PIP_ADAPTER_INFO pAdapterInfo; @@ -154,7 +154,7 @@ } } -int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd, +static int convert_add_cmd_line( PMIB_IPFORWARDROW RowToAdd, int argc, TCHAR **argv ) { int i; #if UNICODE @@ -205,7 +205,7 @@ return TRUE; } -int add_route( int argc, TCHAR **argv ) { +static int add_route( int argc, TCHAR **argv ) { MIB_IPFORWARDROW RowToAdd = { 0 }; DWORD Error; @@ -229,7 +229,7 @@ return Error; } -int del_route( int argc, TCHAR **argv ) +static int del_route( int argc, TCHAR **argv ) { MIB_IPFORWARDROW RowToDel = { 0 }; DWORD Error; @@ -252,9 +252,11 @@ return Error; } +#if defined(_UNICODE) && defined(__GNUC__) +static +#endif int _tmain( int argc, TCHAR **argv ) { - if( argc < 2 ) return Usage(); else if ( !_tcscmp( argv[1], _T("print") ) ) _____ Modified: trunk/reactos/apps/utils/net/tracert/tracert.c --- trunk/reactos/apps/utils/net/tracert/tracert.c 2005-10-06 15:02:50 UTC (rev 18296) +++ trunk/reactos/apps/utils/net/tracert/tracert.c 2005-10-06 18:51:52 UTC (rev 18297) @@ -70,15 +70,27 @@ INT iHostList; // -j @UNIMPLEMENTED@ INT iTimeOut = 2000; // -w time before packet times out +/* function definitions */ +static BOOL ParseCmdline(int argc, char* argv[]); +static INT Driver(void); +static INT Setup(INT ttl); +static VOID SetupTimingMethod(void); +static VOID ResolveHostname(void); +static VOID PreparePacket(INT packetSize, INT seqNum); +static INT SendPacket(INT datasize); +static INT ReceivePacket(INT datasize); +static INT DecodeResponse(INT packetSize, INT seqNum); +static LONG GetTime(void); +static WORD CheckSum(PUSHORT data, UINT size); +static VOID Usage(void); - /* * * Parse command line parameters and set any options * */ -BOOL ParseCmdline(int argc, char* argv[]) +static BOOL ParseCmdline(int argc, char* argv[]) { int i; @@ -122,7 +134,7 @@ * Driver function, controls the traceroute program * */ -INT Driver(VOID) +static INT Driver(VOID) { INT iHopCount = 1; // hop counter. default max is 30 @@ -311,7 +323,7 @@ * gettickcount, so set the figures to 1 * */ -VOID SetupTimingMethod(VOID) +static VOID SetupTimingMethod(VOID) { LARGE_INTEGER PerformanceCounterFrequency; @@ -343,7 +355,7 @@ * SOCKADDR_IN members needed for the connection. * */ -VOID ResolveHostname(VOID) +static VOID ResolveHostname(VOID) { HOSTENT *hp; ULONG addr; @@ -386,7 +398,7 @@ * set in the outgoing IP packet. * */ -INT Setup(INT iTTL) +static INT Setup(INT iTTL) { INT iSockRet; @@ -422,7 +434,7 @@ * Calculate the packet checksum * */ -VOID PreparePacket(INT iPacketSize, INT iSeqNum) [truncated at 1000 lines; 125 more skipped]
19 years, 2 months
1
0
0
0
[blight] 18296: Patch by Christoph v.W.:
by blight@svn.reactos.com
Patch by Christoph v.W.: - speed-up adding items to ListView - fix resource leak (GetDC without ReleaseDC) (Bug #870) Modified: trunk/reactos/subsys/system/devmgr/devmgr.c _____ Modified: trunk/reactos/subsys/system/devmgr/devmgr.c --- trunk/reactos/subsys/system/devmgr/devmgr.c 2005-10-06 14:31:18 UTC (rev 18295) +++ trunk/reactos/subsys/system/devmgr/devmgr.c 2005-10-06 15:02:50 UTC (rev 18296) @@ -93,6 +93,8 @@ long Size; long rc; + SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0); + ListView_DeleteAllItems(hwndListView); while (1) { @@ -187,6 +189,7 @@ } SetupDiDestroyDeviceInfoList(hDevInfo); } + SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0); } CONFIGRET GetDeviceName(DEVINST DevInst, LPTSTR Buffer, DWORD BufferLength) @@ -271,8 +274,9 @@ _tprintf(_T("CM_Locate_DevNode() failed, cr= 0x%lx\n"), cr); return 1; } - + SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0); cr = ListSubNodes(root, 0); + SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0); if (cr != CR_SUCCESS) return 2; return 0; @@ -304,6 +308,7 @@ i = 0; DeviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); + SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0); while (TRUE) { if (!SetupDiEnumDeviceInterfaces( @@ -332,6 +337,7 @@ } } + SendMessage(hwndListView, WM_SETREDRAW, TRUE, 0); SetupDiDestroyDeviceInfoList(hDevInfo); return 0; } @@ -484,6 +490,7 @@ ResizeListView(hWnd); break; case WM_DESTROY: + ReleaseDC(hWnd, hDC); PostQuitMessage(0); break; case WM_COMMAND:
19 years, 2 months
1
0
0
0
[blight] 18295: ModifyMenuA: Zero initialize MENUITEMINFOA (like ModifyMenuW does)
by blight@svn.reactos.com
ModifyMenuA: Zero initialize MENUITEMINFOA (like ModifyMenuW does) Fixes bug 818 according to Christoph v.W. Thanks to j_anderw for his patch proposal. Modified: trunk/reactos/lib/user32/windows/menu.c _____ Modified: trunk/reactos/lib/user32/windows/menu.c --- trunk/reactos/lib/user32/windows/menu.c 2005-10-06 13:07:53 UTC (rev 18294) +++ trunk/reactos/lib/user32/windows/menu.c 2005-10-06 14:31:18 UTC (rev 18295) @@ -4318,6 +4318,7 @@ LPCSTR lpNewItem) { MENUITEMINFOA mii; + memset( &mii, 0, sizeof(mii) ); mii.cbSize = sizeof(MENUITEMINFOA); mii.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE; mii.fType = 0;
19 years, 2 months
1
0
0
0
[gdalsnes] 18294: doesnt belong here either
by gdalsnes@svn.reactos.com
doesnt belong here either Modified: trunk/reactos/lib/kernel32/file/create.c _____ Modified: trunk/reactos/lib/kernel32/file/create.c --- trunk/reactos/lib/kernel32/file/create.c 2005-10-06 13:07:00 UTC (rev 18293) +++ trunk/reactos/lib/kernel32/file/create.c 2005-10-06 13:07:53 UTC (rev 18294) @@ -5,7 +5,6 @@ * FILE: lib/kernel32/file/create.c * PURPOSE: Directory functions * PROGRAMMER: Ariadne ( ariadne(a)xs4all.nl) - * GetTempFileName is modified from WINE [ Alexandre Juiliard ] * UPDATE HISTORY: * Created 01/11/98 * Removed use of SearchPath (not used by Windows)
19 years, 2 months
1
0
0
0
[gdalsnes] 18293: doesnt belong here
by gdalsnes@svn.reactos.com
doesnt belong here Modified: trunk/reactos/lib/kernel32/file/lock.c _____ Modified: trunk/reactos/lib/kernel32/file/lock.c --- trunk/reactos/lib/kernel32/file/lock.c 2005-10-06 12:36:53 UTC (rev 18292) +++ trunk/reactos/lib/kernel32/file/lock.c 2005-10-06 13:07:00 UTC (rev 18293) @@ -5,7 +5,6 @@ * FILE: lib/kernel32/file/file.c * PURPOSE: Directory functions * PROGRAMMER: Ariadne ( ariadne(a)xs4all.nl) - * GetTempFileName is modified from WINE [ Alexandre Juiliard ] * UPDATE HISTORY: * Created 01/11/98 */
19 years, 2 months
1
0
0
0
[blight] 18292: Huh, what? Oops! Just some stuff which noone cares about...
by blight@svn.reactos.com
Huh, what? Oops! Just some stuff which noone cares about... Modified: trunk/reactos/ntoskrnl/include/internal/i386/fpu.h Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c _____ Modified: trunk/reactos/ntoskrnl/include/internal/i386/fpu.h --- trunk/reactos/ntoskrnl/include/internal/i386/fpu.h 2005-10-06 11:59:15 UTC (rev 18291) +++ trunk/reactos/ntoskrnl/include/internal/i386/fpu.h 2005-10-06 12:36:53 UTC (rev 18292) @@ -12,10 +12,13 @@ KiHandleFpuFault(PKTRAP_FRAME Tf, ULONG ExceptionNr); VOID -KiFloatingSaveAreaToFxSaveArea(PFX_SAVE_AREA FxSaveArea, CONST FLOATING_SAVE_AREA *FloatingSaveArea); +KiFxSaveAreaToFloatingSaveArea(FLOATING_SAVE_AREA *FloatingSaveArea, CONST PFX_SAVE_AREA FxSaveArea); BOOL KiContextToFxSaveArea(PFX_SAVE_AREA FxSaveArea, PCONTEXT Context); +PFX_SAVE_AREA +KiGetFpuState(PKTHREAD Thread); + #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_FPU_H */ _____ Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c --- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-10-06 11:59:15 UTC (rev 18291) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-10-06 12:36:53 UTC (rev 18292) @@ -820,6 +820,8 @@ IN PKEXCEPTION_FRAME ExceptionFrame, IN OUT PCONTEXT Context) { + PFX_SAVE_AREA FxSaveArea = NULL; + /* Start with the Control flags */ if ((Context->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL) { @@ -890,40 +892,39 @@ Context->Edi = TrapFrame->Edi; } - if ((Context->ContextFlags & CONTEXT_DEBUG_REGISTERS) == CONTEXT_DEBUG_REGISTERS) - { - /* - * FIXME: Implement this case - */ - Context->ContextFlags &= (~CONTEXT_DEBUG_REGISTERS) | CONTEXT_i386; - } - if ((Context->ContextFlags & CONTEXT_FLOATING_POINT) == CONTEXT_FLOATING_POINT) - { - /* - * FIXME: Implement this case - * - * I think this should only be filled for FPU exceptions, otherwise I - * would not know where to get it from as it can be the current state - * of the FPU or already saved in the thread's FPU save area. - * -blight - */ - Context->ContextFlags &= (~CONTEXT_FLOATING_POINT) | CONTEXT_i386; - } -#if 0 - if ((Context->ContextFlags & CONTEXT_EXTENDED_REGISTERS) == CONTEXT_EXTENDED_REGISTERS) - { - /* - * FIXME: Investigate this - * - * This is the XMM state (first 512 bytes of FXSAVE_FORMAT/FX_SAVE_AREA) - * This should only be filled in case of a SIMD exception I think, so - * this is not the right place (like for FPU the state could already be - * saved in the thread's FX_SAVE_AREA or still be in the CPU) - * -blight - */ - Context->ContextFlags &= ~CONTEXT_EXTENDED_REGISTERS; - } -#endif + if ((Context->ContextFlags & CONTEXT_DEBUG_REGISTERS) == CONTEXT_DEBUG_REGISTERS) + { + /* + * FIXME: Implement this case + */ + Context->ContextFlags &= (~CONTEXT_DEBUG_REGISTERS) | CONTEXT_i386; + } + if ((Context->ContextFlags & CONTEXT_FLOATING_POINT) == CONTEXT_FLOATING_POINT) + { + FxSaveArea = KiGetFpuState(KeGetCurrentThread()); + if (FxSaveArea != NULL) + { + KiFxSaveAreaToFloatingSaveArea(&Context->FloatSave, FxSaveArea); + } + else + { + Context->ContextFlags &= (~CONTEXT_FLOATING_POINT) | CONTEXT_i386; + } + } + if ((Context->ContextFlags & CONTEXT_EXTENDED_REGISTERS) == CONTEXT_EXTENDED_REGISTERS) + { + if (FxSaveArea == NULL) + FxSaveArea = KiGetFpuState(KeGetCurrentThread()); + if (FxSaveArea != NULL) + { + memcpy(Context->ExtendedRegisters, &FxSaveArea->U.FxArea, + min(sizeof (Context->ExtendedRegisters), sizeof (FxSaveArea->U.FxArea)) ); + } + else + { + Context->ContextFlags &= (~CONTEXT_EXTENDED_REGISTERS) | CONTEXT_i386; + } + } } VOID @@ -1180,8 +1181,11 @@ /* Check if User Mode */ if (PreviousMode == UserMode) { + extern ULONG FxsrSupport; /* Add the FPU Flag */ Context.ContextFlags |= CONTEXT_FLOATING_POINT; + if (FxsrSupport) + Context.ContextFlags |= CONTEXT_EXTENDED_REGISTERS; } /* Get a Context */ @@ -1259,7 +1263,7 @@ /* Probe stack and copy Context */ ProbeForWrite((PVOID)Stack, Size, sizeof(ULONG)); - RtlMoveMemory((PVOID)Stack, &Context, sizeof(CONTEXT)); + RtlCopyMemory((PVOID)Stack, &Context, sizeof(CONTEXT)); /* Align exception record size and get stack pointer */ Size = (sizeof(EXCEPTION_RECORD) - @@ -1272,7 +1276,7 @@ ProbeForWrite((PVOID)(NewStack - 2 * sizeof(ULONG_PTR)), Size + 2 * sizeof(ULONG_PTR), sizeof(ULONG)); - RtlMoveMemory((PVOID)NewStack, ExceptionRecord, Size); + RtlCopyMemory((PVOID)NewStack, ExceptionRecord, Size); /* Now write the two params for the user-mode dispatcher */ *(PULONG_PTR)(NewStack - 1 * sizeof(ULONG_PTR)) = Stack; _____ Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c --- trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-10-06 11:59:15 UTC (rev 18291) +++ trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-10-06 12:36:53 UTC (rev 18292) @@ -62,6 +62,7 @@ return tmp; } + STATIC USHORT KiTagWordFxsaveToFnsave(PFXSAVE_FORMAT FxSave) { @@ -107,6 +108,7 @@ return TagWord; } + STATIC VOID KiFnsaveToFxsaveFormat(PFXSAVE_FORMAT FxSave, CONST PFNSAVE_FORMAT FnSave) { @@ -154,7 +156,8 @@ } } -VOID + +STATIC VOID KiFloatingSaveAreaToFxSaveArea(PFX_SAVE_AREA FxSaveArea, CONST FLOATING_SAVE_AREA *FloatingSaveArea) { if (FxsrSupport) @@ -169,6 +172,22 @@ FxSaveArea->Cr0NpxState = FloatingSaveArea->Cr0NpxState; } + +VOID +KiFxSaveAreaToFloatingSaveArea(FLOATING_SAVE_AREA *FloatingSaveArea, CONST PFX_SAVE_AREA FxSaveArea) +{ + if (FxsrSupport) + { + KiFxsaveToFnsaveFormat((PFNSAVE_FORMAT)FloatingSaveArea, &FxSaveArea->U.FxArea); + } + else + { + memcpy(FloatingSaveArea, &FxSaveArea->U.FnArea, sizeof(FxSaveArea->U.FnArea)); + } + FloatingSaveArea->Cr0NpxState = FxSaveArea->Cr0NpxState; +} + + BOOL KiContextToFxSaveArea(PFX_SAVE_AREA FxSaveArea, PCONTEXT Context) { @@ -214,6 +233,7 @@ return FpuContextChanged; } + VOID INIT_FUNCTION KiCheckFPU(VOID) { @@ -300,69 +320,39 @@ Ke386RestoreFlags(Flags); } -/* This is a rather naive implementation of Ke(Save/Restore)FloatingPointState - which will not work for WDM drivers. Please feel free to improve */ -#define FPU_STATE_SIZE 108 - -NTSTATUS STDCALL -KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save) +PFX_SAVE_AREA +KiGetFpuState(PKTHREAD Thread) { - char *FpState; + PFX_SAVE_AREA FxSaveArea = NULL; + KIRQL OldIrql; - ASSERT_IRQL(DISPATCH_LEVEL); - - /* check if we are doing software emulation */ - if (!HardwareMathSupport) + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); + if (Thread->NpxState & NPX_STATE_VALID) { - return STATUS_ILLEGAL_FLOAT_CONTEXT; - } + FxSaveArea = (PFX_SAVE_AREA)((ULONG_PTR)Thread->InitialStack - sizeof (FX_SAVE_AREA)); + if (Thread->NpxState & NPX_STATE_DIRTY) + { + ASSERT(KeGetCurrentPrcb()->NpxThread == Thread); + ASSERT((Ke386GetCr0() & X86_CR0_TS) == 0); - FpState = ExAllocatePool(NonPagedPool, FPU_STATE_SIZE); - if (NULL == FpState) - { - return STATUS_INSUFFICIENT_RESOURCES; + if (FxsrSupport) + asm volatile("fxsave %0" : : "m"(FxSaveArea->U.FxArea)); + else + { + KeGetCurrentPrcb()->NpxThread = NULL; + asm volatile("fnsave %0" : : "m"(FxSaveArea->U.FnArea)); + Ke386SetCr0(Ke386GetCr0() | X86_CR0_TS); /* FPU state has to be reloaded because fnsave changes it. */ + } + Thread->NpxState = NPX_STATE_VALID; + } } - *((PVOID *) Save) = FpState; + KeLowerIrql(OldIrql); -#if defined(__GNUC__) - asm volatile("fsave %0\n\t" : "=m" (*FpState)); -#elif defined(_MSC_VER) - __asm mov eax, FpState; - __asm fsave [eax]; -#else -#error Unknown compiler for inline assembler -#endif - - KeGetCurrentThread()->NpxIrql = KeGetCurrentIrql(); - - return STATUS_SUCCESS; + return FxSaveArea; } -NTSTATUS STDCALL -KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save) -{ - char *FpState = *((PVOID *) Save); - if (KeGetCurrentThread()->NpxIrql != KeGetCurrentIrql()) - { - KEBUGCHECK(UNDEFINED_BUG_CODE); - } - -#if defined(__GNUC__) - __asm__("frstor %0\n\t" : "=m" (*FpState)); -#elif defined(_MSC_VER) - __asm mov eax, FpState; - __asm frstor [eax]; -#else -#error Unknown compiler for inline assembler -#endif - - ExFreePool(FpState); - - return STATUS_SUCCESS; -} - NTSTATUS KiHandleFpuFault(PKTRAP_FRAME Tf, ULONG ExceptionNr) { @@ -403,7 +393,7 @@ if (NpxThread != NULL) { KeGetCurrentPrcb()->NpxThread = NULL; - FxSaveArea = (PFX_SAVE_AREA)((char *)NpxThread->InitialStack - sizeof (FX_SAVE_AREA)); + FxSaveArea = (PFX_SAVE_AREA)((ULONG_PTR)NpxThread->InitialStack - sizeof (FX_SAVE_AREA)); /* the fnsave might raise a delayed #MF exception */ if (FxsrSupport) { @@ -420,17 +410,17 @@ /* restore the state of the current thread */ ASSERT((CurrentThread->NpxState & NPX_STATE_DIRTY) == 0); - FxSaveArea = (PFX_SAVE_AREA)((char *)CurrentThread->InitialStack - sizeof (FX_SAVE_AREA)); + FxSaveArea = (PFX_SAVE_AREA)((ULONG_PTR)CurrentThread->InitialStack - sizeof (FX_SAVE_AREA)); if (CurrentThread->NpxState & NPX_STATE_VALID) { if (FxsrSupport) { - FxSaveArea->U.FxArea.MXCsr &= MxcsrFeatureMask; - asm volatile("fxrstor %0" : : "m"(FxSaveArea->U.FxArea)); + FxSaveArea->U.FxArea.MXCsr &= MxcsrFeatureMask; + asm volatile("fxrstor %0" : : "m"(FxSaveArea->U.FxArea)); } else { - asm volatile("frstor %0" : : "m"(FxSaveArea->U.FnArea)); + asm volatile("frstor %0" : : "m"(FxSaveArea->U.FnArea)); } } else /* NpxState & NPX_STATE_INVALID */ @@ -448,7 +438,7 @@ } else if (!FpuInitialized) { - asm volatile("finit"); + asm volatile("fninit"); } } KeGetCurrentPrcb()->NpxThread = CurrentThread; @@ -465,24 +455,31 @@ else /* ExceptionNr == 16 || ExceptionNr == 19 */ { EXCEPTION_RECORD Er; - UCHAR DummyContext[sizeof(CONTEXT) + 16]; - PCONTEXT Context; KPROCESSOR_MODE PreviousMode; PKTHREAD CurrentThread, NpxThread; - KIRQL oldIrql; + KIRQL OldIrql; + ULONG FpuEnvBuffer[7]; + PFNSAVE_FORMAT FpuEnv = (PFNSAVE_FORMAT)FpuEnvBuffer; ASSERT(ExceptionNr == 16 || ExceptionNr == 19); /* math fault or XMM fault*/ - KeRaiseIrql(DISPATCH_LEVEL, &oldIrql); + KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); NpxThread = KeGetCurrentPrcb()->NpxThread; CurrentThread = KeGetCurrentThread(); if (NpxThread == NULL) { - KeLowerIrql(oldIrql); - DPRINT1("!!! Math/Xmm fault ignored! (NpxThread == NULL)\n"); + KeLowerIrql(OldIrql); + DPRINT("Math/Xmm fault ignored! (NpxThread == NULL)\n"); return STATUS_SUCCESS; } + if (ExceptionNr == 16) + { + asm volatile("fnstenv %0" : : "m"(*FpuEnv)); + asm volatile("fldenv %0" : : "m"(*FpuEnv)); /* Stupid x87... */ + FpuEnv->StatusWord &= 0xffff; + } + KeLowerIrql(OldIrql); PreviousMode = ((Tf->Cs & 0xffff) == USER_CS) ? (UserMode) : (KernelMode); DPRINT("Math/Xmm fault happened! (PreviousMode = %s)\n", @@ -490,63 +487,34 @@ ASSERT(NpxThread == CurrentThread); /* FIXME: Is not always true I think */ - /* For fxsave we have to align Context->ExtendedRegisters on 16 bytes */ - Context = (PCONTEXT)DummyContext; - Context = (PCONTEXT)((ULONG_PTR)Context + 0x10 - ((ULONG_PTR)Context->ExtendedRegisters & 0x0f)); - /* Get FPU/XMM state */ - Context->FloatSave.Cr0NpxState = 0; - if (FxsrSupport) - { - PFXSAVE_FORMAT FxSave = (PFXSAVE_FORMAT)Context->ExtendedRegisters; - FxSave->MXCsrMask = MxcsrFeatureMask; - memset(FxSave->RegisterArea, 0, sizeof(FxSave->RegisterArea) + - sizeof(FxSave->Reserved3) + sizeof(FxSave->Reserved4)); - asm volatile("fxsave %0" : : "m"(*FxSave)); - KeLowerIrql(oldIrql); - KiFxsaveToFnsaveFormat((PFNSAVE_FORMAT)&Context->FloatSave, FxSave); - } - else - { - PFNSAVE_FORMAT FnSave = (PFNSAVE_FORMAT)&Context->FloatSave; - asm volatile("fnsave %0" : : "m"(*FnSave)); - KeLowerIrql(oldIrql); - KiFnsaveToFxsaveFormat((PFXSAVE_FORMAT)Context->ExtendedRegisters, FnSave); - } + KeLowerIrql(OldIrql); - /* Fill the rest of the context */ - Context->ContextFlags = CONTEXT_FULL; - KeTrapFrameToContext(Tf, NULL, Context); - Context->ContextFlags |= CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS; - /* Determine exception code */ if (ExceptionNr == 16) { - USHORT FpuStatusWord = Context->FloatSave.StatusWord & 0xffff; DPRINT("FpuStatusWord = 0x%04x\n", FpuStatusWord); - if (FpuStatusWord & X87_SW_IE) + if (FpuEnv->StatusWord & X87_SW_IE) Er.ExceptionCode = STATUS_FLOAT_INVALID_OPERATION; - else if (FpuStatusWord & X87_SW_DE) + else if (FpuEnv->StatusWord & X87_SW_DE) Er.ExceptionCode = STATUS_FLOAT_DENORMAL_OPERAND; - else if (FpuStatusWord & X87_SW_ZE) + else if (FpuEnv->StatusWord & X87_SW_ZE) Er.ExceptionCode = STATUS_FLOAT_DIVIDE_BY_ZERO; - else if (FpuStatusWord & X87_SW_OE) - Er.ExceptionCode = STATUS_FLOAT_OVERFLOW; - else if (FpuStatusWord & X87_SW_UE) + else if (FpuEnv->StatusWord & X87_SW_OE) + Er.ExceptionCode = STATUS_FLOAT_OVERFLOW; + else if (FpuEnv->StatusWord & X87_SW_UE) Er.ExceptionCode = STATUS_FLOAT_UNDERFLOW; - else if (FpuStatusWord & X87_SW_PE) + else if (FpuEnv->StatusWord & X87_SW_PE) Er.ExceptionCode = STATUS_FLOAT_INEXACT_RESULT; - else if (FpuStatusWord & X87_SW_SE) + else if (FpuEnv->StatusWord & X87_SW_SE) Er.ExceptionCode = STATUS_FLOAT_STACK_CHECK; else ASSERT(0); /* not reached */ - /* FIXME: is this the right way to get the correct EIP of the faulting instruction? */ - Er.ExceptionAddress = (PVOID)Context->FloatSave.ErrorOffset; + Er.ExceptionAddress = (PVOID)FpuEnv->ErrorOffset; } else /* ExceptionNr == 19 */ { - /* FIXME: When should we use STATUS_FLOAT_MULTIPLE_FAULTS? */ Er.ExceptionCode = STATUS_FLOAT_MULTIPLE_TRAPS; Er.ExceptionAddress = (PVOID)Tf->Eip; } @@ -565,3 +533,67 @@ return STATUS_UNSUCCESSFUL; } + + +/* This is a rather naive implementation of Ke(Save/Restore)FloatingPointState + which will not work for WDM drivers. Please feel free to improve */ + +NTSTATUS STDCALL +KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save) +{ + PFNSAVE_FORMAT FpState; + + ASSERT_IRQL(DISPATCH_LEVEL); + + /* check if we are doing software emulation */ + if (!HardwareMathSupport) + { + return STATUS_ILLEGAL_FLOAT_CONTEXT; + } + + FpState = ExAllocatePool(NonPagedPool, sizeof (FNSAVE_FORMAT)); + if (NULL == FpState) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + *((PVOID *) Save) = FpState; + +#if defined(__GNUC__) + asm volatile("fnsave %0\n\t" : "=m" (*FpState)); +#elif defined(_MSC_VER) + __asm mov eax, FpState; + __asm fsave [eax]; +#else +#error Unknown compiler for inline assembler +#endif + + KeGetCurrentThread()->NpxIrql = KeGetCurrentIrql(); + + return STATUS_SUCCESS; +} + + +NTSTATUS STDCALL +KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save) +{ + PFNSAVE_FORMAT FpState = *((PVOID *) Save); + + if (KeGetCurrentThread()->NpxIrql != KeGetCurrentIrql()) + { + KEBUGCHECK(UNDEFINED_BUG_CODE); + } + +#if defined(__GNUC__) + asm volatile("fnclex\n\t"); + asm volatile("frstor %0\n\t" : "=m" (*FpState)); +#elif defined(_MSC_VER) + __asm mov eax, FpState; + __asm frstor [eax]; +#else +#error Unknown compiler for inline assembler +#endif + + ExFreePool(FpState); + + return STATUS_SUCCESS; +}
19 years, 2 months
1
0
0
0
[hpoussin] 18291: Add newdev.dll to bootcd
by hpoussin@svn.reactos.com
Add newdev.dll to bootcd Fix formatting, by replacing tabulations by spaces Modified: trunk/reactos/bootdata/packages/reactos.dff _____ Modified: trunk/reactos/bootdata/packages/reactos.dff --- trunk/reactos/bootdata/packages/reactos.dff 2005-10-06 09:55:10 UTC (rev 18290) +++ trunk/reactos/bootdata/packages/reactos.dff 2005-10-06 11:59:15 UTC (rev 18291) @@ -35,7 +35,7 @@ drivers\dd\null\null.sys 2 drivers\dd\serial\serial.sys 2 drivers\video\displays\vga\vgaddi.dll 1 -drivers\video\displays\framebuf\framebuf.dll 1 +drivers\video\displays\framebuf\framebuf.dll 1 drivers\video\miniport\vga\vgamp.sys 2 drivers\video\miniport\vbe\vbemp.sys 2 drivers\video\videoprt\videoprt.sys 2 @@ -92,7 +92,7 @@ lib\imagehlp\imagehlp.dll 1 lib\imm32\imm32.dll 1 lib\iphlpapi\iphlpapi.dll 1 -lib\keyboard\kbdbe\kbdbe.dll 1 +lib\keyboard\kbdbe\kbdbe.dll 1 lib\keyboard\kbdda\kbdda.dll 1 lib\keyboard\kbddv\kbddv.dll 1 lib\keyboard\kbdes\kbdes.dll 1 @@ -119,12 +119,13 @@ lib\msvideo\msvfw32.dll 1 lib\mswsock\mswsock.dll 1 lib\netapi32\netapi32.dll 1 +lib\newdev\newdev.dll 1 lib\ntdll\ntdll.dll 1 lib\ntmarta\ntmarta.dll 1 lib\objsel\objsel.dll 1 lib\ole32\ole32.dll 1 lib\oleaut32\oleaut32.dll 1 -lib\oledlg\oledlg.dll 1 +lib\oledlg\oledlg.dll 1 lib\olepro32\olepro32.dll 1 lib\opengl32\opengl32.dll 1 lib\psapi\psapi.dll 1 @@ -156,10 +157,10 @@ lib\wsock32\wsock32.dll 1 subsys\csrss\csrss.exe 1 subsys\csrss\win32csr\win32csr.dll 1 -subsys\csr\csr.exe 1 optional -subsys\csr\csrsrv\csrsrv.dll 1 optional -subsys\win\basesrv\basesrv.dll 1 optional -subsys\win\winsrv\winsrv.dll 1 optional +subsys\csr\csr.exe 1 optional +subsys\csr\csrsrv\csrsrv.dll 1 optional +subsys\win\basesrv\basesrv.dll 1 optional +subsys\win\winsrv\winsrv.dll 1 optional subsys\ntvdm\ntvdm.exe 1 subsys\smss\smss.exe 1 subsys\win32k\win32k.sys 1 @@ -290,36 +291,36 @@ media\inf\scsi.inf 6 media\inf\syssetup.inf 6 media\inf\usbport.inf 6 -modules\os2\server\os2srv.dll 1 optional -modules\os2\lib\doscalls\doscalls.dll 1 optional -modules\posix\server\psxsrv.dll 1 optional -modules\posix\lib\psxdll\psxdll.dll 1 optional -modules\rosky\lib\libsky\libsky.dll 1 optional -modules\rosky\lib\libskygi\libskygi.dll 1 optional -modules\vms\server\vmssrv.dll 1 optional -modules\vms\lib\vmsdll\vmsdll.dll 1 optional -modules\rosapps\cmdutils\comp\comp.exe 1 optional -modules\rosapps\cmdutils\find\find.exe 1 optional -modules\rosapps\cmdutils\mode\mode.exe 1 optional -modules\rosapps\cmdutils\more\more.exe 1 optional -modules\rosapps\cmdutils\sort\sort.exe 1 optional -modules\rosapps\cmdutils\tee\tee.exe 1 optional -modules\rosapps\cmdutils\touch\touch.exe 1 optional -modules\rosapps\cmdutils\y\y.exe 1 optional -modules\rosapps\games\solitaire\sol.exe 1 optional -modules\rosapps\games\winemine\winemine.exe 1 optional -modules\rosapps\mc\mc.exe 1 optional -modules\rosapps\net\ncftp\ncftp.exe 1 optional -modules\rosapps\net\niclist\niclist.exe 1 optional -modules\rosapps\notevil\notevil.exe 1 optional -modules\rosapps\packmgr\cmd-line\rosget.exe 1 optional -modules\rosapps\packmgr\gui\packmgr.exe 1 optional -modules\rosapps\packmgr\lib\packlib.dll 1 optional -modules\rosapps\sysutils\ctm\ctm.exe 1 optional -modules\rosapps\sysutils\lsdd\lsdd.exe 1 optional -modules\rosapps\sysutils\man\man.exe 1 optional -modules\rosapps\sysutils\pedump\pedump.exe 1 optional -modules\rosapps\sysutils\regexpl\regexpl.exe 1 optional -modules\rosapps\sysutils\shutdown\shutdown.exe 1 optional -modules\rosapps\sysutils\tcat\cat.exe 1 optional -modules\rosapps\sysutils\tlist\tlist.exe 1 optional +modules\os2\server\os2srv.dll 1 optional +modules\os2\lib\doscalls\doscalls.dll 1 optional +modules\posix\server\psxsrv.dll 1 optional +modules\posix\lib\psxdll\psxdll.dll 1 optional +modules\rosky\lib\libsky\libsky.dll 1 optional +modules\rosky\lib\libskygi\libskygi.dll 1 optional +modules\vms\server\vmssrv.dll 1 optional +modules\vms\lib\vmsdll\vmsdll.dll 1 optional +modules\rosapps\cmdutils\comp\comp.exe 1 optional +modules\rosapps\cmdutils\find\find.exe 1 optional +modules\rosapps\cmdutils\mode\mode.exe 1 optional +modules\rosapps\cmdutils\more\more.exe 1 optional +modules\rosapps\cmdutils\sort\sort.exe 1 optional +modules\rosapps\cmdutils\tee\tee.exe 1 optional +modules\rosapps\cmdutils\touch\touch.exe 1 optional +modules\rosapps\cmdutils\y\y.exe 1 optional +modules\rosapps\games\solitaire\sol.exe 1 optional +modules\rosapps\games\winemine\winemine.exe 1 optional +modules\rosapps\mc\mc.exe 1 optional +modules\rosapps\net\ncftp\ncftp.exe 1 optional +modules\rosapps\net\niclist\niclist.exe 1 optional +modules\rosapps\notevil\notevil.exe 1 optional +modules\rosapps\packmgr\cmd-line\rosget.exe 1 optional +modules\rosapps\packmgr\gui\packmgr.exe 1 optional +modules\rosapps\packmgr\lib\packlib.dll 1 optional +modules\rosapps\sysutils\ctm\ctm.exe 1 optional +modules\rosapps\sysutils\lsdd\lsdd.exe 1 optional +modules\rosapps\sysutils\man\man.exe 1 optional +modules\rosapps\sysutils\pedump\pedump.exe 1 optional +modules\rosapps\sysutils\regexpl\regexpl.exe 1 optional +modules\rosapps\sysutils\shutdown\shutdown.exe 1 optional +modules\rosapps\sysutils\tcat\cat.exe 1 optional +modules\rosapps\sysutils\tlist\tlist.exe 1 optional
19 years, 2 months
1
0
0
0
[hpoussin] 18290: Do only one exit point in SetupDiInstallDevice
by hpoussin@svn.reactos.com
Do only one exit point in SetupDiInstallDevice Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-06 03:23:09 UTC (rev 18289) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-06 09:55:10 UTC (rev 18290) @@ -4391,10 +4391,11 @@ LPCWSTR AssociatedService = NULL; LPWSTR pSectionName = NULL; BOOL RebootRequired = FALSE; - HKEY hEnumKey, hKey; + HKEY hEnumKey, hKey = INVALID_HANDLE_VALUE; LONG rc; HWND hWnd; PVOID callback_context; + BOOL ret = FALSE; /* Return value */ TRACE("%p %p\n", DeviceInfoSet, DeviceInfoData); @@ -4416,7 +4417,7 @@ if (!Result) { /* One parameter is bad */ - return FALSE; + goto cleanup; } /* FIXME: If DI_FLAGSEX_SETFAILEDINSTALL is set, set FAILEDINSTALL flag in ConfigFlags registry and exit */ @@ -4435,15 +4436,12 @@ hInf = SetupOpenInfFileW(DriverInfo->InfPath, NULL, INF_STYLE_WIN4, NULL); if (hInf == INVALID_HANDLE_VALUE) - return FALSE; + goto cleanup; Result = SetupDiGetActualSectionToInstallW(hInf, DriverInfo->InfSection, SectionName, MAX_PATH, &SectionNameLength, NULL); if (!Result || SectionNameLength > MAX_PATH - 9) - { - SetupCloseInfFile(hInf); - return FALSE; - } + goto cleanup; pSectionName = &SectionName[wcslen(SectionName)]; /* Create driver key information */ @@ -4474,7 +4472,7 @@ NULL, 0, &RequiredSize); if (!Result) - goto cleanup; + goto nextfile; if (RequiredSize > 0) { /* We got the needed size for the buffer */ @@ -4482,7 +4480,7 @@ if (!ServiceName) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - goto cleanup; + goto nextfile; } Result = SetupGetStringFieldW( &ContextService, @@ -4490,7 +4488,7 @@ ServiceName, RequiredSize, &RequiredSize); if (!Result) - goto cleanup; + goto nextfile; } Result = SetupGetIntField( &ContextService, @@ -4507,7 +4505,7 @@ NULL, 0, &RequiredSize); if (!Result) - goto cleanup; + goto nextfile; if (RequiredSize > 0) { /* We got the needed size for the buffer */ @@ -4515,7 +4513,7 @@ if (!ServiceSection) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - goto cleanup; + goto nextfile; } Result = SetupGetStringFieldW( &ContextService, @@ -4523,7 +4521,7 @@ ServiceSection, RequiredSize, &RequiredSize); if (!Result) - goto cleanup; + goto nextfile; } SetLastError(ERROR_SUCCESS); Result = SetupInstallServicesFromInfSectionExW(hInf, ServiceSection, Flags, DeviceInfoSet, DeviceInfoData, ServiceName, NULL); @@ -4534,15 +4532,11 @@ if (GetLastError() == ERROR_SUCCESS_REBOOT_REQUIRED) RebootRequired = TRUE; } -cleanup: +nextfile: HeapFree(GetProcessHeap(), 0, ServiceName); HeapFree(GetProcessHeap(), 0, ServiceSection); if (!Result) - { - HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return FALSE; - } + goto cleanup; Result = SetupFindNextLine(&ContextService, &ContextService); } @@ -4558,9 +4552,7 @@ if (rc != ERROR_SUCCESS) { SetLastError(rc); - HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return FALSE; + goto cleanup; } rc = RegOpenKeyExW( hEnumKey, @@ -4572,9 +4564,7 @@ if (rc != ERROR_SUCCESS) { SetLastError(rc); - HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return FALSE; + goto cleanup; } /* Install .HW section */ @@ -4586,12 +4576,7 @@ NULL, NULL); SetupTermDefaultQueueCallback(callback_context); if (!Result) - { - RegCloseKey(hKey); - HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return FALSE; - } + goto cleanup; /* Write information to enum key */ FIXME("FIXME: Write information to enum key\n"); @@ -4607,13 +4592,10 @@ rc = RegSetValueEx(hKey, L"DeviceDesc", 0, REG_SZ, (const BYTE *)DriverInfo->Info.Description, (wcslen(DriverInfo->Info.Description) + 1) * sizeof(WCHAR)); if (rc == ERROR_SUCCESS) rc = RegSetValueEx(hKey, L"Mfg", 0, REG_SZ, (const BYTE *)DriverInfo->Info.MfgName, (wcslen(DriverInfo->Info.MfgName) + 1) * sizeof(WCHAR)); - RegCloseKey(hKey); if (rc != ERROR_SUCCESS) { SetLastError(rc); - HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return FALSE; + goto cleanup; } /* Load the driver/call AddDevice */ @@ -4623,8 +4605,16 @@ //if (!RebootRequired && !(Flags & (DI_NEEDRESTART | DI_NEEDREBOOT | DI_DONOTCALLCONFIGMG))) FIXME("FIXME: Send IRP_MN_START_DEVICE\n"); + ret = TRUE; + +cleanup: /* End of installation */ + if (hKey != INVALID_HANDLE_VALUE) + RegCloseKey(hKey); HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - SetupCloseInfFile(hInf); - return TRUE; + if (hInf != NULL && hInf != INVALID_HANDLE_VALUE) + SetupCloseInfFile(hInf); + + TRACE("Returning %d\n", ret); + return ret; }
19 years, 2 months
1
0
0
0
[npwoods] 18289: Regedit: Now saves last key visited, like Windows regedit
by npwoods@svn.reactos.com
Regedit: Now saves last key visited, like Windows regedit Modified: trunk/reactos/subsys/system/regedit/childwnd.c _____ Modified: trunk/reactos/subsys/system/regedit/childwnd.c --- trunk/reactos/subsys/system/regedit/childwnd.c 2005-10-05 23:59:13 UTC (rev 18288) +++ trunk/reactos/subsys/system/regedit/childwnd.c 2005-10-06 03:23:09 UTC (rev 18289) @@ -414,6 +414,20 @@ _stprintf(fullPath, _T("%s\\%s"), rootName, keyPath); SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)fullPath); HeapFree(GetProcessHeap(), 0, fullPath); + + { + HKEY hKey; + TCHAR szBuffer[MAX_PATH]; + _sntprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), _T("My Computer\\%s\\%s"), rootName, keyPath); + + if (RegOpenKey(HKEY_CURRENT_USER, + _T("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"), + &hKey) == ERROR_SUCCESS) + { + RegSetValueEx(hKey, _T("LastKey"), 0, REG_SZ, (LPBYTE) szBuffer, _tcslen(szBuffer) * sizeof(szBuffer[0])); + RegCloseKey(hKey); + } + } } } }
19 years, 2 months
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
74
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
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200