From cac30b5ff8f7034b5290700a4dee28c84e001ac9 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 12 May 2006 14:12:13 -0400 Subject: [PATCH] STYLE: fix line length --- Source/cmTarget.cxx | 28 +++++++---- Source/cmTarget.h | 14 ++++-- Source/cmTargetLinkLibrariesCommand.cxx | 3 +- Source/cmTryCompileCommand.cxx | 3 +- Source/cmTryCompileCommand.h | 13 ++--- Source/cmUseMangledMesaCommand.cxx | 3 +- Source/cmUtilitySourceCommand.cxx | 3 +- Source/cmVTKMakeInstantiatorCommand.cxx | 18 ++++--- Source/cmVTKWrapJavaCommand.cxx | 10 ++-- Source/cmVTKWrapPythonCommand.cxx | 17 ++++--- Source/cmVTKWrapTclCommand.cxx | 67 ++++++++++++++++--------- Source/cmWin32ProcessExecution.h | 6 ++- Source/cmWriteFileCommand.cxx | 3 +- 13 files changed, 117 insertions(+), 71 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f0132e340..0f34a97cb 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -38,7 +38,8 @@ void cmTarget::SetType(TargetType type, const char* name) this->Name = name; // only add dependency information for library targets this->TargetTypeValue = type; - if(this->TargetTypeValue >= STATIC_LIBRARY && this->TargetTypeValue <= MODULE_LIBRARY) + if(this->TargetTypeValue >= STATIC_LIBRARY + && this->TargetTypeValue <= MODULE_LIBRARY) { this->RecordDependencies = true; } @@ -182,8 +183,8 @@ void cmTarget::TraceVSDependencies(std::string projFile, ic != this->GetPostBuildCommands().end(); ++ic) { cmCustomCommand &c = *ic; - for (std::vector::const_iterator i = c.GetDepends().begin(); - i != c.GetDepends().end(); ++i) + for (std::vector::const_iterator i + = c.GetDepends().begin(); i != c.GetDepends().end(); ++i) { srcFilesToProcess.push(*i); srcFilesQueued.insert(*i); @@ -241,7 +242,8 @@ void cmTarget::TraceVSDependencies(std::string projFile, if (srcFilesQueued.find(outsf->GetCustomCommand()->GetDepends()[i]) == srcFilesQueued.end()) { - srcFilesToProcess.push(outsf->GetCustomCommand()->GetDepends()[i]); + srcFilesToProcess.push + (outsf->GetCustomCommand()->GetDepends()[i]); srcFilesQueued.insert(outsf->GetCustomCommand()->GetDepends()[i]); } } @@ -380,7 +382,8 @@ const std::vector& cmTarget::GetLinkDirectories() // is an N^2 algorithm for adding the directories, but N // should not get very big. const char* libpath = tgt->GetDirectory(); - if(std::find(this->LinkDirectories.begin(), this->LinkDirectories.end(), + if(std::find(this->LinkDirectories.begin(), + this->LinkDirectories.end(), libpath) == this->LinkDirectories.end()) { this->LinkDirectories.push_back(libpath); @@ -396,7 +399,8 @@ const std::vector& cmTarget::GetLinkDirectories() return this->LinkDirectories; } -void cmTarget::ClearDependencyInformation( cmMakefile& mf, const char* target ) +void cmTarget::ClearDependencyInformation( cmMakefile& mf, + const char* target ) { // Clear the dependencies. The cache variable must exist iff we are // recording dependency information for this target. @@ -627,7 +631,8 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf ) // 1. Build the dependency graph // - for(LinkLibraryVectorType::reverse_iterator lib = this->LinkLibraries.rbegin(); + for(LinkLibraryVectorType::reverse_iterator lib + = this->LinkLibraries.rbegin(); lib != this->LinkLibraries.rend(); ++lib) { this->GatherDependencies( mf, lib->first, dep_map ); @@ -838,10 +843,12 @@ const char* cmTarget::GetDirectory(const char* config) case cmTarget::STATIC_LIBRARY: case cmTarget::MODULE_LIBRARY: case cmTarget::SHARED_LIBRARY: - this->Directory = this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH"); + this->Directory = + this->Makefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH"); break; case cmTarget::EXECUTABLE: - this->Directory = this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); + this->Directory = + this->Makefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); break; default: return 0; @@ -963,7 +970,8 @@ const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg) return linkerLang; } std::set languages; - for(std::vector::const_iterator i = this->SourceFiles.begin(); + for(std::vector::const_iterator i + = this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i) { const char* lang = diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 736bad587..cc3957232 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -60,7 +60,8 @@ public: */ bool IsInAll() { return this->GetPropertyAsBool("IN_ALL"); } bool GetInAll() { return this->GetPropertyAsBool("IN_ALL"); } - void SetInAll(bool f) { this->SetProperty("IN_ALL", (f) ?"TRUE" : "FALSE"); } + void SetInAll(bool f) { + this->SetProperty("IN_ALL", (f) ?"TRUE" : "FALSE"); } ///! Set the cmMakefile that owns this target void SetMakefile(cmMakefile *mf); @@ -96,7 +97,8 @@ public: typedef std::vector > LinkLibraryVectorType; - const LinkLibraryVectorType &GetLinkLibraries() {return this->LinkLibraries;} + const LinkLibraryVectorType &GetLinkLibraries() { + return this->LinkLibraries;} const LinkLibraryVectorType &GetOriginalLinkLibraries() {return this->OriginalLinkLibraries;} @@ -133,7 +135,8 @@ public: * installed. This is relative to INSTALL_PREFIX */ std::string GetRuntimeInstallPath() {return this->RuntimeInstallPath;} - void SetRuntimeInstallPath(const char *name) {this->RuntimeInstallPath = name;} + void SetRuntimeInstallPath(const char *name) { + this->RuntimeInstallPath = name;} /** * Get/Set whether there is an install rule for this target. @@ -189,9 +192,10 @@ public: /** Get the full name of the target according to the settings in its makefile. */ std::string GetFullName(const char* config=0, bool implib = false); - void GetFullName(std::string& prefix, std::string& base, std::string& suffix, + void GetFullName(std::string& prefix, + std::string& base, std::string& suffix, const char* config=0, bool implib = false); - + /** Get the full path to the target according to the settings in its makefile and the configuration type. */ std::string GetFullPath(const char* config=0, bool implib = false); diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 4753bd816..af5ecb190 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -43,7 +43,8 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector ++i; if(i == args.end()) { - this->SetError("The \"debug\" argument must be followed by a library"); + this->SetError + ("The \"debug\" argument must be followed by a library"); return false; } this->Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(), diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index e524b776c..c7405ca15 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -167,7 +167,8 @@ int cmTryCompileCommand::CoreTryCompileCode( << source << "\". TRY_COMPILE only works for enabled languages.\n" << "Currently enabled languages are:"; std::vector langs; - mf->GetCMakeInstance()->GetGlobalGenerator()->GetEnabledLanguages(langs); + mf->GetCMakeInstance()->GetGlobalGenerator()-> + GetEnabledLanguages(langs); for(std::vector::iterator l = langs.begin(); l != langs.end(); ++l) { diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 8ff2b7840..ed3e0c64b 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -77,16 +77,16 @@ public: " TRY_COMPILE(RESULT_VAR bindir srcdir\n" " projectName >\n" " )\n" - "Try compiling a program. Return the success or failure in RESULT_VAR. " - "If is specified then build just that target " + "Try compiling a program. Return the success or failure in " + "RESULT_VAR. If is specified then build just that target " "otherwise the all or ALL_BUILD target is built.\n" " TRY_COMPILE(RESULT_VAR bindir srcfile\n" " >\n" " ...>\n" " )\n" - "Try compiling a srcfile. Return the success or failure in RESULT_VAR. " - "CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags to cmake. Some " - "extra flags that can be included are, " + "Try compiling a srcfile. Return the success or failure in " + "RESULT_VAR. CMAKE_FLAGS can be used to pass -DVAR:TYPE=VALUE flags " + "to cmake. Some extra flags that can be included are, " "INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES. " "COMPILE_DEFINITIONS are -Ddefinition that will be passed to the " "compile line. If srcfile is specified the files in " @@ -95,7 +95,8 @@ public: "output from the build process is stored in the given variable. " "TRY_COMPILE creates a CMakeList.txt " "file on the fly, and in that file it looks like this:\n" - " ADD_DEFINITIONS( )\n" + " ADD_DEFINITIONS( )\n" " INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n" " LINK_DIRECTORIES(${LINK_DIRECTORIES})\n" " ADD_EXECUTABLE(cmTryCompileExec sources)\n" diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx index 86991883b..0e73cefc8 100644 --- a/Source/cmUseMangledMesaCommand.cxx +++ b/Source/cmUseMangledMesaCommand.cxx @@ -20,7 +20,8 @@ #include // cmUseMangledMesaCommand -bool cmUseMangledMesaCommand::InitialPass(std::vector const& args) +bool cmUseMangledMesaCommand +::InitialPass(std::vector const& args) { // expected two arguments: // arguement one: the full path to gl_mangle.h diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 0bb0c1d73..5160189b4 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -34,7 +34,8 @@ bool cmUtilitySourceCommand::InitialPass(std::vector const& args) // If it exists already and appears up to date then we are done. If // the string contains "(IntDir)" but that is not the // CMAKE_CFG_INTDIR setting then the value is out of date. - const char* intDir = this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); + const char* intDir = + this->Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); if(cacheValue && (strstr(cacheValue, "(IntDir)") == 0 || intDir && strcmp(intDir, "$(IntDir)") == 0) && diff --git a/Source/cmVTKMakeInstantiatorCommand.cxx b/Source/cmVTKMakeInstantiatorCommand.cxx index acccd2bfc..f39c6b578 100644 --- a/Source/cmVTKMakeInstantiatorCommand.cxx +++ b/Source/cmVTKMakeInstantiatorCommand.cxx @@ -238,7 +238,8 @@ cmVTKMakeInstantiatorCommand // Write the instantiator class definition. os << "\n" - "class " << this->ExportMacro.c_str() << " " << this->ClassName.c_str() << "\n" + "class " << this->ExportMacro.c_str() + << " " << this->ClassName.c_str() << "\n" "{\n" "public:\n" " " << this->ClassName.c_str() << "();\n" @@ -388,7 +389,8 @@ cmVTKMakeInstantiatorCommand "\n" "class " << this->ClassName.c_str() << "Initialize;\n" "\n" - "class " << this->ExportMacro.c_str() << " " << this->ClassName.c_str() << "\n" + "class " << this->ExportMacro.c_str() << " " + << this->ClassName.c_str() << "\n" "{\n" " friend class " << this->ClassName.c_str() << "Initialize;\n" "\n" @@ -398,7 +400,8 @@ cmVTKMakeInstantiatorCommand for(unsigned int i=0;i < this->Classes.size();++i) { - os << " static vtkObject* Create_" << this->Classes[i].c_str() << "();\n"; + os << " static vtkObject* Create_" + << this->Classes[i].c_str() << "();\n"; } // Write the initializer class to make sure the creation functions @@ -425,8 +428,7 @@ cmVTKMakeInstantiatorCommand // Generates the file with the implementation of the class. All // methods except the actual object creation functions are generated // here. -void -cmVTKMakeInstantiatorCommand +void cmVTKMakeInstantiatorCommand ::OldGenerateImplementationFile(std::ostream& os) { // Write the ClassInitialize method to register all the creation functions. @@ -439,7 +441,8 @@ cmVTKMakeInstantiatorCommand for(unsigned int i=0;i < this->Classes.size();++i) { os << " vtkInstantiator::RegisterInstantiator(\"" - << this->Classes[i].c_str() << "\", " << this->ClassName.c_str() << "::Create_" + << this->Classes[i].c_str() << "\", " + << this->ClassName.c_str() << "::Create_" << this->Classes[i].c_str() << ");\n"; } @@ -453,7 +456,8 @@ cmVTKMakeInstantiatorCommand for(unsigned int i=0;i < this->Classes.size();++i) { os << " vtkInstantiator::UnRegisterInstantiator(\"" - << this->Classes[i].c_str() << "\", " << this->ClassName.c_str() << "::Create_" + << this->Classes[i].c_str() << "\", " + << this->ClassName.c_str() << "::Create_" << this->Classes[i].c_str() << ");\n"; } diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx index 320216995..690ba0a32 100644 --- a/Source/cmVTKWrapJavaCommand.cxx +++ b/Source/cmVTKWrapJavaCommand.cxx @@ -57,7 +57,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector const& argsIn) std::ofstream depFile(depFileName.c_str()); depFile << "# This file is automatically generated by CMake VTK_WRAP_JAVA" << std::endl << std::endl; - depFile << "SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}" << std::endl; + depFile << + "SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}" << std::endl; // get the list of classes for this library for(std::vector::const_iterator j = (args.begin() + 2); @@ -75,8 +76,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector const& argsIn) } std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j); std::string newName = srcName + "Java"; - file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(), - "cxx",false); + file.SetName(newName.c_str(), + this->Makefile->GetCurrentOutputDirectory(), "cxx",false); std::string hname = cdir + "/" + srcName + ".h"; this->WrapHeaders.push_back(hname); // add starting depends @@ -101,7 +102,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector const& argsIn) // Finalize java dependency file depFile << ")" << std::endl; - this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str()); + this->Makefile->AddDefinition(this->SourceList.c_str(), + sourceListValue.c_str()); return true; } diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx index 886a4adc4..fb2653e36 100644 --- a/Source/cmVTKWrapPythonCommand.cxx +++ b/Source/cmVTKWrapPythonCommand.cxx @@ -76,7 +76,8 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector const& } std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j); std::string newName = srcName + "Python"; - file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(), + file.SetName(newName.c_str(), + this->Makefile->GetCurrentOutputDirectory(), "cxx",false); std::string hname = cdir + "/" + srcName + ".h"; this->WrapHeaders.push_back(hname); @@ -94,7 +95,8 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector const& cfile.SetName(initName.c_str(), this->Makefile->GetCurrentOutputDirectory(), "cxx",false); this->Makefile->AddSource(cfile); - this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str()); + this->Makefile->AddDefinition(this->SourceList.c_str(), + sourceListValue.c_str()); return true; } @@ -196,8 +198,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName, for (i = 0; i < classes.size(); i++) { #ifdef _WIN32 - fprintf(fout, - "extern \"C\" {__declspec( dllexport) PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str()); + fprintf(fout, "extern \"C\" {__declspec( dllexport) " + "PyObject *PyVTKClass_%sNew(char *); }\n", classes[i].c_str()); #else fprintf(fout,"extern \"C\" {PyObject *PyVTKClass_%sNew(char *); }\n", classes[i].c_str()); @@ -229,8 +231,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName, kitName); fprintf(fout," d = PyModule_GetDict(m);\n"); - fprintf(fout," if (!d) Py_FatalError(\"can't get dictionary for module %s!\");\n\n", - kitName); + fprintf(fout," if (!d) Py_FatalError" + "(\"can't get dictionary for module %s!\");\n\n", kitName); for (i = 0; i < classes.size(); i++) { @@ -238,7 +240,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName, classes[i].c_str()); fprintf(fout," if (-1 == PyDict_SetItemString(d, \"%s\", c))\n", classes[i].c_str()); - fprintf(fout," Py_FatalError(\"can't add class %s to dictionary!\");\n\n", + fprintf(fout, + " Py_FatalError(\"can't add class %s to dictionary!\");\n\n", classes[i].c_str()); } fprintf(fout,"}\n\n"); diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx index de4ca9c3f..25de30f68 100644 --- a/Source/cmVTKWrapTclCommand.cxx +++ b/Source/cmVTKWrapTclCommand.cxx @@ -84,7 +84,8 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector const& argsIn) std::string sourceListValue; // was the list already populated - const char *def = this->Makefile->GetDefinition(this->SourceList.c_str()); + const char *def = + this->Makefile->GetDefinition(this->SourceList.c_str()); if (def) { sourceListValue = def; @@ -114,7 +115,8 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector const& argsIn) std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*j); std::string newName = srcName + "Tcl"; std::string hname = srcDir + "/" + srcName + ".h"; - file.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(), + file.SetName(newName.c_str(), + this->Makefile->GetCurrentOutputDirectory(), "cxx",false); this->WrapHeaders.push_back(hname); // add starting depends @@ -130,10 +132,12 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector const& argsIn) std::string newName = this->LibraryName; newName += "Init"; this->CreateInitFile(res); - cfile.SetName(newName.c_str(), this->Makefile->GetCurrentOutputDirectory(), + cfile.SetName(newName.c_str(), + this->Makefile->GetCurrentOutputDirectory(), "cxx",false); this->Makefile->AddSource(cfile); - this->Makefile->AddDefinition(this->SourceList.c_str(), sourceListValue.c_str()); + this->Makefile->AddDefinition(this->SourceList.c_str(), + sourceListValue.c_str()); } return true; @@ -144,7 +148,8 @@ void cmVTKWrapTclCommand::FinalPass() // first we add the rules for all the .h to Tcl.cxx files size_t lastClass = this->WrapClasses.size(); std::vector depends; - const char* wtcl = this->Makefile->GetRequiredDefinition("VTK_WRAP_TCL_EXE"); + const char* wtcl = + this->Makefile->GetRequiredDefinition("VTK_WRAP_TCL_EXE"); const char* hints = this->Makefile->GetDefinition("VTK_WRAP_HINTS"); // wrap all the .h files @@ -247,17 +252,22 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName, fprintf(fout, "extern \"C\"\n" "{\n" - "#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4) && (TCL_RELEASE_LEVEL >= TCL_FINAL_RELEASE)\n" - " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,int, CONST84 char *[]);\n" + "#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4) " + "&& (TCL_RELEASE_LEVEL >= TCL_FINAL_RELEASE)\n" + " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *," + "int, CONST84 char *[]);\n" "#else\n" - " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *,int, char *[]);\n" + " typedef int (*vtkTclCommandType)(ClientData, Tcl_Interp *," + "int, char *[]);\n" "#endif\n" "}\n" "\n"); for (i = 0; i < classes.size(); i++) { - fprintf(fout,"int %sCommand(ClientData cd, Tcl_Interp *interp,\n int argc, char *argv[]);\n",classes[i].c_str()); + fprintf(fout,"int %sCommand(ClientData cd, Tcl_Interp *interp,\n" + ,classes[i].c_str()); + fprintf(fout," int argc, char *argv[]);\n"); fprintf(fout,"ClientData %sNewCommand();\n",classes[i].c_str()); } @@ -280,32 +290,37 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName, fprintf(fout,"extern Tcl_HashTable vtkCommandLookup;\n"); } fprintf(fout,"extern void vtkTclDeleteObjectFromHash(void *);\n"); - fprintf(fout,"extern void vtkTclListInstances(Tcl_Interp *interp, ClientData arg);\n"); + fprintf(fout,"extern void vtkTclListInstances(Tcl_Interp *interp," + "ClientData arg);\n"); for (i = 0; i < this->Commands.size(); i++) { - fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n", + fprintf(fout, + "\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n", capcommands[i].c_str()); } - fprintf(fout,"\n\nextern \"C\" {int VTK_EXPORT %s_SafeInit(Tcl_Interp *interp);}\n", - kitName); - fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init(Tcl_Interp *interp);}\n", - kitName); + fprintf(fout,"\n\nextern \"C\" {int VTK_EXPORT " + "%s_SafeInit(Tcl_Interp *interp);}\n", kitName); + fprintf(fout,"\nextern \"C\" {int VTK_EXPORT %s_Init" + "(Tcl_Interp *interp);}\n", kitName); /* create an extern ref to the generic delete function */ fprintf(fout,"\nextern void vtkTclGenericDeleteObject(ClientData cd);\n"); if (!strcmp(kitName,"Vtkcommontcl")) { - fprintf(fout,"extern \"C\"\n{\nvoid vtkCommonDeleteAssocData(ClientData cd)\n"); + fprintf(fout,"extern \"C\"\n{\nvoid " + "vtkCommonDeleteAssocData(ClientData cd)\n"); fprintf(fout," {\n"); - fprintf(fout," vtkTclInterpStruct *tis = static_cast(cd);\n"); + fprintf(fout," vtkTclInterpStruct *tis = " + "static_cast(cd);\n"); fprintf(fout," delete tis;\n }\n}\n"); } /* the main declaration */ - fprintf(fout,"\n\nint VTK_EXPORT %s_SafeInit(Tcl_Interp *interp)\n{\n",kitName); + fprintf(fout, + "\n\nint VTK_EXPORT %s_SafeInit(Tcl_Interp *interp)\n{\n",kitName); fprintf(fout," return %s_Init(interp);\n}\n",kitName); fprintf(fout,"\n\nint VTK_EXPORT %s_Init(Tcl_Interp *interp)\n{\n", @@ -324,15 +339,17 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName, " Tcl_InitHashTable(&info->PointerLookup, TCL_STRING_KEYS);\n"); fprintf(fout, " Tcl_InitHashTable(&info->CommandLookup, TCL_STRING_KEYS);\n"); - fprintf(fout, - " Tcl_SetAssocData(interp,(char *) \"vtk\",NULL,(ClientData *)info);\n"); - fprintf(fout, - " Tcl_CreateExitHandler(vtkCommonDeleteAssocData,(ClientData *)info);\n"); + fprintf(fout, " Tcl_SetAssocData(interp,(char *) " + "\"vtk\",NULL,(ClientData *)info);\n"); + fprintf(fout, " Tcl_CreateExitHandler(vtkCommonDeleteAssocData" + ",(ClientData *)info);\n"); /* create special vtkCommand command */ - fprintf(fout," Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n" - " reinterpret_cast(vtkCommandForward),\n" - " (ClientData *)NULL, NULL);\n\n"); + fprintf(fout, + " Tcl_CreateCommand(interp,(char *) \"vtkCommand\",\n" + " reinterpret_cast(" + "vtkCommandForward),\n" + " (ClientData *)NULL, NULL);\n\n"); } for (i = 0; i < this->Commands.size(); i++) diff --git a/Source/cmWin32ProcessExecution.h b/Source/cmWin32ProcessExecution.h index 9f5837479..2d5427f44 100644 --- a/Source/cmWin32ProcessExecution.h +++ b/Source/cmWin32ProcessExecution.h @@ -135,8 +135,10 @@ public: * will display it in our app. Consequently, we check for input in * our app and send it off to the write end of the stdin pipe. */ - static bool BorlandRunCommand(const char* command, const char* dir, - std::string& output, int& retVal, bool verbose, + static bool BorlandRunCommand(const char* command, + const char* dir, + std::string& output, int& retVal, + bool verbose, int timeout, bool hideWindows); private: diff --git a/Source/cmWriteFileCommand.cxx b/Source/cmWriteFileCommand.cxx index 8798abb3c..08d02b8e6 100644 --- a/Source/cmWriteFileCommand.cxx +++ b/Source/cmWriteFileCommand.cxx @@ -83,7 +83,8 @@ bool cmWriteFileCommand::InitialPass(std::vector const& args) } // If GetPermissions fails, pretend like it is ok. File open will fail if // the file is not writable - std::ofstream file(fileName.c_str(), overwrite?std::ios::out : std::ios::app); + std::ofstream file(fileName.c_str(), + overwrite?std::ios::out : std::ios::app); if ( !file ) { std::string error = "Internal CMake error when trying to open file: ";