+2006-03-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - another cut at fixing the buildbot
+
+ * generate-derived-sources: Fix if statement that was always following
+ the Windows case. I believe this is the main problem.
+
+ * WebCore.xcodeproj/project.pbxproj: Added CharsetData.h and added CharsetData.cpp
+ to the target.
+ * WebCore.vcproj/WebCore/WebCore.vcproj: Similar changes.
+
+ * platform/CharsetData.h: Added.
+ * platform/CharsetNames.cpp: Moved the actual character set data out into a
+ separate source file instead of include a .cpp file.
+
+ * platform/make-charset-table.pl: Changed to generate a file that can stand alone.
+
2006-03-29 Darin Adler <darin@apple.com>
- an attempt to fix the buildbot
<Filter
Name="DerivedSources"
>
+ <File
+ RelativePath="..\..\DerivedSources\WebCore\CharsetData.cpp"
+ >
+ </File>
<File
RelativePath="..\..\DerivedSources\WebCore\ColorData.c"
>
930CAB9709C49FAA00229C04 /* CodeGeneratorJS.pm in Resources */ = {isa = PBXBuildFile; fileRef = 930CAB9609C49FAA00229C04 /* CodeGeneratorJS.pm */; };
930CAD1509C4F3C300229C04 /* JSCanvasRenderingContext2DBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 930CAD1409C4F3C300229C04 /* JSCanvasRenderingContext2DBase.h */; };
930CAD2609C4F49100229C04 /* JSCanvasRenderingContext2DBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 930CAD2509C4F49100229C04 /* JSCanvasRenderingContext2DBase.cpp */; };
+ 9326DC0B09DAD5BE00AFC847 /* CharsetData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9326DC0A09DAD5BE00AFC847 /* CharsetData.h */; };
+ 9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AC09D14EE6000E61D7 /* CharsetData.cpp */; };
9327A94209968D1A0068A546 /* HTMLOptionsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */; };
93309DD6099E64920056E581 /* AppendNodeCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309D87099E64910056E581 /* AppendNodeCommand.cpp */; };
93309DD7099E64920056E581 /* AppendNodeCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309D88099E64910056E581 /* AppendNodeCommand.h */; };
930CAB9609C49FAA00229C04 /* CodeGeneratorJS.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = CodeGeneratorJS.pm; path = bindings/scripts/CodeGeneratorJS.pm; sourceTree = "<group>"; };
930CAD1409C4F3C300229C04 /* JSCanvasRenderingContext2DBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSCanvasRenderingContext2DBase.h; path = bindings/js/JSCanvasRenderingContext2DBase.h; sourceTree = "<group>"; };
930CAD2509C4F49100229C04 /* JSCanvasRenderingContext2DBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSCanvasRenderingContext2DBase.cpp; path = bindings/js/JSCanvasRenderingContext2DBase.cpp; sourceTree = "<group>"; };
+ 9326DC0A09DAD5BE00AFC847 /* CharsetData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharsetData.h; path = platform/CharsetData.h; sourceTree = "<group>"; };
9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOptionsCollection.cpp; sourceTree = "<group>"; };
93309D87099E64910056E581 /* AppendNodeCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppendNodeCommand.cpp; sourceTree = "<group>"; };
93309D88099E64910056E581 /* AppendNodeCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppendNodeCommand.h; sourceTree = "<group>"; };
93CD4FD90995F9EA007ECC97 /* AtomicStringImpl.h */,
BC075985098861A400407B48 /* Brush.h */,
65F5382009B2B55700F3DC4A /* character-sets.txt */,
+ 9326DC0A09DAD5BE00AFC847 /* CharsetData.h */,
65F5386A09B2C05E00F3DC4A /* CharsetNames.cpp */,
65F537D809B2B20F00F3DC4A /* CharsetNames.h */,
BCC8CFC80986CD2400140BF2 /* Color.cpp */,
A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */,
A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */,
+ 9326DC0B09DAD5BE00AFC847 /* CharsetData.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */,
A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */,
A86629D409DA2B48009633A5 /* JSKeyboardEvent.cpp in Sources */,
+ 9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
# Generate the charset name table
-ENCODINGS_FILE="platform/mac/mac-encodings.txt"
-ENCODINGS_PREFIX="kCFStringEncoding"
-which sw_vers 2>&1 > /dev/null # Check if we're on os x
-if [ $? ]; then
+if which sw_vers 2>&1 > /dev/null; then
+ ENCODINGS_FILE="platform/mac/mac-encodings.txt"
+ ENCODINGS_PREFIX="kCFStringEncoding"
+else
ENCODINGS_FILE="platform/win/win-encodings.txt";
ENCODINGS_PREFIX=""
fi
--- /dev/null
+/*
+ * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "TextEncoding.h"
+
+#if __APPLE__
+#include "ExtraCFEncodings.h"
+#endif
+
+namespace WebCore {
+
+ struct CharsetEntry {
+ const char* name;
+ TextEncodingID encoding;
+ int flags; // actually TextEncodingFlags
+ };
+
+ extern const CharsetEntry CharsetTable[];
+
+}
#include "config.h"
#include "CharsetNames.h"
+#include "CharsetData.h"
#include <kxmlcore/HashMap.h>
#include <unicode/ucnv.h>
#include <unicode/utypes.h>
-#if __APPLE__
-#include "ExtraCFEncodings.h"
-#endif
-
namespace KXMLCore {
template<> struct DefaultHash<WebCore::TextEncodingID> {
namespace WebCore {
-struct CharsetEntry {
- const char* name;
- TextEncodingID encoding;
- int flags; // actually TextEncodingFlags
-};
-
-// The following autogenerated file includes the charset data.
-#include "CharsetData.cpp"
-
// Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
// or anything like that.
const unsigned PHI = 0x9e3779b9U;
nameMap = new HashMap<const char*, const CharsetEntry*, EncodingHash>();
encodingMap = new HashMap<TextEncodingID, const CharsetEntry*>();
- for (int i = 0; table[i].name; ++i) {
- nameMap->add(table[i].name, &table[i]);
- encodingMap->add(table[i].encoding, &table[i]);
+ for (int i = 0; CharsetTable[i].name; ++i) {
+ nameMap->add(CharsetTable[i].name, &CharsetTable[i]);
+ encodingMap->add(CharsetTable[i].encoding, &CharsetTable[i]);
}
}
#!/usr/bin/perl -w
-use strict;
-
+# Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-my $MAC_SUPPORTED_ONLY = 1;
+use strict;
my %aliasesFromCharsetsFile;
my %namesWritten;
error "$name shows up twice in output" if $namesWritten{$name};
$namesWritten{$name} = 1;
- $output .= " { \"$name\", $prefix$encoding, $flags },\n";
+ $output .= " { \"$name\", $prefix$encoding, $flags },\n";
}
sub process_platform_encodings
exit 1 if $error;
-print "static const CharsetEntry table[] = {\n";
-print $output;
-print " { 0, WebCore::InvalidEncoding, NoEncodingFlags }\n};\n";
+print <<EOF
+// File generated by make-charset-table.pl. Do not edit!
+
+#include "config.h"
+#include "CharsetData.h"
+
+namespace WebCore {
+
+ const CharsetEntry CharsetTable[] = {
+$output
+ { 0, WebCore::InvalidEncoding, NoEncodingFlags }
+ };
+
+}
+EOF