Fix indentation

svn path=/trunk/; revision=25591
This commit is contained in:
Hervé Poussineau 2007-01-22 09:46:01 +00:00
parent 17291b0214
commit e51baab788
12 changed files with 119 additions and 120 deletions

View file

@ -152,7 +152,7 @@ bool FileExists(string &filename)
void DevCppBackend::ProcessFile(string &filepath)
{
// Remove the .\ at the start of the filenames
if ((filepath[0] == '.') && (filepath[1] == '\\')) filepath.erase(0, 2);
if ((filepath[0] == '.') && (filepath[1] == '\\')) filepath.erase(0, 2);
if(!FileExists(filepath))
return;

View file

@ -106,7 +106,7 @@ MingwBackend::CanEnablePreCompiledHeaderSupportForModule ( const Module& module
size_t i;
for ( i = 0; i < compilationUnits.size (); i++ )
{
CompilationUnit& compilationUnit = *compilationUnits[i];
CompilationUnit& compilationUnit = *compilationUnits[i];
if ( compilationUnit.files.size () != 1 )
return false;
}
@ -148,7 +148,7 @@ MingwBackend::ProcessModules ()
MingwModuleHandler* h = MingwModuleHandler::InstanciateHandler (
module,
this );
h->AddImplicitLibraries ( module );
h->AddImplicitLibraries ( module );
if ( use_pch && CanEnablePreCompiledHeaderSupportForModule ( module ) )
h->EnablePreCompiledHeaderSupport ();
if ( module.host == HostDefault )
@ -761,16 +761,16 @@ MingwBackend::GetNetwideAssemblerVersion ( const string& nasmCommand )
if ( nasmCommand.find("yasm") != std::string::npos )
{
versionCommand = ssprintf ( "%s --version",
nasmCommand.c_str (),
NUL,
NUL );
nasmCommand.c_str (),
NUL,
NUL );
}
else
{
versionCommand = ssprintf ( "%s -v",
nasmCommand.c_str (),
NUL,
NUL );
nasmCommand.c_str (),
NUL,
NUL );
}
return GetVersionString( versionCommand );
}
@ -871,7 +871,7 @@ MingwBackend::IsSupportedBinutilsVersion ( const string& binutilsVersion )
if ( ( ( strcmp ( binutilsVersion.c_str (), "20040902") >= 0 ) &&
( strcmp ( binutilsVersion.c_str (), "20041008") <= 0 ) ) ||
( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
return false;
else
return true;
@ -1153,7 +1153,7 @@ MingwBackend::GetRegistryTargetFiles ()
installDirectory ) );
return system32ConfigDirectory + sSep + "default " +
system32ConfigDirectory + sSep + "sam " +
system32ConfigDirectory + sSep + "security " +
system32ConfigDirectory + sSep + "security " +
system32ConfigDirectory + sSep + "software " +
system32ConfigDirectory + sSep + "system";
}
@ -1181,7 +1181,7 @@ MingwBackend::OutputRegistryInstallTarget ()
fprintf ( fMakefile,
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%chiveinst.inf\n",
cSep, system32ConfigDirectory.c_str (),
cSep, cSep );
cSep, cSep );
fprintf ( fMakefile,
"\n" );
}

View file

@ -535,10 +535,10 @@ void
MingwModuleHandler::GetReferencedObjectLibraryModuleCleanTargets ( vector<string>& moduleNames ) const
{
for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ )
{
Library& library = *module.non_if_data.libraries[i];
{
Library& library = *module.non_if_data.libraries[i];
if ( library.importedModule->type == ObjectLibrary )
moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) );
moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) );
}
}
@ -550,7 +550,7 @@ MingwModuleHandler::GenerateCleanTarget () const
fprintf ( fMakefile,
".PHONY: %s_clean\n",
module.name.c_str() );
module.name.c_str() );
vector<string> referencedModuleNames;
GetReferencedObjectLibraryModuleCleanTargets ( referencedModuleNames );
fprintf ( fMakefile,
@ -1188,7 +1188,7 @@ MingwModuleHandler::GenerateWidlCommandsServer (
string generatedHeaderFilename = GetRpcServerHeaderFilename ( basename );
CLEAN_FILE(generatedHeaderFilename);
string generatedServerFilename = PassThruCacheDirectory (
string generatedServerFilename = PassThruCacheDirectory (
basename + "_s.c",
backend->intermediateDirectory );
CLEAN_FILE(generatedServerFilename);
@ -1239,7 +1239,7 @@ MingwModuleHandler::GenerateWidlCommandsClient (
string generatedHeaderFilename = GetRpcClientHeaderFilename ( basename );
CLEAN_FILE(generatedHeaderFilename);
string generatedClientFilename = PassThruCacheDirectory (
string generatedClientFilename = PassThruCacheDirectory (
basename + "_c.c",
backend->intermediateDirectory );
CLEAN_FILE(generatedClientFilename);
@ -1493,10 +1493,10 @@ MingwModuleHandler::GenerateCleanObjectsAsYouGoCode () const
{
vector<string> objectFiles;
GetObjectsVector ( module.non_if_data,
objectFiles );
objectFiles );
vector<string> lines;
MergeStringVector ( objectFiles,
lines );
lines );
for ( size_t i = 0; i < lines.size (); i++ )
{
fprintf ( fMakefile,
@ -1518,14 +1518,14 @@ MingwModuleHandler::GenerateRunRsymCode () const
void
MingwModuleHandler::GenerateRunStripCode () const
{
fprintf ( fMakefile,
"ifeq ($(ROS_LEAN_AND_MEAN),yes)\n" );
fprintf ( fMakefile,
"ifeq ($(ROS_LEAN_AND_MEAN),yes)\n" );
fprintf ( fMakefile,
"\t$(ECHO_STRIP)\n" );
fprintf ( fMakefile,
"\t${strip} -s -x -X $@\n\n" );
fprintf ( fMakefile,
"endif\n" );
fprintf ( fMakefile,
"endif\n" );
}
void
@ -2331,7 +2331,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ()
string linkerParameters = ssprintf ( "-Wl,-T,%s%cntoskrnl.lnk -Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared",
module.GetBasePath ().c_str (),
cSep,
cSep,
module.GetEntryPoint(true).c_str (),
module.baseaddress.c_str () );
GenerateLinkerCommand ( dependencies,
@ -3232,8 +3232,8 @@ MingwLiveIsoModuleHandler::OutputProfilesDirectoryCommands ( string& livecdDirec
string livecdIni = "boot" + sSep + "bootdata" + sSep + "livecd.ini";
OutputCopyCommand ( livecdIni,
"freeldr.ini",
livecdDirectory );
"freeldr.ini",
livecdDirectory );
}
void
@ -3244,8 +3244,8 @@ MingwLiveIsoModuleHandler::OutputLoaderCommands ( string& livecdDirectory )
backend->outputDirectory );
CreateDirectory ( livecdDirectory + sSep + "loader" );
OutputCopyCommand ( freeldr,
"setupldr.sys",
livecdDirectory + sSep + "loader" );
"setupldr.sys",
livecdDirectory + sSep + "loader" );
}
void
@ -3260,7 +3260,7 @@ MingwLiveIsoModuleHandler::OutputRegistryCommands ( string& livecdDirectory )
fprintf ( fMakefile,
"\t$(MKHIVE_TARGET) boot%cbootdata %s boot%cbootdata%clivecd.inf boot%cbootdata%chiveinst.inf\n",
cSep, reactosSystem32ConfigDirectory.c_str (),
cSep, cSep, cSep, cSep );
cSep, cSep, cSep, cSep );
}
void

View file

@ -791,9 +791,9 @@ MSVCBackend::_generate_dsp ( const Module& module )
void
MSVCBackend::_generate_dsw_header ( FILE* OUT )
{
fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" );
fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" );
fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" );
fprintf ( OUT, "\r\n" );
}
void
@ -803,21 +803,21 @@ MSVCBackend::_generate_dsw_project (
std::string dsp_file,
const std::vector<Dependency*>& dependencies )
{
dsp_file = DosSeparator ( std::string(".\\") + dsp_file );
// TODO FIXME - must they be sorted?
//@dependencies = sort(@dependencies);
dsp_file = DosSeparator ( std::string(".\\") + dsp_file );
fprintf ( OUT, "###############################################################################\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Package=<5>\r\n" );
fprintf ( OUT, "{{{\r\n" );
fprintf ( OUT, "}}}\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Package=<4>\r\n" );
fprintf ( OUT, "{{{\r\n" );
// TODO FIXME - must they be sorted?
//@dependencies = sort(@dependencies);
fprintf ( OUT, "###############################################################################\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Package=<5>\r\n" );
fprintf ( OUT, "{{{\r\n" );
fprintf ( OUT, "}}}\r\n" );
fprintf ( OUT, "\r\n" );
fprintf ( OUT, "Package=<4>\r\n" );
fprintf ( OUT, "{{{\r\n" );
for ( size_t i = 0; i < dependencies.size(); i++ )
{
Dependency& dependency = *dependencies[i];
@ -860,7 +860,7 @@ MSVCBackend::_generate_wine_dsw ( FILE* OUT )
std::string dsp_file = DspFileName ( module );
// TODO FIXME - more wine hacks?
/*if ( module.name == "gdi32" )
/*if ( module.name == "gdi32" )
{
for ( size_t idir = 0; idir < gdi32_dirs.size(); idir++ )
{
@ -869,9 +869,9 @@ MSVCBackend::_generate_wine_dsw ( FILE* OUT )
dependencies.push_back ( Replace ( "gdi32_" + dir2, "/", "_" ) );
}
}*/
}*/
_generate_dsw_project ( OUT, module, dsp_file, module.dependencies );
}
_generate_dsw_footer ( OUT );
}
_generate_dsw_footer ( OUT );
}

View file

@ -70,7 +70,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
{
size_t i;
string vcproj_file = VcprojFileName(module);
string vcproj_file = VcprojFileName(module);
string username = getenv ( "USERNAME" );
string computername = getenv ( "COMPUTERNAME" );
@ -345,7 +345,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
fprintf ( OUT, "%s", escaped.c_str() );
}
fprintf ( OUT, "\"\r\n" );
fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
fprintf ( OUT, "\t\t\t\tMinimalRebuild=\"%s\"\r\n", speed ? "FALSE" : "TRUE" );
fprintf ( OUT, "\t\t\t\tBasicRuntimeChecks=\"%s\"\r\n", sys ? 0 : (debug ? "3" : "0") );
fprintf ( OUT, "\t\t\t\tRuntimeLibrary=\"%d\"\r\n", debug ? 1 : 5 ); // 1=/MTd 5=/MT
@ -630,12 +630,12 @@ MSVCBackend::_generate_vcproj ( const Module& module )
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"nasmw $(InputPath) -f coff -o &quot;$(OutDir)\\$(InputName).obj&quot;\"\r\n");
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
}
else if ((tolower(source_file.at(source_file.size() - 1)) == 's'))
{
fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" );
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"cl /E &quot;$(InputPath)&quot; %s /D__ASM__ | as -o &quot;$(OutDir)\\$(InputName).obj&quot;\"\r\n",include_string.c_str() );
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
}
else if ((tolower(source_file.at(source_file.size() - 1)) == 's'))
{
fprintf ( OUT, "\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n" );
fprintf ( OUT, "\t\t\t\t\t\tCommandLine=\"cl /E &quot;$(InputPath)&quot; %s /D__ASM__ | as -o &quot;$(OutDir)\\$(InputName).obj&quot;\"\r\n",include_string.c_str() );
fprintf ( OUT, "\t\t\t\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n" );
}
fprintf ( OUT, "\t\t\t\t</FileConfiguration>\r\n" );
}
//}

View file

@ -43,7 +43,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
{
case Kernel:
case KernelModeDLL:
case ExportDriver:
case ExportDriver:
case NativeDLL:
case NativeCUI:
case Win32DLL:

View file

@ -31,40 +31,40 @@ char cBadSep;
void
InitializeEnvironment ()
{
char *SepValue, *ExePostfixValue, *ExePrefixValue;;
char *SepValue, *ExePostfixValue, *ExePrefixValue;;
SepValue = getenv ( "SEP" );
if ( SepValue && ( 0 == strcmp ( SepValue, DEF_SSEP ) || 0 == strcmp ( SepValue, DEF_SBAD_SEP ) ) )
{
cSep = SepValue[0];
sSep = SepValue;
}
else
{
cSep = DEF_CSEP;
sSep = DEF_SSEP;
}
if ( cSep == DEF_CSEP )
{
cBadSep = DEF_CBAD_SEP;
sBadSep = DEF_SBAD_SEP;
}
else
{
cBadSep = DEF_CSEP;
sBadSep = DEF_SSEP;
}
ExePostfixValue = getenv ( "EXEPOSTFIX" );
ExePrefixValue = getenv ( "EXEPREFIX" );
if ( ( ExePostfixValue == NULL || 0 == strlen ( ExePostfixValue ) ) &&
( ExePrefixValue == NULL || 0 == strlen ( ExePrefixValue ) ) )
{
ExePostfix = DEF_EXEPOSTFIX;
ExePrefix = DEF_EXEPREFIX;
}
else
{
ExePostfix = ExePostfixValue ? ExePostfixValue : "";
ExePrefix = ExePrefixValue ? ExePrefixValue : "";
}
SepValue = getenv ( "SEP" );
if ( SepValue && ( 0 == strcmp ( SepValue, DEF_SSEP ) || 0 == strcmp ( SepValue, DEF_SBAD_SEP ) ) )
{
cSep = SepValue[0];
sSep = SepValue;
}
else
{
cSep = DEF_CSEP;
sSep = DEF_SSEP;
}
if ( cSep == DEF_CSEP )
{
cBadSep = DEF_CBAD_SEP;
sBadSep = DEF_SBAD_SEP;
}
else
{
cBadSep = DEF_CSEP;
sBadSep = DEF_SSEP;
}
ExePostfixValue = getenv ( "EXEPOSTFIX" );
ExePrefixValue = getenv ( "EXEPREFIX" );
if ( ( ExePostfixValue == NULL || 0 == strlen ( ExePostfixValue ) ) &&
( ExePrefixValue == NULL || 0 == strlen ( ExePrefixValue ) ) )
{
ExePostfix = DEF_EXEPOSTFIX;
ExePrefix = DEF_EXEPREFIX;
}
else
{
ExePostfix = ExePostfixValue ? ExePostfixValue : "";
ExePrefix = ExePrefixValue ? ExePrefixValue : "";
}
}

View file

@ -785,8 +785,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
return Kernel;
if ( attribute.value == "kernelmodedll" )
return KernelModeDLL;
if ( attribute.value == "exportdriver" )
return ExportDriver;
if ( attribute.value == "exportdriver" )
return ExportDriver;
if ( attribute.value == "kernelmodedriver" )
return KernelModeDriver;
if ( attribute.value == "nativedll" )
@ -855,7 +855,7 @@ Module::GetDefaultModuleExtension () const
return ".dll";
case KernelModeDriver:
case BootLoader:
case ExportDriver:
case ExportDriver:
return ".sys";
case BootSector:
return ".o";
@ -887,8 +887,8 @@ Module::GetDefaultModuleEntrypoint () const
case Kernel:
return "NtProcessStartup";
case KernelModeDLL:
case KernelModeDriver:
case ExportDriver:
case KernelModeDriver:
case ExportDriver:
return "DriverEntry@8";
case NativeDLL:
return "DllMainCRTStartup@12";
@ -947,7 +947,7 @@ Module::GetDefaultModuleBaseaddress () const
return "0x00400000";
case KernelModeDLL:
case KernelModeDriver:
case ExportDriver:
case ExportDriver:
return "0x00010000";
case BuildTool:
case StaticLibrary:
@ -982,10 +982,10 @@ Module::IsDLL () const
{
case Kernel:
case KernelModeDLL:
case ExportDriver:
case ExportDriver:
case NativeDLL:
case Win32DLL:
return true;
return true;
case KernelModeDriver:
case NativeCUI:
case Win32CUI:
@ -1019,7 +1019,7 @@ Module::GenerateInOutputTree () const
{
case Kernel:
case KernelModeDLL:
case ExportDriver:
case ExportDriver:
case NativeDLL:
case Win32DLL:
case KernelModeDriver:
@ -1514,7 +1514,7 @@ AutoRegister::IsSupportedModuleType ( ModuleType type )
return true;
case Kernel:
case KernelModeDLL:
case ExportDriver:
case ExportDriver:
case NativeDLL:
case NativeCUI:
case Win32CUI:

View file

@ -227,7 +227,6 @@ Project::WriteConfigurationFile ()
void
Project::ExecuteInvocations ()
{
fprintf( stderr, "ExecuteInvocations\n" );
for ( size_t i = 0; i < modules.size (); i++ )
modules[i]->InvokeModule ();
}

View file

@ -256,13 +256,13 @@ main ( int argc, char** argv )
printf ( " -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n" );
printf ( "\n" );
printf ( " buildsystem Target build system. Can be one of:\n" );
std::map<std::string,Backend::Factory*>::iterator iter;
for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
{
Backend::Factory *factory = iter->second;
printf ( " %-10s %s\n", factory->Name(), factory->Description());
}
std::map<std::string,Backend::Factory*>::iterator iter;
for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
{
Backend::Factory *factory = iter->second;
printf ( " %-10s %s\n", factory->Name(), factory->Description());
}
return 1;
}
try

View file

@ -101,12 +101,12 @@ SysSetupGenerator::Generate ( HINF inf,
InfHostCloseFile ( inf );
}
if ( 0 != InfHostAddLine ( context, NULL ) ||
0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) ||
0 != InfHostAddField ( context, "" ) ||
0 != InfHostAddField ( context, module.installName.c_str () ) ||
0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) )
{
if ( 0 != InfHostAddLine ( context, NULL ) ||
0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) ||
0 != InfHostAddField ( context, "" ) ||
0 != InfHostAddField ( context, module.installName.c_str () ) ||
0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) )
{
InfHostFreeContext ( context );
InfHostCloseFile ( inf );
throw InvalidOperationException ( __FILE__,

View file

@ -409,7 +409,7 @@ TestSupportCode::WriteStartupFile ( Module& module )
s = s + sprintf ( s, "{\n" );
s = s + sprintf ( s, " _SetPriorityClass(_GetCurrentProcess(), HIGH_PRIORITY_CLASS);\n" );
s = s + sprintf ( s, " _SetThreadPriority(_GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);\n" );
s = s + sprintf ( s, " InitializeTests();\n" );
s = s + sprintf ( s, " InitializeTests();\n" );
s = s + sprintf ( s, " RegisterTests();\n" );
s = s + sprintf ( s, " SetupOnce();\n" );
s = s + sprintf ( s, " PerformTests(ConsoleWrite, NULL);\n" );