From c05e3613ce61c0a330df7102b9660ec9da37bf3d Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Tue, 30 Jul 2002 10:33:02 -0400 Subject: =?UTF-8?q?FIX:=20la=20commande=20cr=C3=A9ait=20du=20code=20C++.?= =?UTF-8?q?=20Du=20code=20C=20devrait=20faire=20l'affaire.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/cmCreateTestSourceList.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index 74279fe..9df7a25 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -91,7 +91,8 @@ bool cmCreateTestSourceList::InitialPass(std::vector const& argsIn) fout << "#include \n" "#include \n" - "#include \n"; + "#include \n" + "#include \n"; if(extraInclude.size()) { fout << "#include \"" << extraInclude << "\"\n"; @@ -156,11 +157,12 @@ bool cmCreateTestSourceList::InitialPass(std::vector const& argsIn) "};\n" "\n" "// Allocate and create a lowercased copy of string\n" + "// (note that it has to be free'd manually)\n" "\n" "char* lowercase(const char *string)\n" "{\n" " char *new_string, *p;\n" - " new_string = new char[strlen(string) + 1];\n" + " new_string = (char *)malloc(sizeof(char) * (size_t)(strlen(string) + 1));\n" " if (!new_string)\n" " {\n" " return NULL;\n" @@ -235,9 +237,9 @@ bool cmCreateTestSourceList::InitialPass(std::vector const& argsIn) " {\n" " return (*cmakeGeneratedFunctionMapEntries[i].func)(ac - 1, av + 1);\n" " }\n" - " delete [] test_name;\n" + " free(test_name);\n" " }\n" - " delete [] arg;\n" + " free(arg);\n" " \n" " // If the test was not found but there is only one test, then\n" " // run it with the arguments\n" -- cgit v0.12