[Scummvm-cvs-logs] SF.net SVN: scummvm:[44361] tools/branches/gsoc2009-gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Sep 25 18:53:18 CEST 2009


Revision: 44361
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44361&view=rev
Author:   fingolfin
Date:     2009-09-25 16:53:18 +0000 (Fri, 25 Sep 2009)

Log Message:
-----------
Fix whitespaces / code formatting

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/compress.h
    tools/branches/gsoc2009-gui/compress_gob.h
    tools/branches/gsoc2009-gui/compress_saga.h
    tools/branches/gsoc2009-gui/compress_scumm_bun.h
    tools/branches/gsoc2009-gui/compress_scumm_san.h
    tools/branches/gsoc2009-gui/compress_scumm_sou.h
    tools/branches/gsoc2009-gui/compress_sword1.h
    tools/branches/gsoc2009-gui/compress_sword2.h
    tools/branches/gsoc2009-gui/compress_tinsel.h
    tools/branches/gsoc2009-gui/compress_touche.h
    tools/branches/gsoc2009-gui/compress_tucker.h
    tools/branches/gsoc2009-gui/example_tool.cpp
    tools/branches/gsoc2009-gui/main_cli.cpp
    tools/branches/gsoc2009-gui/tool.cpp
    tools/branches/gsoc2009-gui/tools_cli.cpp
    tools/branches/gsoc2009-gui/tools_cli.h
    tools/branches/gsoc2009-gui/utils/file.cpp

Modified: tools/branches/gsoc2009-gui/compress.h
===================================================================
--- tools/branches/gsoc2009-gui/compress.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -63,7 +63,6 @@
  * Compression tool
  * A tool, which can compress to either MP3, Vorbis or FLAC formats
  */
-
 class CompressionTool : public Tool {
 public:
 	CompressionTool(const std::string &name, ToolType type);

Modified: tools/branches/gsoc2009-gui/compress_gob.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_gob.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -28,12 +28,13 @@
 #define confSTK21 "STK21"
 #define confSTK10 "STK10"
 
-#define MODE_NORMAL 0
-#define MODE_HELP   1
-#define MODE_FORCE  2
-#define MODE_SET    4
+enum {
+	MODE_NORMAL = 0,
+	MODE_HELP   = 1,
+	MODE_FORCE  = 2,
+	MODE_SET    = 4
+};
 
-
 class CompressGob : public CompressionTool {
 public:
 	CompressGob(const std::string &name = "compress_gob");

Modified: tools/branches/gsoc2009-gui/compress_saga.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_saga.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_saga.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -22,7 +22,6 @@
  *
  */
 
-
 #ifndef COMPRESS_SAGA_H
 #define COMPRESS_SAGA_H
 
@@ -86,5 +85,3 @@
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifndef COMPRESS_SCUMM_BUN_H
 #define COMPRESS_SCUMM_BUN_H
 
@@ -32,7 +31,6 @@
 
 	virtual void execute();
 
-
 	struct BundleAudioTable {
 		char filename[24];
 		int size;
@@ -60,9 +58,6 @@
 	void writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, File &output);
 	void recalcRegions(int32 &value, int bits, int freq, int channels);
 	void writeToRMAPFile(byte *ptr, File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels);
-
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_scumm_san.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -20,15 +20,15 @@
  *
  */
 
-
 #ifndef COMPRESS_SCUMM_SAN_H
 #define COMPRESS_SCUMM_SAN_H
 
 #include "compress.h"
 
+enum {
+	COMPRESS_SCUMM_SAN_MAX_TRACKS = 150
+};
 
-#define COMPRESS_SCUMM_SAN_MAX_TRACKS 150
-
 class CompressScummSan : public CompressionTool {
 public:
 	CompressScummSan(const std::string &name = "compress_scumm_san");
@@ -89,5 +89,3 @@
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_scumm_sou.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -20,13 +20,11 @@
  *
  */
 
-
 #ifndef COMPRESS_SCUMM_SOU_H
 #define COMPRESS_SCUMM_SOU_H
 
 #include "compress.h"
 
-
 class CompressScummSou : public CompressionTool {
 public:
 	CompressScummSou(const std::string &name = "compress_scumm_sou");
@@ -43,5 +41,3 @@
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_sword1.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_sword1.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -25,7 +25,6 @@
 
 #include "compress.h"
 
-
 class CompressSword1 : public CompressionTool {
 public:
 	CompressSword1(const std::string &name = "compress_sword1");
@@ -49,5 +48,3 @@
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_sword2.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword2.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_sword2.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -25,23 +25,18 @@
 
 #include "compress.h"
 
-
 class CompressSword2 : public CompressionTool {
 public:
 	CompressSword2(const std::string &name = "compress_sword2");
 
 	virtual void execute();
 
-
 protected:
 
 	File _input, _output_snd, _output_idx;
 	std::string _audioOutputFilename;
-
 	
 	uint32 append_to_file(File &f1, const char *filename);
 };
 
 #endif
-
-

Modified: tools/branches/gsoc2009-gui/compress_tinsel.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_tinsel.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_tinsel.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -23,6 +23,8 @@
 #ifndef COMPRESS_TINSEL_H
 #define COMPRESS_TINSEL_H
 
+#include "compress.h"
+
 class CompressTinsel : public CompressionTool {
 public:
 	CompressTinsel(const std::string &name = "compress_tinsel");

Modified: tools/branches/gsoc2009-gui/compress_touche.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_touche.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_touche.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -40,4 +40,3 @@
 };
 
 #endif
-

Modified: tools/branches/gsoc2009-gui/compress_tucker.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_tucker.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/compress_tucker.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -43,4 +43,3 @@
 };
 
 #endif
-

Modified: tools/branches/gsoc2009-gui/example_tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/example_tool.cpp	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/example_tool.cpp	2009-09-25 16:53:18 UTC (rev 44361)
@@ -120,7 +120,7 @@
 	// We always need to setup default output path, since there is no obligation to specify it
 	// If you don't do this, the OS will usually default to the working directory, if we output a file
 	// it will fail most likely
-	if(_outputPath.empty())
+	if (_outputPath.empty())
 		_outputPath = "output/";
 
 	// The File class is very similar to the FILE struct, look in util.h for details
@@ -149,7 +149,7 @@
 		outname << i;
 
 		// Open a file for writing
-		if(_outputFiles) {
+		if (_outputFiles) {
 			File out(_outputPath.getPath() + outname.str() + ".exo", "w");
 
 			// What we actually do, output some text alot
@@ -161,7 +161,7 @@
 			}
 		} else {
 			// Do nothing for awhile
-			for(int i = 0; i < 1000000; ++i) {
+			for (int i = 0; i < 1000000; ++i) {
 				int *n = new int;
 				delete n;
 			}

Modified: tools/branches/gsoc2009-gui/main_cli.cpp
===================================================================
--- tools/branches/gsoc2009-gui/main_cli.cpp	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/main_cli.cpp	2009-09-25 16:53:18 UTC (rev 44361)
@@ -26,5 +26,3 @@
 	ToolsCLI cli;
 	return cli.run(argc, argv);
 }
-
-

Modified: tools/branches/gsoc2009-gui/tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/tool.cpp	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/tool.cpp	2009-09-25 16:53:18 UTC (rev 44361)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #include <stdarg.h>
 #include <iostream>
 #include <sstream>
@@ -100,7 +99,7 @@
 	}
 
 	// Read input files from CLI
-	for(ToolInputs::iterator iter = _inputPaths.begin(); iter != _inputPaths.end(); ++iter) {
+	for (ToolInputs::iterator iter = _inputPaths.begin(); iter != _inputPaths.end(); ++iter) {
 		std::string &in = _arguments[_arguments_parsed++];
 		if (!iter->file) {
 			// Append '/' to input if it's not already done
@@ -116,7 +115,7 @@
 	}
 
 	// We should have parsed all arguments by now
-	if(_arguments_parsed < _arguments.size() - _inputPaths.size()) {
+	if (_arguments_parsed < _arguments.size() - _inputPaths.size()) {
 		std::ostringstream os;
 		os << "Too many inputs files ( ";
 		while (_arguments_parsed < _arguments.size())

Modified: tools/branches/gsoc2009-gui/tools_cli.cpp
===================================================================
--- tools/branches/gsoc2009-gui/tools_cli.cpp	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/tools_cli.cpp	2009-09-25 16:53:18 UTC (rev 44361)
@@ -65,7 +65,7 @@
 	} else if (option == "--help" || option == "-h") {
 		arguments.pop_front();
 
-		if(arguments.size()) {
+		if (arguments.size()) {
 			for (ToolList::iterator iter = _tools.begin(); iter != _tools.end(); ++iter) {
 				Tool *tool = *iter;
 				if (arguments.front() == tool->getName()) {
@@ -149,13 +149,13 @@
 
 			std::cout << "Which tool to use ('q' to abort): ";
 			i = 0;
-			while(true) {
+			while (true) {
 
 				// Read input
 				std::cin >> i;
 
 				// Valid ?
-				if(std::cin && i >= 1 && (size_t)i < choices.size())
+				if (std::cin && i >= 1 && (size_t)i < choices.size())
 					break;
 
 				// Clear any error flags
@@ -205,5 +205,3 @@
 		// There *really* should be a short version of the help text available
 		std::cout << "\t" << (*tool)->getName() << ":\t" << (*tool)->getShortHelp() << "\n";
 }
-
-

Modified: tools/branches/gsoc2009-gui/tools_cli.h
===================================================================
--- tools/branches/gsoc2009-gui/tools_cli.h	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/tools_cli.h	2009-09-25 16:53:18 UTC (rev 44361)
@@ -20,7 +20,6 @@
  *
  */
 
-
 #ifndef CLI_TOOLS_H
 #define CLI_TOOLS_H
 

Modified: tools/branches/gsoc2009-gui/utils/file.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/file.cpp	2009-09-25 16:47:41 UTC (rev 44360)
+++ tools/branches/gsoc2009-gui/utils/file.cpp	2009-09-25 16:53:18 UTC (rev 44361)
@@ -226,7 +226,7 @@
 		case '+': m = FileMode(m | FILEMODE_APPEND); break;
 		default: throw FileException(std::string("Unsupported FileMode ") + mode);
 		}
-	} while(*++mode);
+	} while (*++mode);
 	
 	open(filepath, m);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list