[FORMATTING] Add standard headers

Replace the mix of tabs/spaces by tabs
Replace STDCALL by NTAPI

svn path=/trunk/; revision=23914
This commit is contained in:
Hervé Poussineau
2006-09-04 17:11:14 +00:00
parent 4ba3312a81
commit 132cf4ece8
9 changed files with 188 additions and 202 deletions

View File

@@ -1,34 +1,34 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/chkdsk.c
* PURPOSE: Chkdsk
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/chkdsk.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: (none)
*/
#include "precomp.h"
/* FMIFS.1 */
VOID STDCALL
Chkdsk (PWCHAR DriveRoot,
PWCHAR Format,
BOOLEAN CorrectErrors,
BOOLEAN Verbose,
BOOLEAN CheckOnlyIfDirty,
BOOLEAN ScanDrive,
PVOID Unused2,
PVOID Unused3,
PFMIFSCALLBACK Callback)
VOID NTAPI
Chkdsk(
IN PWCHAR DriveRoot,
IN PWCHAR Format,
IN BOOLEAN CorrectErrors,
IN BOOLEAN Verbose,
IN BOOLEAN CheckOnlyIfDirty,
IN BOOLEAN ScanDrive,
IN PVOID Unused2,
IN PVOID Unused3,
IN PFMIFSCALLBACK Callback)
{
BOOLEAN Argument = FALSE;
BOOLEAN Argument = FALSE;
/* FAIL immediately */
Callback (DONE, /* Command */
0, /* DWORD Modifier */
&Argument); /* Argument */
/* FAIL immediately */
Callback(
DONE, /* Command */
0, /* DWORD Modifier */
&Argument);/* Argument */
}
/* EOF */

View File

@@ -1,49 +1,51 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/compress.c
* PURPOSE: Volume compression
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/compress.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: Emanuele Aliberti
*/
#include "precomp.h"
/*
* @implemented
*/
BOOLEAN STDCALL
EnableVolumeCompression (PWCHAR DriveRoot,
USHORT Compression)
BOOLEAN NTAPI
EnableVolumeCompression(
IN PWCHAR DriveRoot,
IN USHORT Compression)
{
HANDLE hFile = CreateFileW(DriveRoot,
FILE_READ_DATA | FILE_WRITE_DATA,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);
if(hFile != INVALID_HANDLE_VALUE)
{
DWORD RetBytes;
BOOL Ret = DeviceIoControl(hFile,
FSCTL_SET_COMPRESSION,
&Compression,
sizeof(USHORT),
NULL,
0,
&RetBytes,
NULL);
HANDLE hFile;
DWORD RetBytes;
BOOL Ret;
CloseHandle(hFile);
hFile = CreateFileW(
DriveRoot,
FILE_READ_DATA | FILE_WRITE_DATA,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
NULL);
return (Ret != 0);
}
return FALSE;
if (hFile == INVALID_HANDLE_VALUE)
return FALSE;
Ret = DeviceIoControl(
hFile,
FSCTL_SET_COMPRESSION,
&Compression,
sizeof(USHORT),
NULL,
0,
&RetBytes,
NULL);
CloseHandle(hFile);
return (Ret != 0);
}
/* EOF */

View File

@@ -1,21 +1,18 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/diskcopy.c
* PURPOSE: Disk copy
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/diskcopy.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: (none)
*/
#include "precomp.h"
/* FMIFS.3 */
VOID STDCALL
DiskCopy (VOID)
VOID NTAPI
DiskCopy(void)
{
}
/* EOF */

View File

@@ -1,21 +1,18 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/extend.c
* PURPOSE: Volume extension
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/extend.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: (none)
*/
#include "precomp.h"
/* FMIFS.5 */
VOID STDCALL
VOID NTAPI
Extend (VOID)
{
}
/* EOF */

View File

@@ -1,78 +1,74 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/format.c
* PURPOSE: Volume format
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/format.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: Emanuele Aliberti
*/
#include "precomp.h"
#define NDEBUG
#include <debug.h>
/* FMIFS.6 */
VOID STDCALL
Format (VOID)
VOID NTAPI
Format(void)
{
}
/* FMIFS.7 */
VOID STDCALL
FormatEx (PWCHAR DriveRoot,
ULONG MediaFlag,
PWCHAR Format,
PWCHAR Label,
BOOLEAN QuickFormat,
ULONG ClusterSize,
PFMIFSCALLBACK Callback)
VOID NTAPI
FormatEx(
IN PWCHAR DriveRoot,
IN FMIFS_MEDIA_FLAG MediaFlag,
IN PWCHAR Format,
IN PWCHAR Label,
IN BOOLEAN QuickFormat,
IN ULONG ClusterSize,
IN PFMIFSCALLBACK Callback)
{
UNICODE_STRING usDriveRoot;
UNICODE_STRING usLabel;
BOOLEAN Argument = FALSE;
WCHAR VolumeName[MAX_PATH];
CURDIR CurDir;
UNICODE_STRING usDriveRoot;
UNICODE_STRING usLabel;
BOOLEAN Argument = FALSE;
WCHAR VolumeName[MAX_PATH];
CURDIR CurDir;
if (_wcsnicmp(Format, L"FAT", 3) != 0)
{
/* Unknown file system */
Callback (DONE, /* Command */
0, /* DWORD Modifier */
&Argument); /* Argument */
}
if (_wcsnicmp(Format, L"FAT", 3) != 0)
{
/* Unknown file system */
Callback(
DONE, /* Command */
0, /* DWORD Modifier */
&Argument); /* Argument */
return;
}
if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH) ||
!RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
{
/* Report an error. */
Callback (DONE, /* Command */
0, /* DWORD Modifier */
&Argument); /* Argument */
if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH)
|| !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
{
/* Report an error. */
Callback(
DONE, /* Command */
0, /* DWORD Modifier */
&Argument); /* Argument */
return;
}
return;
}
RtlInitUnicodeString(&usLabel, Label);
RtlInitUnicodeString(&usLabel, Label);
if (_wcsnicmp(Format, L"FAT", 3) == 0)
{
DPRINT1("FormatEx - FAT\n");
VfatInitialize ();
VfatFormat (&usDriveRoot,
MediaFlag,
&usLabel,
QuickFormat,
ClusterSize,
Callback);
VfatCleanup ();
RtlFreeUnicodeString(&usDriveRoot);
}
DPRINT1("FormatEx - FAT\n");
VfatInitialize();
VfatFormat(
&usDriveRoot,
MediaFlag,
&usLabel,
QuickFormat,
ClusterSize,
Callback);
VfatCleanup();
RtlFreeUnicodeString(&usDriveRoot);
}
/* EOF */

View File

@@ -1,58 +1,56 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/init.c
* PURPOSE: Initialisation
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/init.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: Emanuele Aliberti
*/
#include "precomp.h"
static BOOL FmIfsInitialized = FALSE;
static BOOLEAN FmIfsInitialized = FALSE;
static BOOL STDCALL
InitializeFmIfsOnce (VOID)
static BOOLEAN NTAPI
InitializeFmIfsOnce(void)
{
/* TODO: Check how many IFS are installed in the system */
/* TOSO: and register a descriptor for each one */
return TRUE;
}
/* FMIFS.8 */
BOOL STDCALL
InitializeFmIfs (PVOID hinstDll,
DWORD dwReason,
PVOID reserved)
BOOLEAN NTAPI
InitializeFmIfs(
IN PVOID hinstDll,
IN DWORD dwReason,
IN PVOID reserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
if (FALSE == FmIfsInitialized)
{
if (FALSE == InitializeFmIfsOnce())
switch (dwReason)
{
return FALSE;
case DLL_PROCESS_ATTACH:
if (FALSE == FmIfsInitialized)
{
if (FALSE == InitializeFmIfsOnce())
{
return FALSE;
}
FmIfsInitialized = TRUE;
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
FmIfsInitialized = TRUE;
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
return TRUE;
}
/* EOF */

View File

@@ -1,18 +1,16 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/label.c
* PURPOSE: Set volume label
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/label.c
* DESCRIPTION: File management IFS utility functions
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: (none)
*/
#include "precomp.h"
/* FMIFS.10 */
VOID STDCALL
VOID NTAPI
SetLabel (VOID)
{
}

View File

@@ -1,19 +1,17 @@
/* $Id$
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: File Management IFS Utility functions
* FILE: reactos/dll/win32/fmifs/media.c
* PURPOSE: Media
*
* COPYING: See the top level directory
* PROJECT: ReactOS
* FILE: reactos/lib/fmifs/media.c
* DESCRIPTION: fmifs.dll
* PROGRAMMER: Emanuele Aliberti
* UPDATED
* 1999-02-16 (Emanuele Aliberti)
* Entry points added.
* PROGRAMMERS: (none)
*/
#include "precomp.h"
/* FMIFS.9 */
VOID STDCALL
QuerySupportedMedia (VOID)
VOID NTAPI
QuerySupportedMedia(VOID)
{
}

View File

@@ -130,7 +130,7 @@ EnableVolumeCompression(
VOID NTAPI
FormatEx(
IN PWCHAR DriveRoot,
IN ULONG MediaFlag,
IN FMIFS_MEDIA_FLAG MediaFlag,
IN PWCHAR Format,
IN PWCHAR Label,
IN BOOLEAN QuickFormat,