Author: janderwald
Date: Wed Feb 20 23:58:39 2008
New Revision: 32436
URL:
http://svn.reactos.org/svn/reactos?rev=32436&view=rev
Log:
- fix a few issues to make it compilable with current RosBE
- does not yet link
Added:
trunk/rosapps/fraginator/fraginator.rbuild (with props)
Modified:
trunk/rosapps/fraginator/Defragment.cpp
trunk/rosapps/fraginator/DriveVolume.cpp
trunk/rosapps/fraginator/Fraginator.cpp
trunk/rosapps/fraginator/Fraginator.h
trunk/rosapps/fraginator/MainDialog.cpp
trunk/rosapps/fraginator/MainDialog.h
trunk/rosapps/fraginator/ReportDialog.h
trunk/rosapps/fraginator/Unfrag.cpp
trunk/rosapps/fraginator/Unfrag.h
Modified: trunk/rosapps/fraginator/Defragment.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/Defragment.cpp?…
==============================================================================
--- trunk/rosapps/fraginator/Defragment.cpp (original)
+++ trunk/rosapps/fraginator/Defragment.cpp Wed Feb 20 23:58:39 2008
@@ -78,7 +78,6 @@
return (1);
}
-
Defragment::Defragment (wstring Name, DefragType DefragMethod)
{
Method = DefragMethod;
@@ -245,7 +244,7 @@
Info = Volume.GetDBFile (j);
- Report.FilesFragments += max (1, Info.Fragments.size()); // add 1 fragment
even for 0 bytes/0 cluster files
+ Report.FilesFragments += max ((size_t)1, Info.Fragments.size()); // add 1
fragment even for 0 bytes/0 cluster files
if (Info.Attributes.Process == 0)
continue;
Modified: trunk/rosapps/fraginator/DriveVolume.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/DriveVolume.cpp…
==============================================================================
--- trunk/rosapps/fraginator/DriveVolume.cpp (original)
+++ trunk/rosapps/fraginator/DriveVolume.cpp Wed Feb 20 23:58:39 2008
@@ -55,7 +55,7 @@
FILE_SHARE_READ | FILE_SHARE_WRITE, // share type
NULL, // security descriptor
OPEN_EXISTING, // open type
- NULL, // attributes (none)
+ 0, // attributes (none)
NULL // template
);
@@ -222,7 +222,7 @@
NULL
);
- DWORD LastError = GetLastError ();
+ //DWORD LastError = GetLastError ();
if (Result == FALSE)
{
@@ -422,7 +422,7 @@
{
uint64 TotalClusters = 0;
- for (int i = 0; i < Info.Fragments.size(); i++)
+ for (size_t i = 0; i < Info.Fragments.size(); i++)
{
TotalClusters += Info.Fragments[i].Length;
}
@@ -597,9 +597,9 @@
Extents = Retrieval->ExtentCount;
// Ok, we have the info. Now translate it. hrmrmr
- int i;
+
Info.Fragments.clear ();
- for (i = 0; i < Extents; i++)
+ for (uint64 i = 0; i < Extents; i++)
{
Extent Add;
Modified: trunk/rosapps/fraginator/Fraginator.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/Fraginator.cpp?…
==============================================================================
--- trunk/rosapps/fraginator/Fraginator.cpp (original)
+++ trunk/rosapps/fraginator/Fraginator.cpp Wed Feb 20 23:58:39 2008
@@ -4,6 +4,7 @@
*****************************************************************************/
+#define NDEBUG
#include "Fraginator.h"
#include "Mutex.h"
@@ -11,14 +12,15 @@
#include "Defragment.h"
#include "MainDialog.h"
#include "resource.h"
+#ifdef _MSC_VER
#include <crtdbg.h>
-
+#endif
HINSTANCE GlobalHInstance = NULL;
Defragment *Defrag = NULL;
-
-int WINAPI WinMain (HINSTANCE HInstance, HINSTANCE HPrevInstance, LPSTR CmdLine, int
ShowCmd)
+INT WINAPI
+wWinMain (HINSTANCE HInstance, HINSTANCE HPrevInstance, LPCWSTR CmdLine, INT ShowCmd)
{
INITCOMMONCONTROLSEX InitControls;
@@ -56,3 +58,4 @@
return (0);
}
+
Modified: trunk/rosapps/fraginator/Fraginator.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/Fraginator.h?re…
==============================================================================
--- trunk/rosapps/fraginator/Fraginator.h (original)
+++ trunk/rosapps/fraginator/Fraginator.h Wed Feb 20 23:58:39 2008
@@ -10,7 +10,7 @@
#include "unfrag.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
int WINAPI WinMain (HINSTANCE HInstance, HINSTANCE HPrevInstance, LPSTR CmdLine, int
ShowCmd);
@@ -20,5 +20,6 @@
extern HINSTANCE GlobalHInstance;
extern Defragment *Defrag;
+extern INT PASCAL wWinMain (HINSTANCE HInstance, HINSTANCE HPrevInstance, LPCWSTR
CmdLine, INT ShowCmd);
-#endif // FRAGINATOR_H
+#endif // FRAGINATOR_H
Modified: trunk/rosapps/fraginator/MainDialog.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/MainDialog.cpp?…
==============================================================================
--- trunk/rosapps/fraginator/MainDialog.cpp (original)
+++ trunk/rosapps/fraginator/MainDialog.cpp Wed Feb 20 23:58:39 2008
@@ -21,7 +21,7 @@
LRESULT PriIdleID;
-void InitDialog (HWND Dlg);
+static void InitDialog (HWND Dlg);
void UpdateDefragInfo (HWND Dlg);
void UpdatePriority (HWND Dlg);
wstring GetDefaultTitle (void);
@@ -35,7 +35,7 @@
// Make internal list
DWORD DriveMask;
HWND DlgItem;
- int d;
+ size_t d;
// Clear out wisecracks line for now
SetDlgItemText (Dlg, IDC_WISECRACKS, L"\"Defrag, baby!\"");
Modified: trunk/rosapps/fraginator/MainDialog.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/MainDialog.h?re…
==============================================================================
--- trunk/rosapps/fraginator/MainDialog.h (original)
+++ trunk/rosapps/fraginator/MainDialog.h Wed Feb 20 23:58:39 2008
@@ -11,4 +11,4 @@
INT_PTR CALLBACK MainDialogProc (HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam);
-#endif // MAINDIALOG_H
+#endif // MAINDIALOG_H
Modified: trunk/rosapps/fraginator/ReportDialog.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/ReportDialog.h?…
==============================================================================
--- trunk/rosapps/fraginator/ReportDialog.h (original)
+++ trunk/rosapps/fraginator/ReportDialog.h Wed Feb 20 23:58:39 2008
@@ -15,4 +15,4 @@
INT_PTR CALLBACK ReportDialogProc (HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam);
-#endif // REPORTDIALOG_H
+#endif // REPORTDIALOG_H
Modified: trunk/rosapps/fraginator/Unfrag.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/Unfrag.cpp?rev=…
==============================================================================
--- trunk/rosapps/fraginator/Unfrag.cpp (original)
+++ trunk/rosapps/fraginator/Unfrag.cpp Wed Feb 20 23:58:39 2008
@@ -49,7 +49,7 @@
{
wchar_t Temp[128];
int TempLen;
- wchar_t *p = NULL;
+ //wchar_t *p = NULL;
int AddCommas = 0;
wchar_t *StrPosResult = NULL;
wchar_t *StrPosOrig = NULL;
Modified: trunk/rosapps/fraginator/Unfrag.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/Unfrag.h?rev=32…
==============================================================================
--- trunk/rosapps/fraginator/Unfrag.h (original)
+++ trunk/rosapps/fraginator/Unfrag.h Wed Feb 20 23:58:39 2008
@@ -10,8 +10,9 @@
// Blah blah blah your template name is too long ... SO WHAT
+#ifdef _MSC_VER
#pragma warning (disable: 4786)
-
+#endif
// I forget what this disables
#ifdef __ICL
@@ -20,17 +21,19 @@
// Hello Mr. Platform SDK, please let us use Windows 2000 only features
+#if 0
#ifndef WINVER
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
#endif
-
+#endif
#include <windows.h>
#include <string>
#include <stdio.h>
#include <stdlib.h>
-
+//#include <initguid.h>
+#include <winioctl.h>
#define APPNAME_CLI L"Unfrag"
#define APPNAME_GUI L"Fraginator"
Added: trunk/rosapps/fraginator/fraginator.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/fraginator/fraginator.rbui…
==============================================================================
--- trunk/rosapps/fraginator/fraginator.rbuild (added)
+++ trunk/rosapps/fraginator/fraginator.rbuild Wed Feb 20 23:58:39 2008
@@ -1,0 +1,33 @@
+<?xml version="1.0"?>
+<group
xmlns:xi="http://www.w3.org/2001/XInclude">
+ <module name="frag" type="win32gui"
installbase="system32" installname="frag.exe"
unicode="yes">
+ <include base="frag">.</include>
+ <define name="__USE_W32API" />
+ <define name="WINVER">0x0501</define>
+ <define name="_WIN32_IE">0x0600</define>
+ <library>kernel32</library>
+ <library>advapi32</library>
+ <library>ntdll</library>
+ <library>comctl32</library>
+ <library>msvcrt</library>
+ <file>Fraginator.cpp</file>
+ <file>MainDialog.cpp</file>
+ <file>Defragment.cpp</file>
+ <file>DriveVolume.cpp</file>
+ <file>ReportDialog.cpp</file>
+ <file>Unfrag.cpp</file>
+ </module>
+
+ <module name="unfrag" type="win32cui"
installbase="system32" installname="unfrag.exe"
unicode="yes">
+ <include base="unfrag">.</include>
+ <define name="__USE_W32API" />
+ <define name="WINVER">0x0501</define>
+ <define name="_WIN32_IE">0x0600</define>
+ <library>kernel32</library>
+ <library>advapi32</library>
+ <library>ntdll</library>
+ <file>Unfrag.cpp</file>
+ <file>Defragment.cpp</file>
+ <file>DriveVolume.cpp</file>
+ </module>
+</group>
Propchange: trunk/rosapps/fraginator/fraginator.rbuild
------------------------------------------------------------------------------
svn:eol-style = native