[Scummvm-cvs-logs] SF.net SVN: scummvm: [29014] scummvm/trunk/tools/skycpt
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Sep 22 11:51:34 CEST 2007
Revision: 29014
http://scummvm.svn.sourceforge.net/scummvm/?rev=29014&view=rev
Author: fingolfin
Date: 2007-09-22 02:51:33 -0700 (Sat, 22 Sep 2007)
Log Message:
-----------
Added legal headers, fixed various warnings
Modified Paths:
--------------
scummvm/trunk/tools/skycpt/AsciiCptCompile.cpp
scummvm/trunk/tools/skycpt/KmpSearch.cpp
scummvm/trunk/tools/skycpt/KmpSearch.h
scummvm/trunk/tools/skycpt/TextFile.cpp
scummvm/trunk/tools/skycpt/TextFile.h
scummvm/trunk/tools/skycpt/cptcompiler.cpp
scummvm/trunk/tools/skycpt/cpthelp.cpp
scummvm/trunk/tools/skycpt/cpthelp.h
scummvm/trunk/tools/skycpt/idFinder.cpp
scummvm/trunk/tools/skycpt/stdafx.h
Modified: scummvm/trunk/tools/skycpt/AsciiCptCompile.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/AsciiCptCompile.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/AsciiCptCompile.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
// AsciiCptCompile.cpp
//
Modified: scummvm/trunk/tools/skycpt/KmpSearch.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/KmpSearch.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/KmpSearch.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
#include "KmpSearch.h"
#include <stdio.h>
Modified: scummvm/trunk/tools/skycpt/KmpSearch.h
===================================================================
--- scummvm/trunk/tools/skycpt/KmpSearch.h 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/KmpSearch.h 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#ifndef __KmpSearch__
#define __KmpSearch__
Modified: scummvm/trunk/tools/skycpt/TextFile.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/TextFile.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/TextFile.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,7 +1,29 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
#include "TextFile.h"
-TextFile::TextFile(char *name) {
+TextFile::TextFile(const char *name) {
FILE *inf = fopen(name, "r");
if (!inf) {
printf("Unable to open file %s\n", name);
Modified: scummvm/trunk/tools/skycpt/TextFile.h
===================================================================
--- scummvm/trunk/tools/skycpt/TextFile.h 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/TextFile.h 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#ifndef __TextFile__
#define __TextFile__
@@ -8,7 +30,7 @@
class TextFile {
public:
- TextFile(char *name);
+ TextFile(const char *name);
~TextFile(void);
char *giveLine(uint32 num);
int32 findLine(KmpSearch *kmp, uint32 fromLine = 0);
Modified: scummvm/trunk/tools/skycpt/cptcompiler.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/cptcompiler.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/cptcompiler.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
#include "cpthelp.h"
#include "textfile.h"
@@ -163,7 +185,7 @@
free(resBuf);
}
-void processBins(FILE *inf, CptObj *destArr, char *typeName, char *objName, uint8 cTypeId) {
+void processBins(FILE *inf, CptObj *destArr, const char *typeName, const char *objName, uint8 cTypeId) {
char line[1024];
dofgets(line, 1024, inf);
assert(lineMatchSection(line, typeName));
@@ -478,9 +500,8 @@
fwrite(&tmp, 2, 1, debOutf);
tmp = 0;
fwrite(&tmp, 2, 1, debOutf);
- printf("reset destination: %d\n", ftell(debOutf));
+ printf("reset destination: %ld\n", ftell(debOutf));
for (int cnt = 0; cnt < 6; cnt++) {
- uint16 diff[8192];
uint16 diffPos = 0;
sprintf(inName, "reset.%03d", gameVers[cnt]);
FILE *resDiff = fopen(inName, "rb");
@@ -504,7 +525,7 @@
printf("diff v0.0%03d: 2 * 2 * %d\n", gameVers[cnt], diffPos);
}
} else {
- printf("Creating CPT file with Dummy reset data @ %d\n", ftell(debOutf));
+ printf("Creating CPT file with Dummy reset data @ %ld\n", ftell(debOutf));
uint16 resetFields16 = 4;
fwrite(&resetFields16, 2, 1, debOutf);
uint32 blah = 8;
@@ -524,8 +545,8 @@
fwrite(cptSize + 1, 1, 4, resOutf);
printf("%d diffs\n", diffNo);
- printf("%d Compacts in total\n", numCpts);
+ printf("%ld Compacts in total\n", numCpts);
printf("max strlen = %d\n", maxStrl);
- printf("raw size = 2 * %d\n", binSize);
+ printf("raw size = 2 * %ld\n", binSize);
printf("max cptlen = %d\n", maxCptl);
}
Modified: scummvm/trunk/tools/skycpt/cpthelp.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/cpthelp.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/cpthelp.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
#include "cpthelp.h"
@@ -5,7 +27,7 @@
assert((cpt->len == 0) && (cpt->data == NULL) && (cpt->dbgName == NULL) && (cpt->type == 0));
}
-uint16 getInfo(char *line, char *type, char *nameDest) {
+uint16 getInfo(const char *line, const char *type, char *nameDest) {
assert(*line == '\t');
line++;
assert(!memcmp(line, type, strlen(type)));
@@ -32,7 +54,7 @@
dest++;
}
-bool lineMatchSection(char *line, char *sec) {
+bool lineMatchSection(const char *line, const char *sec) {
if (memcmp(line, "SECTION::", 9))
return false;
if (memcmp(line + 9, sec, strlen(sec)))
@@ -40,13 +62,13 @@
return true;
}
-bool isEndOfSection(char *line) {
+bool isEndOfSection(const char *line) {
if (strcmp(line, "SECTION::ENDS"))
return false;
return true;
}
-bool isEndOfObject(char *line, char *type, uint16 id) {
+bool isEndOfObject(const char *line, const char *type, uint16 id) {
if (*line != '\t')
return false;
line++;
Modified: scummvm/trunk/tools/skycpt/cpthelp.h
===================================================================
--- scummvm/trunk/tools/skycpt/cpthelp.h 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/cpthelp.h 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,8 +1,30 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
void assertEmpty(CptObj *cpt);
-uint16 getInfo(char *line, char *type, char *nameDest);
+uint16 getInfo(const char *line, const char *type, char *nameDest);
void dofgets(char *dest, int len, FILE *inf);
-bool lineMatchSection(char *line, char *sec);
-bool isEndOfSection(char *line);
-bool isEndOfObject(char *line, char *type, uint16 id);
+bool lineMatchSection(const char *line, const char *sec);
+bool isEndOfSection(const char *line);
+bool isEndOfObject(const char *line, const char *type, uint16 id);
Modified: scummvm/trunk/tools/skycpt/idFinder.cpp
===================================================================
--- scummvm/trunk/tools/skycpt/idFinder.cpp 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/idFinder.cpp 2007-09-22 09:51:33 UTC (rev 29014)
@@ -1,3 +1,25 @@
+/* ScummVM Tools
+ * Copyright (C) 2007 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
#include "stdafx.h"
#include "TextFile.h"
#include "KmpSearch.h"
Modified: scummvm/trunk/tools/skycpt/stdafx.h
===================================================================
--- scummvm/trunk/tools/skycpt/stdafx.h 2007-09-22 07:49:51 UTC (rev 29013)
+++ scummvm/trunk/tools/skycpt/stdafx.h 2007-09-22 09:51:33 UTC (rev 29014)
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
struct CptObj {
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