[FORMATTING] Fix tab/space mess by replacing them by 4 spaces. No code change

svn path=/trunk/; revision=23970
This commit is contained in:
Hervé Poussineau 2006-09-07 20:15:45 +00:00
parent 1b337150cc
commit 8c22629a9e
4 changed files with 156 additions and 158 deletions

View file

@ -16,8 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id$ /* COPYRIGHT: See COPYING in the top level directory
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup * PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/format.c * FILE: subsys/system/usetup/format.c
* PURPOSE: Filesystem format support functions * PURPOSE: Filesystem format support functions
@ -35,14 +34,12 @@ PPROGRESSBAR ProgressBar = NULL;
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
static BOOLEAN NTAPI
BOOLEAN NTAPI FormatCallback(
FormatCallback (CALLBACKCOMMAND Command, IN CALLBACKCOMMAND Command,
ULONG Modifier, IN ULONG Modifier,
PVOID Argument) IN PVOID Argument)
{ {
// DPRINT1 ("FormatCallback() called\n");
switch (Command) switch (Command)
{ {
case PROGRESS: case PROGRESS:
@ -53,49 +50,43 @@ FormatCallback (CALLBACKCOMMAND Command,
DPRINT("%lu percent completed\n", *Percent); DPRINT("%lu percent completed\n", *Percent);
ProgressSetStep(ProgressBar, *Percent); ProgressSetStep(ProgressBar, *Percent);
}
break; break;
}
// case OUTPUT: /*case OUTPUT:
// { {
// PTEXTOUTPUT Output; PTEXTOUTPUT Output;
// output = (PTEXTOUTPUT) Argument; output = (PTEXTOUTPUT) Argument;
// fprintf(stdout, "%s", output->Output); DPRINT("%s\n", output->Output);
// } break;
// break; }*/
case DONE: case DONE:
{ {
/*PBOOLEAN Success;*/
DPRINT("Done\n"); DPRINT("Done\n");
// PBOOLEAN Success;
// status = (PBOOLEAN) Argument; /*Success = (PBOOLEAN)Argument;
// if ( *status == FALSE ) if (*Success == FALSE)
// { {
// wprintf(L"FormatEx was unable to complete successfully.\n\n"); DPRINT("FormatEx was unable to complete successfully.\n\n");
// Error = TRUE; }*/
// }
}
break; break;
}
default: default:
DPRINT("Unknown callback %lu\n", (ULONG)Command); DPRINT("Unknown callback %lu\n", (ULONG)Command);
break; break;
} }
// DPRINT1 ("FormatCallback() done\n");
return TRUE; return TRUE;
} }
NTSTATUS NTSTATUS
FormatPartition (PUNICODE_STRING DriveRoot) FormatPartition(
IN PUNICODE_STRING DriveRoot)
{ {
NTSTATUS Status; NTSTATUS Status;
SHORT xScreen;
SHORT yScreen;
CONSOLE_GetScreenSize(&xScreen, &yScreen);
ProgressBar = CreateProgressBar(6, ProgressBar = CreateProgressBar(6,
yScreen - 14, yScreen - 14,
@ -106,16 +97,16 @@ FormatPartition (PUNICODE_STRING DriveRoot)
ProgressSetStepCount(ProgressBar, 100); ProgressSetStepCount(ProgressBar, 100);
Status = VfatFormat(DriveRoot, Status = VfatFormat(DriveRoot,
0, /* MediaFlag */ FMIFS_HARDDISK, /* MediaFlag */
NULL, /* Label */ NULL, /* Label */
TRUE, /* QuickFormat */ TRUE, /* QuickFormat */
0, /* ClusterSize */ 0, /* ClusterSize */
(PFMIFSCALLBACK)FormatCallback); /* Callback */ FormatCallback); /* Callback */
DestroyProgressBar(ProgressBar); DestroyProgressBar(ProgressBar);
ProgressBar = NULL; ProgressBar = NULL;
DPRINT ("VfatFormat() status 0x%.08x\n", Status); DPRINT("FormatEx() finished with status 0x%08lx\n", Status);
return Status; return Status;
} }

View file

@ -28,7 +28,8 @@
#define __FORMAT_H__ #define __FORMAT_H__
NTSTATUS NTSTATUS
FormatPartition(PUNICODE_STRING DriveRoot); FormatPartition(
IN PUNICODE_STRING DriveRoot);
#endif /* __FILESUP_H__ */ #endif /* __FILESUP_H__ */

View file

@ -33,10 +33,11 @@
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
PFILE_SYSTEM_LIST PFILE_SYSTEM_LIST
CreateFileSystemList (SHORT Left, CreateFileSystemList(
SHORT Top, IN SHORT Left,
BOOLEAN ForceFormat, IN SHORT Top,
FILE_SYSTEM ForceFileSystem) IN BOOLEAN ForceFormat,
IN FILE_SYSTEM ForceFileSystem)
{ {
PFILE_SYSTEM_LIST List; PFILE_SYSTEM_LIST List;
@ -62,16 +63,16 @@ CreateFileSystemList (SHORT Left,
return List; return List;
} }
VOID VOID
DestroyFileSystemList (PFILE_SYSTEM_LIST List) DestroyFileSystemList(
IN PFILE_SYSTEM_LIST List)
{ {
RtlFreeHeap(ProcessHeap, 0, List); RtlFreeHeap(ProcessHeap, 0, List);
} }
VOID VOID
DrawFileSystemList (PFILE_SYSTEM_LIST List) DrawFileSystemList(
IN PFILE_SYSTEM_LIST List)
{ {
COORD coPos; COORD coPos;
ULONG Written; ULONG Written;
@ -136,9 +137,9 @@ DrawFileSystemList (PFILE_SYSTEM_LIST List)
} }
} }
VOID VOID
ScrollDownFileSystemList (PFILE_SYSTEM_LIST List) ScrollDownFileSystemList(
IN PFILE_SYSTEM_LIST List)
{ {
if ((ULONG)List->CurrentFileSystem < List->FileSystemCount - 1) if ((ULONG)List->CurrentFileSystem < List->FileSystemCount - 1)
{ {
@ -147,9 +148,9 @@ ScrollDownFileSystemList (PFILE_SYSTEM_LIST List)
} }
} }
VOID VOID
ScrollUpFileSystemList (PFILE_SYSTEM_LIST List) ScrollUpFileSystemList(
IN PFILE_SYSTEM_LIST List)
{ {
if ((ULONG)List->CurrentFileSystem > 0) if ((ULONG)List->CurrentFileSystem > 0)
{ {

View file

@ -45,22 +45,27 @@ typedef struct _FILE_SYSTEM_LIST
PFILE_SYSTEM_LIST PFILE_SYSTEM_LIST
CreateFileSystemList (SHORT Left, CreateFileSystemList(
SHORT Top, IN SHORT Left,
BOOLEAN ForceFormat, IN SHORT Top,
FILE_SYSTEM ForceFileSystem); IN BOOLEAN ForceFormat,
IN FILE_SYSTEM ForceFileSystem);
VOID VOID
DestroyFileSystemList (PFILE_SYSTEM_LIST List); DestroyFileSystemList(
IN PFILE_SYSTEM_LIST List);
VOID VOID
DrawFileSystemList (PFILE_SYSTEM_LIST List); DrawFileSystemList(
IN PFILE_SYSTEM_LIST List);
VOID VOID
ScrollDownFileSystemList (PFILE_SYSTEM_LIST List); ScrollDownFileSystemList(
IN PFILE_SYSTEM_LIST List);
VOID VOID
ScrollUpFileSystemList (PFILE_SYSTEM_LIST List); ScrollUpFileSystemList(
IN PFILE_SYSTEM_LIST List);
#endif /* __FSLIST_H__ */ #endif /* __FSLIST_H__ */