dtinfo subtree DtMmdb

This commit is contained in:
Ulrich Wilkens
2012-10-14 15:38:27 +02:00
committed by Jon Trulson
parent b92cf08899
commit 8c8363f4a5
184 changed files with 1090 additions and 773 deletions

View File

@@ -38,6 +38,7 @@ Attribute::~Attribute()
delete f_value ;
}
bool
Attribute::operator==(const Attribute &attr) const
{
/*

View File

@@ -39,7 +39,7 @@ public:
~Attribute();
const Symbol &name() const { return f_name; }
operator==(const Attribute &) const ;
bool operator==(const Attribute &) const ;
const char *value() const { return f_value ; }

View File

@@ -25,7 +25,9 @@
#ifndef _BitVector_h
#define _BitVector_h 1
#include <stream.h>
#include <sstream>
#include <ostream>
using namespace std;
#ifndef CDE_NEXT

View File

@@ -46,7 +46,8 @@
#ifndef _debug_h
#define _debug_h 1
#include <iostream.h>
#include <iostream>
using namespace std;
#ifdef DEBUG
#define ON_DEBUG(stmt) stmt

View File

@@ -52,7 +52,7 @@ DocParser::DocParser(Resolver &r)
f_buffer(new char[DATA_BUF_SIZ]),
f_output(f_buffer, DATA_BUF_SIZ)
#else
f_streambuf(new strstreambuf(DATA_BUF_SIZ)),
f_streambuf(new stringbuf()),
f_output(f_streambuf)
#endif
{
@@ -93,7 +93,7 @@ DocParser::rawParse(istream &input)
Symbol name(gElemSymTab->intern(terminate(f_output).str()));
f_output.rdbuf()->freeze(0);
#else
char *data = f_streambuf->str();
char *data = (char *)f_streambuf->str().c_str();
/*
MESSAGE(cerr, "StartTag case:");
@@ -102,9 +102,8 @@ debug(cerr, data);
*/
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
f_streambuf->freeze(0);
Symbol name(gElemSymTab->intern(data));
#endif
process(input, f_output, name, 1, 1);
@@ -161,7 +160,7 @@ DocParser::process(istream &input, ostream &output,
int ignore = 0 ;
try
mtry
{
// process whatever comes right after start tag
TagType tt = read_tag(input, output);
@@ -194,15 +193,14 @@ DocParser::process(istream &input, ostream &output,
process(input, output, name, child++, child_relative_sibling_number);
#else
char *data = f_streambuf->str();
char *data = (char *)f_streambuf->str().c_str();
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
Symbol name(gElemSymTab->intern(data));
update_last_seen_child_name(last_seen_child_name,
child_relative_sibling_number, name);
f_streambuf->freeze(0);
process(input, output, name,
child++, child_relative_sibling_number);
#endif
@@ -216,12 +214,11 @@ DocParser::process(istream &input, ostream &output,
char *data = terminate(f_output).str();
f_output.rdbuf()->freeze(0);
#else
char *data = f_streambuf->str();
char *data = (char*)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
f_streambuf->freeze(0);
#endif
cerr << "EndTag: " << data << endl;
assert(gElemSymTab->intern(data) == name);
@@ -246,7 +243,8 @@ DocParser::process(istream &input, ostream &output,
!defined(_IBMR2) && \
!defined(__uxp__) && \
!defined(USL) && \
!defined(linux)
!defined(linux) && \
!defined(CSRG_BASED)
volatile
#endif
AttributeList *attrs = 0;
@@ -255,12 +253,13 @@ DocParser::process(istream &input, ostream &output,
!defined(_IBMR2) && \
!defined(__uxp__) && \
!defined(USL) && \
!defined(linux)
!defined(linux) && \
!defined(CSRG_BASED)
volatile
#endif
AttributeList *olias_attrs = 0;
try
mtry
{
process_attributes(input, output, attrs, olias_attrs);
@@ -278,7 +277,7 @@ DocParser::process(istream &input, ostream &output,
f_ignoring_element = ignore ;
}
}
catch_any()
mcatch_any()
{
/*
delete attrs ;
@@ -318,16 +317,15 @@ DocParser::process(istream &input, ostream &output,
f_resolver.data(string, size);
f_output.rdbuf()->freeze(0);
#else
char *string = f_streambuf->str();
char *string = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
string[f_streambuf->pcount()] = 0;
int size = f_streambuf->pcount() ;
string[f_streambuf->str().size()] = 0;
int size = f_streambuf->str().size() ;
#else
int size = f_streambuf->pcount() - 1 ;
#endif
f_resolver.data(string, size);
f_streambuf->freeze(0); // unfreeze buffer frozen by str() call
#endif
}
}
@@ -347,12 +345,11 @@ DocParser::process(istream &input, ostream &output,
*(data + f_output.pcount()) = 0;
f_output.rdbuf()->freeze(0);
#else
char *data = f_streambuf->str();
char *data = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount ()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
f_streambuf->freeze(0);
#endif
/*
@@ -391,16 +388,15 @@ debug(cerr, f_streambuf->pcount ());
f_resolver.data(string, size);
f_output.rdbuf()->freeze(0);
#else
char *string = f_streambuf->str();
char *string = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
string[f_streambuf->pcount()] = 0;
int size = f_streambuf->pcount() ;
string[f_streambuf->str().size()] = 0;
int size = f_streambuf->str().size() ;
#else
int size = f_streambuf->pcount() - 1 ;
#endif
f_resolver.data(string, size);
f_streambuf->freeze(0); // unfreeze buffer frozen by str() call
#endif
}
}
@@ -411,12 +407,11 @@ debug(cerr, f_streambuf->pcount ());
char *data = terminate(f_output).str();
f_output.rdbuf()->freeze(0);
#else
char *data = f_streambuf->str();
char *data = (char*)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount ()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
f_streambuf->freeze(0);
#endif
cerr << "EndTag: " << data << endl;
assert(gElemSymTab->intern(data) == name);
@@ -430,7 +425,7 @@ debug(cerr, f_streambuf->pcount ());
if (ignore)
f_ignoring_element = 0;
}
catch_any()
mcatch_any()
{
rethrow;
}
@@ -454,7 +449,7 @@ DocParser::process_attributes(istream &input, ostream &output,
char *theData = 0;
try {
mtry {
while ((tt = read_tag(input,output)) != NoTag)
{
switch (tt)
@@ -463,8 +458,8 @@ DocParser::process_attributes(istream &input, ostream &output,
{
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
theData = f_streambuf->str ();
theData[f_streambuf->pcount()] = 0;
theData = (char *)f_streambuf->str().c_str();
theData[f_streambuf->str().size()] = 0;
#endif
if (!attrs)
attrs = new AttributeList ;
@@ -495,8 +490,8 @@ DocParser::process_attributes(istream &input, ostream &output,
case OliasAttribute:
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
theData = f_streambuf->str ();
theData[f_streambuf->pcount()] = 0;
theData = (char *)f_streambuf->str().c_str();
theData[f_streambuf->str().size()] = 0;
#endif
// mirrors attribute
if (!olias_attrs)
@@ -525,7 +520,7 @@ DocParser::process_attributes(istream &input, ostream &output,
}
}
}
catch_any()
mcatch_any()
{
delete newAttribute;
@@ -568,12 +563,11 @@ DocParser::process_attribute(istream &input, ostream &output,
*(data + f_output.pcount()) = 0;
f_output.rdbuf()->freeze(0);
#else
char *data = f_streambuf->str();
char *data = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->pcount ()] = 0;
data[f_streambuf->str().size()] = 0;
#endif
f_streambuf->freeze(0);
#endif
Attribute *attr = new Attribute(name, strdup(data));

View File

@@ -24,8 +24,9 @@
/* Copyright (c) 1995 FUJITSU LIMITED */
/* All Rights Reserved */
#include <iostream.h>
#include <strstream.h>
#include <iostream>
#include <sstream>
using namespace std;
#include "SymTab.h"
#include "Exceptions.hh"
@@ -84,7 +85,7 @@ private:
char* const f_buffer;
ostrstream f_output;
#else
strstreambuf *f_streambuf ;
stringbuf *f_streambuf;
ostream f_output;
#endif
Resolver &f_resolver;

View File

@@ -21,7 +21,8 @@
* Floor, Boston, MA 02110-1301 USA
*/
// $TOG: Element.C /main/5 1998/04/17 11:48:25 mgreess $
#include <iostream.h>
#include <iostream>
using namespace std;
#include <stdlib.h>
#include "StyleSheetExceptions.h"
#include "Element.h"

View File

@@ -30,7 +30,7 @@
#include "VariableTable.h"
#include "Renderer.h"
#include "Debug.h"
#include <stream.h>
#include <sstream>
#include "HardCopy/autoNumberFP.h"
@@ -141,20 +141,20 @@ BinaryOperatorNode::evaluate() const
{
// calculate children trees and then have feature value do the operation
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux)
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
volatile
#endif
FeatureValue *left = 0;
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux)
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
volatile
#endif
FeatureValue *right = 0;
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux)
#if !defined(SC3) && !defined(_IBMR2) && !defined(__uxp__) && !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
volatile
#endif
FeatureValue *result = 0;
try
mtry
{
left = f_left->evaluate();
right = f_right->evaluate();
@@ -176,7 +176,7 @@ BinaryOperatorNode::evaluate() const
}
}
catch_any()
mcatch_any()
{
delete left ;
delete right ;
@@ -219,11 +219,11 @@ VariableNode::evaluate() const
// etc.
FeatureValue *return_variable = 0;
try
mtry
{
return_variable = variable_value->evaluate() ;
}
catch_any()
mcatch_any()
{
delete return_variable;
delete variable_value ;

View File

@@ -24,7 +24,7 @@
#ifndef _Feature_h
#define _Feature_h
#include <stream.h>
#include <sstream>
#ifndef CDE_NEXT

View File

@@ -28,7 +28,8 @@
#include "StyleSheet/StyleSheetExceptions.h"
#include "utility/const.h"
#include "utility/funcs.h"
#include <iostream.h>
#include <iostream>
using namespace std;
featureDefDictionary* g_FeatureDefDictionary = 0;
@@ -314,34 +315,34 @@ MESSAGE(cerr, "");
}
FeatureValue * fv = 0;
try {
mtry {
fv = f -> evaluate();
}
catch (undefinedAttributeException&, e) {
mcatch (undefinedAttributeException&, e) {
return true;
}
catch (undefinedVariableException&, e) {
mcatch (undefinedVariableException&, e) {
report_error_location();
cerr << "Undefined variable error.\n";
return false;
}
/*
catch (badCastException&, e) {
mcatch (badCastException&, e) {
report_error_location();
cerr << "Evaluating expression error.\n";
return false;
}
catch (badEvaluationException&, e) {
mcatch (badEvaluationException&, e) {
report_error_location();
cerr << "Evaluating expression error.\n";
return false;
}
*/
catch_any() {
mcatch_any() {
//report_error_location();
//cerr << "There might be an error in the expression.\n";
return true;

View File

@@ -75,16 +75,16 @@ FeatureSet::evaluate(FeatureSet *result_set) const
while(++next)
{
FeatureValue *value ;
try
mtry
{
value = next.key()->evaluate();
result_set->append(new Feature(next.key()->name(),
value));
}
#ifdef UXPDS
catch_any()
mcatch_any()
#else
catch_noarg(badEvaluationException)
mcatch_noarg(badEvaluationException)
#endif
{
/* do nothing...we just ignore any that will not evaluate */
@@ -143,7 +143,8 @@ FeatureSet::print(ostream &o) const
// cast to non-const to get iterator
CC_TPtrSlistIterator<Feature> next(*(CC_TPtrSlist<Feature>*)this);
for (int i = 0 ; i < f_print_indent_level; i++)
int i;
for (i = 0 ; i < f_print_indent_level; i++)
o << " " ;
o << "{" << endl;

View File

@@ -522,7 +522,8 @@ FeatureValueString::operator+(const FeatureValue& x) const
char* newString = new char[len1 + len2 + 1];
for ( int i=0; i<len1; i++ )
int i;
for ( i=0; i<len1; i++ )
newString[i] = str1[i];
for ( i=0; i<len2; i++ )
@@ -560,14 +561,14 @@ FeatureValueString::operator+(const FeatureValueExpression& expr) const
{
FeatureValue *x = 0;
FeatureValue *y = 0;
try
mtry
{
x = expr.evaluate();
y = operator+(*x);
delete x;
return y;
}
catch_any()
mcatch_any()
{
delete x;
rethrow;
@@ -2343,13 +2344,13 @@ FeatureValueArray::FeatureValueArray(const FeatureValueArray& x) :
f_name(strdup(x.f_name)), FeatureValue(array),
pointer_vector<FeatureValue>(x.length(), 0)
{
try
mtry
{
for ( int i=0; i<length(); i++ )
(*this)[i] = x[i] -> clone();
return;
}
catch_any()
mcatch_any()
{
for ( int i=0; i<length(); i++ )
delete (*this)[i];
@@ -2371,14 +2372,14 @@ FeatureValueArray::evaluate() const
{
FeatureValueArray *result = new FeatureValueArray(f_name, length());
try
mtry
{
for ( int i=0; i<length(); i++ ) {
(*result)[i] = (*this)[i] -> evaluate();
}
return result;
}
catch_any()
mcatch_any()
{
delete result;
rethrow;

View File

@@ -21,7 +21,8 @@
* Floor, Boston, MA 02110-1301 USA
*/
// $XConsortium: PQTest.cc /main/3 1996/06/11 17:07:26 cde-hal $
#include <iostream.h>
#include <iostream>
using namespace std;
#include "SymTab.h"
#include "PathQualifier.h"
#include "Element.h"

View File

@@ -32,7 +32,7 @@
#include "dti_cc/cc_hdict.h"
#endif
#include <stream.h>
#include <sstream>
#include "Types.h"
#include "SymTab.h"
#include "SSPath.h"

View File

@@ -64,7 +64,7 @@ unsigned int PathTerm::operator ==(const PathTerm&)
ostream& operator <<(ostream& out, PathTerm& pt)
{
out << pt.symbol() << " (" << int(pt.f_PQExpr) << ") ";
out << pt.symbol() << " (" << size_t(pt.f_PQExpr) << ") ";
return out;
}

View File

@@ -27,21 +27,6 @@
#include "Exceptions.hh"
#include "SymTab.h"
#if defined(linux)
#define CASTEXCEPT (Exception*)
#define CASTBCEXCEPT (badCastException*)
#define CASTBEEXCEPT (badEvaluationException*)
#define CASTDPEXCEPT (docParserException*)
#define CASTDPUCEXCEPT (docParserUnexpectedCharacter*)
#define CASTDPUTEXCEPT (docParserUnexpectedTag*)
#define CASTDPUDEXCEPT (docParserUnexpectedData*)
#define CASTDPUEEXCEPT (docParserUnexpectedEof*)
#define CASTSSEXCEPT (StyleSheetException*)
#define CASTSSSEEXCEPT (StyleSheetSyntaxError*)
#define CASTUAEXCEPT (undefinedAttributeException*)
#define CASTUTEXCEPT (unknownTagException*)
#define CASTUVEXCEPT (undefinedVariableException*)
#else
#define CASTEXCEPT
#define CASTBCEXCEPT
#define CASTBEEXCEPT
@@ -55,7 +40,6 @@
#define CASTUAEXCEPT
#define CASTUTEXCEPT
#define CASTUVEXCEPT
#endif
class StyleSheetException : public Exception
{

View File

@@ -31,7 +31,8 @@
#include "dti_cc/CC_String.h"
#include "dti_cc/cc_hdict.h"
//#include "StyleSheet/cde_next.h"
#include <iostream.h>
#include <iostream>
using namespace std;
#endif
#include "Types.h"

View File

@@ -27,8 +27,9 @@ static char defParsersccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#define defParserBYACC 1
#include <stdio.h>
#include <ctype.h>
#include <stream.h>
#include <iostream.h>
#include <sstream>
#include <iostream>
using namespace std;
#include "Debug.h"
#include "FeatureDefDictionary.h"
@@ -269,14 +270,16 @@ defParserloop:
goto defParserreduce;
}
if (defParsererrflag) goto defParserinrecovery;
#if 0 // Disable for now
// Disable for now
#if 0
#ifdef lint
goto defParsernewerror;
#endif
defParsernewerror:
#endif /* 0 */
defParsererror("syntax error");
#if 0 // Disable for now
defParsererror((char*)"syntax error");
// Disable for now
#if 0
#ifdef lint
goto defParsererrlab;
#endif
@@ -516,7 +519,7 @@ to state %d\n", *defParserssp, defParserstate);
*++defParservsp = defParserval;
goto defParserloop;
defParseroverflow:
defParsererror("yacc stack overflow");
defParsererror((char*)"yacc stack overflow");
defParserabort:
return (1);
defParseraccept:

View File

@@ -3,7 +3,7 @@
%{
#include <stdio.h>
#include <ctype.h>
#include <stream.h>
#include <sstream>
#include <iostream.h>
#include "Debug.h"
#include "FeatureDefDictionary.h"

View File

@@ -43,7 +43,7 @@
#include <stdlib.h>
#if !defined(__osf__) && !defined(USL)
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h>
#endif
@@ -196,7 +196,8 @@ typedef struct defParser_buffer_state *defParser_BUFFER_STATE;
#include "FeatureDefDictionary.h"
#include "defParser.tab.h"
#include "Debug.h"
#include <iostream.h>
#include <iostream>
using namespace std;
extern istream *g_defParserin;

View File

@@ -13,7 +13,8 @@
#include "FeatureDefDictionary.h"
#include "defParser.tab.h"
#include "Debug.h"
#include <iostream.h>
#include <iostream>
using namespace std;
extern istream *g_yyin;

View File

@@ -30,7 +30,8 @@
#include "StyleSheet.h"
#include "StyleSheetExceptions.h"
#include "VariableTable.h"
#include <iostream.h>
#include <iostream>
using namespace std;
Renderer *gRenderer = 0;
class TestRenderer : public Renderer

View File

@@ -27,8 +27,9 @@ static char stylesccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#define styleBYACC 1
#include <stdio.h>
#include <ctype.h>
#include <stream.h>
#include <iostream.h>
#include <sstream>
#include <iostream>
using namespace std;
#include <assert.h>
#include "StyleSheetExceptions.h"
#include "VariableTable.h"
@@ -533,7 +534,7 @@ styleloop:
#endif
stylenewerror:
#endif /* if 0 */
styleerror("syntax error");
styleerror((char*)"syntax error");
#if 0 /* remove if needed */
#ifdef lint
goto styleerrlab;
@@ -1353,7 +1354,7 @@ to state %d\n", *stylessp, stylestate);
*++stylevsp = styleval;
goto styleloop;
styleoverflow:
styleerror("yacc stack overflow");
styleerror((char*)"yacc stack overflow");
styleabort:
return (1);
styleaccept:

View File

@@ -3,7 +3,7 @@
%{
#include <stdio.h>
#include <ctype.h>
#include <stream.h>
#include <sstream>
#include <iostream.h>
#include <assert.h>
#include "StyleSheetExceptions.h"

View File

@@ -43,7 +43,7 @@
#include <stdlib.h>
#if !defined(__osf__) && !defined(USL)
#if !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
#include <osfcn.h>
#endif
@@ -228,7 +228,8 @@ typedef struct style_buffer_state *style_BUFFER_STATE;
#include "StyleSheetExceptions.h"
#include "style.tab.h"
#include "Debug.h"
#include <iostream.h>
#include <iostream>
using namespace std;
istream *g_stylein = 0;