Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/xerces-c-3.0.0@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
Executable
+189
@@ -0,0 +1,189 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
|
||||
my $filename = $ARGV[0];
|
||||
open(IN,"< $filename") || die("Couldn't open input file: $filename");
|
||||
|
||||
while (<IN>) {
|
||||
if ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)\s*[:]\s*public\s([^\s]+)/) {
|
||||
$classname = $1;
|
||||
$baseclass = $2;
|
||||
last;
|
||||
}
|
||||
elsif ($_=~/^\s*class\s+[A-Z0-9_]+_EXPORT\s+([^\s]+)/) {
|
||||
$classname = $1;
|
||||
$baseclass = "";
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
open(OUT,">out.html") || die("Could not write to out.html");
|
||||
|
||||
print OUT <<"END1";
|
||||
<h3>
|
||||
<font color="#000000">$filename:</font></h3>
|
||||
|
||||
<div id="$classname"><font face="Courier New,Courier"><font size=-1>class
|
||||
$classname
|
||||
END1
|
||||
if ($baseclass ne "") {
|
||||
print OUT <<"END2";
|
||||
: public $baseclass
|
||||
END2
|
||||
}
|
||||
print OUT <<"END3";
|
||||
</font></font>
|
||||
<table>
|
||||
END3
|
||||
|
||||
while (<IN>) {
|
||||
if ($_=~/^\s*public\s*:/) {
|
||||
print OUT <<"END5";
|
||||
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td><font face="Courier New,Courier"><font size=-1>{</font></font></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td><font face="Courier New,Courier"><font size=-1>public:</font></font></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
END5
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
while (<IN>) {
|
||||
if ($_=~/^\s*(virtual)\s+([^\s\(][^\(]*[^\s\(])\s+([^\s\(]+\(.*)/) {
|
||||
$a=$1;
|
||||
$b=$2;
|
||||
$c=$3;
|
||||
while ($c!~/\)/) {
|
||||
$c.=<IN>;
|
||||
}
|
||||
print OUT <<"END";
|
||||
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$a</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$b</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
|
||||
</tr>
|
||||
END
|
||||
} elsif ($_=~/^\s*(static)\s+([^\s\(][^\(]*[^\s\(])\s+([^\s\(]+\(.*)/) {
|
||||
$a=$1;
|
||||
$b=$2;
|
||||
$c=$3;
|
||||
while ($c!~/\)/) {
|
||||
$c.=<IN>;
|
||||
}
|
||||
print OUT <<"END";
|
||||
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$a</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$b</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$c</font></font></td>
|
||||
</tr>
|
||||
END
|
||||
} elsif ($_=~/^\s*(enum)\s+([^\s]+)\s*{/) {
|
||||
print OUT <<"END2";
|
||||
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$1</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$2 {</font></font></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
END2
|
||||
|
||||
while (<IN>) {
|
||||
if ($_=~/([^\s]+)\s*=\s*([^\s,]+),?(\s|$)/) {
|
||||
print OUT <<"END3";
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>$1</font></font></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>= $2,</font></font></td>
|
||||
</tr>
|
||||
END3
|
||||
}
|
||||
if ($_=~/}\s*;/) {
|
||||
print OUT <<"END4";
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td></td>
|
||||
|
||||
<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
END4
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# enum ExceptionCode {
|
||||
# INVALID_EXPRESSION_ERR = 51,
|
||||
# TYPE_ERR = 52,
|
||||
# };
|
||||
}
|
||||
|
||||
print OUT <<"END6";
|
||||
<tr ALIGN=LEFT VALIGN=TOP>
|
||||
<td><font face="Courier New,Courier"><font size=-1>};</font></font></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
END6
|
||||
|
||||
close(OUT);
|
||||
close(IN);
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
|
||||
use vars qw($opt_h $opt_x);
|
||||
use Getopt::Std;
|
||||
|
||||
my %charMapping = ( ':', 'chColon',
|
||||
'\\', 'chBackSlash',
|
||||
'[', 'chOpenSquare',
|
||||
']', 'chCloseSquare',
|
||||
'{', 'chOpenCurly',
|
||||
'}', 'chCloseCurly',
|
||||
'?', 'chQuestion',
|
||||
'(', 'chOpenParen',
|
||||
')', 'chCloseParen',
|
||||
'/', 'chForwardSlash',
|
||||
'*', 'chAsterisk',
|
||||
'+', 'chPlus',
|
||||
'.', 'chPeriod',
|
||||
'-', 'chDash',
|
||||
'|', 'chPipe',
|
||||
'_', 'chUnderscore',
|
||||
',', 'chComma',
|
||||
'&', 'chAmpersand',
|
||||
'0', 'chDigit_0', '1', 'chDigit_1', '2', 'chDigit_2',
|
||||
'3', 'chDigit_3', '4', 'chDigit_4', '5', 'chDigit_5',
|
||||
'6', 'chDigit_6', '7', 'chDigit_7', '8', 'chDigit_8',
|
||||
'9', 'chDigit_9');
|
||||
|
||||
#
|
||||
# usage: display usage message
|
||||
#
|
||||
sub usage() {
|
||||
print<<EOF;
|
||||
usage: $0 [ options ] word
|
||||
|
||||
Takes a word and produces a static XMLCh * definition for it.
|
||||
|
||||
Options:
|
||||
-h Displays this help message
|
||||
-x add the XERCES_CPP_NAMESPACE_QUALIFIER before each item
|
||||
EOF
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#
|
||||
# main:
|
||||
#
|
||||
|
||||
getopts("hx");
|
||||
|
||||
if ($opt_h or @ARGV == 0) {
|
||||
usage();
|
||||
}
|
||||
|
||||
my $word = $ARGV[0];
|
||||
|
||||
print "{ ";
|
||||
|
||||
while ($word=~s/^(.)//) {
|
||||
if (defined($charMapping{$1})) {
|
||||
$ch = $charMapping{$1};
|
||||
} else {
|
||||
$ch = $1;
|
||||
if ($ch=~/[A-Za-z]/) {
|
||||
$ch = "chLatin_$ch";
|
||||
} else {
|
||||
$ch = "UNKNOWN_CHAR_$ch";
|
||||
}
|
||||
}
|
||||
if($opt_x) {
|
||||
print "XERCES_CPP_NAMESPACE_QUALIFIER ";
|
||||
}
|
||||
print "$ch, ";
|
||||
}
|
||||
|
||||
if($opt_x) {
|
||||
print "XERCES_CPP_NAMESPACE_QUALIFIER ";
|
||||
}
|
||||
print "chNull };\n";
|
||||
Executable
+210
@@ -0,0 +1,210 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# $Id: sanityTest.pl 696141 2008-09-17 03:06:33Z dbertoni $
|
||||
#
|
||||
|
||||
|
||||
# Author(s): Mike Strosaker
|
||||
#
|
||||
# Verify that a Xerces-C build is successful.
|
||||
# Command-Line Parameter:
|
||||
# The OS type ("win" or "unix")
|
||||
#
|
||||
# Prerequisites:
|
||||
# Set the path to include the appropriate executables
|
||||
# and the library path to include the libraries
|
||||
|
||||
$os = $ARGV[0];
|
||||
|
||||
# flush output
|
||||
$| = 1;
|
||||
|
||||
if (lc($os) eq "win") {
|
||||
$pathsep = "\\";
|
||||
}
|
||||
else {
|
||||
$pathsep = "/";
|
||||
}
|
||||
|
||||
chdir "samples".$pathsep."data";
|
||||
|
||||
#
|
||||
# Run the samples
|
||||
#
|
||||
|
||||
# Run SAXCount
|
||||
system ("SAXCount");
|
||||
system ("SAXCount -v=never personal.xml");
|
||||
system ("SAXCount personal.xml");
|
||||
system ("SAXCount -n -s personal-schema.xml");
|
||||
|
||||
# Run SAXPrint
|
||||
system ("SAXPrint");
|
||||
system ("SAXPrint -v=never personal.xml");
|
||||
system ("SAXPrint personal.xml");
|
||||
system ("SAXPrint -n -s personal-schema.xml");
|
||||
|
||||
# Run SAX2Count
|
||||
system ("SAX2Count");
|
||||
system ("SAX2Count -v=never personal.xml");
|
||||
system ("SAX2Count personal.xml");
|
||||
system ("SAX2Count -p personal-schema.xml");
|
||||
|
||||
# Run SAX2Print
|
||||
system ("SAX2Print");
|
||||
system ("SAX2Print -v=never personal.xml");
|
||||
system ("SAX2Print personal.xml");
|
||||
system ("SAX2Print -p personal-schema.xml");
|
||||
system ("SAX2Print personal.xsd");
|
||||
system ("SAX2Print -sa personal.xsd");
|
||||
|
||||
# Run MemParse
|
||||
system ("MemParse");
|
||||
system ("MemParse -v=never");
|
||||
|
||||
# Run Redirect
|
||||
system ("Redirect");
|
||||
system ("Redirect personal.xml");
|
||||
|
||||
# Run DOMCount
|
||||
system ("DOMCount");
|
||||
system ("DOMCount -v=never personal.xml");
|
||||
system ("DOMCount personal.xml");
|
||||
system ("DOMCount -n -s personal-schema.xml");
|
||||
|
||||
# Run DOMPrint
|
||||
system ("DOMPrint");
|
||||
system ("DOMPrint -wfpp=on -wddc=off -v=never personal.xml");
|
||||
system ("DOMPrint -wfpp=on -wddc=off personal.xml");
|
||||
system ("DOMPrint -wfpp=on -wddc=on personal.xml");
|
||||
system ("DOMPrint -wfpp=on -wddc=off -n -s personal-schema.xml");
|
||||
system ("DOMPrint -v=never -xpath=//name personal.xml");
|
||||
|
||||
# Run StdInParse
|
||||
system ("StdInParse < personal.xml");
|
||||
system ("StdInParse -v=never < personal.xml");
|
||||
system ("StdInParse -n -s < personal-schema.xml");
|
||||
|
||||
# Run PParse
|
||||
system ("PParse");
|
||||
system ("PParse personal.xml");
|
||||
system ("PParse -n -s personal-schema.xml");
|
||||
|
||||
# Run EnumVal
|
||||
system ("EnumVal");
|
||||
system ("EnumVal personal.xml");
|
||||
|
||||
# Run SEnumVal
|
||||
system ("SEnumVal");
|
||||
system ("SEnumVal personal-schema.xml");
|
||||
|
||||
# Run CreateDOMDocument
|
||||
system ("CreateDOMDocument");
|
||||
|
||||
# Run SAXPrint. This tests long element names.
|
||||
print ("\nTest of a long element name.\n");
|
||||
system ("SAXPrint -v=never long.xml");
|
||||
print ("\n\n");
|
||||
|
||||
#
|
||||
# Run the test cases
|
||||
#
|
||||
|
||||
# Run DOMMemTest
|
||||
print ("DOMMemTest\n");
|
||||
system ("DOMMemTest");
|
||||
|
||||
# Run DOMTest
|
||||
print ("DOMTest\n");
|
||||
system ("DOMTest");
|
||||
|
||||
# Run RangeTest
|
||||
print ("RangeTest\n");
|
||||
system ("RangeTest");
|
||||
|
||||
# Run DOMTraversalTest
|
||||
print ("DOMTraversalTest\n");
|
||||
system ("DOMTraversalTest");
|
||||
|
||||
# Run XSerializerTest
|
||||
system ("XSerializerTest");
|
||||
system ("XSerializerTest -v=never personal.xml");
|
||||
system ("XSerializerTest -v=always personal.xml");
|
||||
system ("XSerializerTest -v=never personal-schema.xml");
|
||||
system ("XSerializerTest -v=always personal-schema.xml");
|
||||
system ("XSerializerTest -v=always -f personal-schema.xml");
|
||||
|
||||
# Run XSValueTest
|
||||
system ("XSValueTest");
|
||||
|
||||
# Run InitTestTerm
|
||||
system ("InitTermTest");
|
||||
print ("1");
|
||||
system ("InitTermTest personal.xml");
|
||||
print ("2");
|
||||
system ("InitTermTest -n -s personal-schema.xml");
|
||||
print ("3");
|
||||
system ("InitTermTest -n -s -f personal-schema.xml");
|
||||
|
||||
# Run ThreadTest
|
||||
system ("ThreadTest");
|
||||
print ("1");
|
||||
system ("ThreadTest -parser=sax -v=never -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("2");
|
||||
system ("ThreadTest -parser=dom -v=never -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("3");
|
||||
system ("ThreadTest -parser=sax2 -v=never -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("4");
|
||||
system ("ThreadTest -parser=sax -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("5");
|
||||
system ("ThreadTest -parser=dom -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("6");
|
||||
system ("ThreadTest -parser=sax2 -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("7");
|
||||
system ("ThreadTest -parser=sax -gc -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("8");
|
||||
system ("ThreadTest -parser=dom -gc -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("9");
|
||||
system ("ThreadTest -parser=sax2 -gc -v=always -quiet -threads 10 -time 20 personal.xml");
|
||||
print ("10");
|
||||
system ("ThreadTest -parser=sax -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
print ("11");
|
||||
system ("ThreadTest -parser=dom -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
print ("12");
|
||||
system ("ThreadTest -parser=sax2 -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
print ("13");
|
||||
system ("ThreadTest -parser=sax -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
print ("14");
|
||||
system ("ThreadTest -parser=dom -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
print ("15");
|
||||
system ("ThreadTest -parser=sax2 -gc -n -s -f -v=always -quiet -threads 10 -time 20 personal-schema.xml");
|
||||
|
||||
# Run MemHandlerTest
|
||||
system ("MemHandlerTest");
|
||||
system ("MemHandlerTest -v=always -n -r=2 personal.xml");
|
||||
system ("MemHandlerTest -v=always -n -r=2 -s -f personal-schema.xml");
|
||||
|
||||
chdir "..".$pathsep."..";
|
||||
|
||||
chdir "tests".$pathsep."src".$pathsep."DOM".$pathsep."TypeInfo";
|
||||
system ("DOMTypeInfoTest");
|
||||
|
||||
chdir "..".$pathsep."..";
|
||||
|
||||
Executable
+1213
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user