[ros-diffs] [mpiulachs] 30078: Place CreditsGenerator class in its own file "creditsgeneratorenerator.cpp" to make Colin happy

mpiulachs at svn.reactos.org mpiulachs at svn.reactos.org
Sat Nov 3 00:01:03 CET 2007


Author: mpiulachs
Date: Sat Nov  3 02:01:03 2007
New Revision: 30078

URL: http://svn.reactos.org/svn/reactos?rev=30078&view=rev
Log:
Place CreditsGenerator class in its own file "creditsgeneratorenerator.cpp" to make Colin happy

Added:
    branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp   (with props)
Modified:
    branches/rbuild/reactos/tools/rbuild/modulesmanifestgenerator.cpp
    branches/rbuild/reactos/tools/rbuild/rbuild.mak
    branches/rbuild/reactos/tools/rbuild/rbuild.vcproj

Added: branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp
URL: http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp?rev=30078&view=auto
==============================================================================
--- branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp (added)
+++ branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp Sat Nov  3 02:01:03 2007
@@ -1,0 +1,71 @@
+/*
+ * Copyright (C) 2007 Marc Piulachs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <assert.h>
+#include "rbuild.h"
+
+using std::string;
+using std::vector;
+
+
+CreditsGenerator::CreditsGenerator ( const Project& project )
+	: project ( project )
+{
+}
+
+CreditsGenerator::~CreditsGenerator ()
+{
+}
+
+void
+CreditsGenerator::Generate ()
+{
+	char* buf;
+	char* s;
+
+	buf = (char*) malloc ( 512*1024 );
+	if ( buf == NULL )
+		throw OutOfMemoryException ();
+	
+	s = buf;
+	s = s + sprintf ( s, "ReactOS is available thanks to the work of:\n\n");
+
+    for ( size_t i = 0; i < project.contributors.size (); i++ )
+	{
+        Contributor& contributor = *project.contributors[i];
+
+	    s = s + sprintf ( s, "\t%s %s (%s)\n" , 
+            contributor.firstName.c_str() , 
+            contributor.lastName.c_str() , 
+            contributor.alias.c_str());
+        
+        s = s + sprintf ( s, "\t\t%s\n" , contributor.mail.c_str());
+        
+        if (strlen(contributor.city.c_str()) > 0 &&
+            strlen(contributor.country.c_str()) > 0)
+        {
+            s = s + sprintf ( s, "\t\t%s,%s\n\n" , 
+                contributor.city.c_str() , 
+                contributor.country.c_str());
+        }
+	}
+
+
+	FileSupportCode::WriteIfChanged ( buf, NormalizeFilename ( Environment::GetIntermediatePath () + sSep + "CREDITS" ) );
+
+	free ( buf );
+}

Propchange: branches/rbuild/reactos/tools/rbuild/creditsgeneratorenerator.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/rbuild/reactos/tools/rbuild/modulesmanifestgenerator.cpp
URL: http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/modulesmanifestgenerator.cpp?rev=30078&r1=30077&r2=30078&view=diff
==============================================================================
--- branches/rbuild/reactos/tools/rbuild/modulesmanifestgenerator.cpp (original)
+++ branches/rbuild/reactos/tools/rbuild/modulesmanifestgenerator.cpp Sat Nov  3 02:01:03 2007
@@ -91,52 +91,3 @@
 
 	free ( buf );
 }
-
-
-CreditsGenerator::CreditsGenerator ( const Project& project )
-	: project ( project )
-{
-}
-
-CreditsGenerator::~CreditsGenerator ()
-{
-}
-
-void
-CreditsGenerator::Generate ()
-{
-	char* buf;
-	char* s;
-
-	buf = (char*) malloc ( 512*1024 );
-	if ( buf == NULL )
-		throw OutOfMemoryException ();
-	
-	s = buf;
-	s = s + sprintf ( s, "ReactOS is available thanks to the work of:\n\n");
-
-    for ( size_t i = 0; i < project.contributors.size (); i++ )
-	{
-        Contributor& contributor = *project.contributors[i];
-
-	    s = s + sprintf ( s, "\t%s %s (%s)\n" , 
-            contributor.firstName.c_str() , 
-            contributor.lastName.c_str() , 
-            contributor.alias.c_str());
-        
-        s = s + sprintf ( s, "\t\t%s\n" , contributor.mail.c_str());
-        
-        if (strlen(contributor.city.c_str()) > 0 &&
-            strlen(contributor.country.c_str()) > 0)
-        {
-            s = s + sprintf ( s, "\t\t%s,%s\n\n" , 
-                contributor.city.c_str() , 
-                contributor.country.c_str());
-        }
-	}
-
-
-	FileSupportCode::WriteIfChanged ( buf, NormalizeFilename ( Environment::GetIntermediatePath () + sSep + "CREDITS" ) );
-
-	free ( buf );
-}

Modified: branches/rbuild/reactos/tools/rbuild/rbuild.mak
URL: http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/rbuild.mak?rev=30078&r1=30077&r2=30078&view=diff
==============================================================================
--- branches/rbuild/reactos/tools/rbuild/rbuild.mak (original)
+++ branches/rbuild/reactos/tools/rbuild/rbuild.mak Sat Nov  3 02:01:03 2007
@@ -266,6 +266,7 @@
 		testsupportcode.cpp \
 		modulesmanifestgenerator.cpp \
 		modulesresourcegenerator.cpp \
+		creditsgeneratorenerator.cpp \
 		wineresource.cpp \
 		xmlnode.cpp \
 		)
@@ -458,6 +459,10 @@
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
+$(RBUILD_INT_)creditsgeneratorenerator.o: $(RBUILD_BASE_)creditsgeneratorenerator.cpp $(RBUILD_HEADERS) | $(RBUILD_INT)
+	$(ECHO_CC)
+	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
+
 $(RBUILD_INT_)modulesmanifestgenerator.o: $(RBUILD_BASE_)modulesmanifestgenerator.cpp $(RBUILD_HEADERS) | $(RBUILD_INT)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@

Modified: branches/rbuild/reactos/tools/rbuild/rbuild.vcproj
URL: http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/tools/rbuild/rbuild.vcproj?rev=30078&r1=30077&r2=30078&view=diff
==============================================================================
--- branches/rbuild/reactos/tools/rbuild/rbuild.vcproj (original)
+++ branches/rbuild/reactos/tools/rbuild/rbuild.vcproj Sat Nov  3 02:01:03 2007
@@ -684,6 +684,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath=".\creditsgeneratorenerator.cpp"
+				>
+			</File>
+			<File
 				RelativePath="define.cpp"
 				>
 				<FileConfiguration




More information about the Ros-diffs mailing list