dtinfo subdirectory DtMmdb

This commit is contained in:
Ulrich Wilkens
2013-08-28 19:16:37 +02:00
committed by Jon Trulson
parent 0be684281d
commit fbd81ef151
159 changed files with 735 additions and 588 deletions

View File

@@ -38,7 +38,7 @@ class AttributeList : private CC_TPtrSlist<Attribute>
{
public:
AttributeList();
~AttributeList();
virtual ~AttributeList();
void add(Attribute *);

View File

@@ -51,7 +51,7 @@ void BitVector::setAllBitsTo(unsigned int initValue)
{
unsigned int fill = ( initValue == 0 ) ? 0x0 : ~0x0;
for ( int i=0; i<f_words; i++ )
for ( unsigned int i=0; i<f_words; i++ )
f_array[i]=fill;
}
@@ -70,14 +70,14 @@ void BitVector::setTo(BitVector& v)
f_bits = v.f_bits;
f_words = v.f_words;
for ( int i=0; i<f_words; i++ )
for ( unsigned int i=0; i<f_words; i++ )
f_array[i]=v.f_array[i];
}
void BitVector::setBitTo(int i, unsigned int x)
{
int wordIndex = i / WORD_SIZE;
int bitIndex = i % WORD_SIZE;
unsigned int wordIndex = i / WORD_SIZE;
unsigned int bitIndex = i % WORD_SIZE;
if ( x == 1 ) {
if ( wordIndex < f_words - 1 )
@@ -106,20 +106,20 @@ void BitVector::recordPositions(unsigned int PTPos, unsigned int BITPos)
unsigned int BitVector::getBit(int i)
{
int wordIndex = i / WORD_SIZE;
int bitIndex = i % WORD_SIZE;
unsigned int wordIndex = i / WORD_SIZE;
unsigned int bitIndex = i % WORD_SIZE;
if ( wordIndex < f_words - 1 )
return BIT_TEST(f_array[wordIndex], (0x1 << bitIndex)) ? 1 : 0;
return BIT_TEST((int)f_array[wordIndex], (0x1 << bitIndex)) ? 1 : 0;
else
return BIT_TEST(f_array[wordIndex],
return BIT_TEST((int)f_array[wordIndex],
(0x1 << (WORD_SIZE - f_bits % WORD_SIZE + bitIndex))
) ? 1 : 0;
}
BitVector& BitVector::operator &=(BitVector& b)
{
for ( int i=0; i<f_words; i++ )
for ( unsigned int i=0; i<f_words; i++ )
f_array[i] &= b.f_array[i];
return *this;
@@ -127,7 +127,7 @@ BitVector& BitVector::operator &=(BitVector& b)
BitVector& BitVector::operator ^=(BitVector& b)
{
for ( int i=0; i<f_words; i++ )
for ( unsigned int i=0; i<f_words; i++ )
f_array[i] ^= b.f_array[i];
return *this;
@@ -135,7 +135,7 @@ BitVector& BitVector::operator ^=(BitVector& b)
BitVector& BitVector::operator |=(BitVector& b)
{
for ( int i=0; i<f_words; i++ )
for ( unsigned int i=0; i<f_words; i++ )
f_array[i] |= b.f_array[i];
return *this;
@@ -146,7 +146,7 @@ BitVector& BitVector::shiftRightOneBit()
unsigned int msb = 0;
unsigned int lsb = 0;
for ( int i=0; i<f_words; i++ ) {
for ( unsigned int i=0; i<f_words; i++ ) {
lsb = ( BIT_TEST(f_array[i], 0x1) ) ? 0x1 : 0x0;
f_array[i] = f_array[i] >> 1;
f_array[i] |= msb;
@@ -164,8 +164,8 @@ BitVector& BitVector::shiftLeftOneBit()
unsigned int lsb = 0;
for ( int i=f_words-1; i>=0; i++ ) {
msb = ( BIT_TEST(f_array[i], wordWithMSBSet) ) ? wordWithMSBSet : 0x0;
for ( unsigned int i=f_words-1; i>=0; i++ ) {
msb = (BIT_TEST((int)f_array[i], wordWithMSBSet)) ? wordWithMSBSet : 0x0;
f_array[i] = f_array[i] << 1;
f_array[i] |= lsb;
lsb = msb;

View File

@@ -60,10 +60,10 @@ typedef CC_TValSlistIterator<posRecord> positionArrayIteratorT;
///////////////////////////////////////////////////////
class BitVector
{
positionArrayT *f_positionArray;
unsigned int *f_array;
unsigned int f_bits;
unsigned int f_words;
positionArrayT *f_positionArray;
public:
BitVector(int bits, unsigned int initValue);

View File

@@ -39,8 +39,8 @@
#if defined(SC3) || defined(__osf__)
static ostrstream& terminate(ostrstream& ost)
{
char* string = ost.str();
*(string + ost.pcount()) = 0;
char* pstring = ost.str();
*(pstring + ost.pcount()) = '\0';
return ost;
}
@@ -53,7 +53,7 @@ DocParser::DocParser(Resolver &r)
f_output(f_buffer, DATA_BUF_SIZ)
#else
f_streambuf(new stringbuf()),
f_output(f_streambuf)
f_output()
#endif
{
}
@@ -81,6 +81,8 @@ DocParser::parse(istream &input)
unsigned int
DocParser::rawParse(istream &input)
{
string data;
input.unsetf(ios::skipws);
f_ignoring_element = 0 ;
@@ -93,18 +95,15 @@ DocParser::rawParse(istream &input)
Symbol name(gElemSymTab->intern(terminate(f_output).str()));
f_output.rdbuf()->freeze(0);
#else
char *data = (char *)f_streambuf->str().c_str();
data = f_output.str().c_str();
/*
MESSAGE(cerr, "StartTag case:");
debug(cerr, f_streambuf->pcount());
debug(cerr, data);
debug(cerr, f_output.str().size());
debug(cerr, data.c_str());
*/
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
#endif
Symbol name(gElemSymTab->intern(data));
Symbol name(gElemSymTab->intern(data.c_str()));
#endif
process(input, f_output, name, 1, 1);
}
@@ -139,7 +138,7 @@ update_last_seen_child_name(Symbol*& last_seen_child_name, unsigned int& child_r
}
void
DocParser::process(istream &input, ostream &output,
DocParser::process(istream &input, ostringstream &output,
const Symbol &name,
unsigned int sibling_number, unsigned int this_sibling_number)
{
@@ -151,6 +150,11 @@ DocParser::process(istream &input, ostream &output,
unsigned int child = 1 ; // sibling numbers for child elements
#if !defined(SC3) && !defined(__osf__)
string pstring;
#endif
string data;
char c ;
while ((input >> c) && (c == '\n'));
input.putback(c);
@@ -193,11 +197,11 @@ DocParser::process(istream &input, ostream &output,
process(input, output, name, child++, child_relative_sibling_number);
#else
char *data = (char *)f_streambuf->str().c_str();
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
#endif
Symbol name(gElemSymTab->intern(data));
data = f_output.str().c_str();
//#if !defined(SC3) && !defined(__osf__)
// data[f_output.str().size()] = '\0';
//#endif
Symbol name(gElemSymTab->intern(data.c_str()));
update_last_seen_child_name(last_seen_child_name,
child_relative_sibling_number, name);
@@ -211,17 +215,17 @@ DocParser::process(istream &input, ostream &output,
#ifdef DEBUG
{
#if defined(SC3) || defined(__osf__)
char *data = terminate(f_output).str();
data = terminate(f_output).str();
f_output.rdbuf()->freeze(0);
#else
char *data = (char*)f_streambuf->str().c_str();
data = f_output.str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
//#if !defined(SC3) && !defined(__osf__)
// data[f_output.str().size()] = '\0';
//#endif
#endif
#endif
cerr << "EndTag: " << data << endl;
assert(gElemSymTab->intern(data) == name);
cerr << "EndTag: " << data.c_str() << endl;
assert(gElemSymTab->intern(data.c_str()) == name);
}
#endif
@@ -312,20 +316,14 @@ DocParser::process(istream &input, ostream &output,
// and increment the pcount, so we must make sure it gets
// called first
#if defined(SC3) || defined(__osf__)
char *string = terminate(f_output).str();
char *pstring = terminate(f_output).str();
int size = f_output.pcount();
f_resolver.data(string, size);
f_resolver.data(pstring, size);
f_output.rdbuf()->freeze(0);
#else
char *string = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
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);
pstring = f_output.str().c_str();
int size = pstring.size() + 1;
f_resolver.data(pstring.c_str(), size);
#endif
}
}
@@ -340,25 +338,18 @@ DocParser::process(istream &input, ostream &output,
/////////////////////////////
// second child and beyond.
/////////////////////////////
data = f_output.str().c_str();
#if defined(SC3) || defined(__osf__)
char *data = f_output.str();
*(data + f_output.pcount()) = 0;
f_output.rdbuf()->freeze(0);
#else
char *data = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
#endif
#endif
/*
MESSAGE(cerr, "StartTag case2");
debug(cerr, data);
debug(cerr, f_streambuf->pcount ());
debug(cerr, f_output.str().size());
*/
Symbol name(gElemSymTab->intern(data));
Symbol name(gElemSymTab->intern(data.c_str()));
update_last_seen_child_name(last_seen_child_name,
child_relative_sibling_number, name);
@@ -382,21 +373,15 @@ debug(cerr, f_streambuf->pcount ());
// and increment the pcount, so we must make sure it gets
// called first
#if defined(SC3) || defined(__osf__)
char *string = f_output.str();
char *pstring = f_output.str();
int size = f_output.pcount();
*(string + size) = 0;
f_resolver.data(string, size);
*(pstring + size) = 0;
f_resolver.data(pstring, size);
f_output.rdbuf()->freeze(0);
#else
char *string = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
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);
pstring = f_output.str().c_str();
int size = pstring.size() + 1;
f_resolver.data(pstring.c_str(), size);
#endif
}
}
@@ -404,17 +389,13 @@ debug(cerr, f_streambuf->pcount ());
#ifdef DEBUG
{
#if defined(SC3) || defined(__osf__)
char *data = terminate(f_output).str();
data = terminate(f_output).str();
f_output.rdbuf()->freeze(0);
#else
char *data = (char*)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
data = f_output.str().c_str();
#endif
#endif
cerr << "EndTag: " << data << endl;
assert(gElemSymTab->intern(data) == name);
cerr << "EndTag: " << data.c_str() << endl;
assert(gElemSymTab->intern(data.c_str()) == name);
}
#endif
// hit end tag, end processing
@@ -436,10 +417,13 @@ debug(cerr, f_streambuf->pcount ());
void
DocParser::process_attributes(istream &input, ostream &output,
DocParser::process_attributes(istream &input, ostringstream &output,
AttributeList *&attrs,
AttributeList *&olias_attrs)
{
#if !defined(SC3) && !defined(__osf__)
string theData;
#endif
TagType tt ;
Attribute* newAttribute = 0;
@@ -447,8 +431,6 @@ DocParser::process_attributes(istream &input, ostream &output,
AttributeList* orig_attrs = attrs;
AttributeList* orig_olias_attrs = olias_attrs;
char *theData = 0;
mtry {
while ((tt = read_tag(input,output)) != NoTag)
{
@@ -456,10 +438,8 @@ DocParser::process_attributes(istream &input, ostream &output,
{
case StartTag:
{
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
theData = (char *)f_streambuf->str().c_str();
theData[f_streambuf->str().size()] = 0;
theData = f_output.str().c_str();
#endif
if (!attrs)
attrs = new AttributeList ;
@@ -468,13 +448,9 @@ DocParser::process_attributes(istream &input, ostream &output,
process_attribute(input, output,
#if defined(SC3) || defined(__osf__)
gSymTab->intern(terminate(f_output).str()),
#else
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
gSymTab->intern(theData),
#else
gSymTab->intern(f_streambuf->str()),
#endif
#else
gSymTab->intern(theData.c_str()),
#endif
StartTag
);
@@ -488,10 +464,8 @@ DocParser::process_attributes(istream &input, ostream &output,
throw(CASTDPUTEXCEPT docParserUnexpectedTag());
break;
case OliasAttribute:
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
theData = (char *)f_streambuf->str().c_str();
theData[f_streambuf->str().size()] = 0;
theData = f_output.str().c_str();
#endif
// mirrors attribute
if (!olias_attrs)
@@ -501,13 +475,9 @@ DocParser::process_attributes(istream &input, ostream &output,
process_attribute(input, output,
#if defined(SC3) || defined(__osf__)
gSymTab->intern(terminate(f_output).str()),
#else
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
gSymTab->intern(theData),
#else
gSymTab->intern(f_streambuf->str()),
#endif
#else
gSymTab->intern(theData.c_str()),
#endif
OliasAttribute
);
@@ -540,9 +510,11 @@ DocParser::process_attributes(istream &input, ostream &output,
}
Attribute *
DocParser::process_attribute(istream &input, ostream &output,
DocParser::process_attribute(istream &input, ostringstream &output,
const Symbol &name, TagType tt)
{
string data;
//ON_DEBUG(cerr << "process_attribute: " << name << endl);
// If the attribute is OLIAS internal, we use DocParser's
@@ -562,14 +534,11 @@ DocParser::process_attribute(istream &input, ostream &output,
char *data = f_output.str();
*(data + f_output.pcount()) = 0;
f_output.rdbuf()->freeze(0);
#else
char *data = (char *)f_streambuf->str().c_str();
//#ifdef _IBMR2
#if !defined(SC3) && !defined(__osf__)
data[f_streambuf->str().size()] = 0;
#endif
#endif
Attribute *attr = new Attribute(name, strdup(data));
#else
data = f_output.str().c_str();
Attribute *attr = new Attribute(name, strdup(data.c_str()));
#endif
switch (read_tag(input, output))
{
@@ -593,7 +562,7 @@ DocParser::process_attribute(istream &input, ostream &output,
DocParser::TagType
DocParser::read_tag(istream &input, ostream &output)
DocParser::read_tag(istream &input, ostringstream &output)
{
output.seekp(streampos(0));
@@ -643,13 +612,14 @@ DocParser::read_tag(istream &input, ostream &output)
// get (remainder of) tag name
while ((input >> c) && (c != '>'))
output << c ;
output << ends;
return tt ;
}
void
DocParser::read_data(istream &input, ostream &output)
DocParser::read_data(istream &input, ostringstream &output)
{
char c ;
@@ -701,6 +671,8 @@ DocParser::read_data(istream &input, ostream &output)
output << c;
}
output << ends;
// can never run out of input while reading data, tags must be balanced
if (input.eof())
throw(CASTDPUEEXCEPT docParserUnexpectedEof());

View File

@@ -64,29 +64,29 @@ public:
unsigned int rawParse(istream &);
protected:
virtual void read_data(istream &, ostream &);
virtual void read_data(istream &, ostringstream &);
private:
void process(istream &, ostream &, const Symbol &tagname,
void process(istream &, ostringstream &, const Symbol &tagname,
unsigned int sibling_number,
unsigned int relative_sibling_number);
TagType read_tag(istream &, ostream &);
void process_entity(istream &, ostream &);
TagType read_tag(istream &, ostringstream &);
void process_entity(istream &, ostringstream &);
void process_attributes(istream &, ostream &,
void process_attributes(istream &, ostringstream &,
AttributeList *&attrs,
AttributeList *&olias_attrs);
Attribute *process_attribute(istream &, ostream &, const Symbol &name, TagType);
Attribute *process_attribute(istream &, ostringstream &, const Symbol &name, TagType);
private:
unsigned int f_ignoring_element ;
Resolver &f_resolver;
#if defined(SC3) || defined(__osf__)
char* const f_buffer;
ostrstream f_output;
#else
stringbuf *f_streambuf;
ostream f_output;
ostringstream f_output;
#endif
Resolver &f_resolver;
};

View File

@@ -69,17 +69,17 @@ public:
ostream &print(ostream &) const ;
private:
unsigned int f_freeAttrLists;
Symbol f_gi ;
unsigned int f_sibling_number ; // counting all children of a parent
AttributeList *f_attributes;
AttributeList *f_olias_attributes;
unsigned int f_freeAttrLists;
unsigned int f_relative_sibling_number ; // counting all
// consecutive children
// of same types of a
// parent
int f_last_child;
int f_relatively_last_child;
Symbol f_gi ;
AttributeList *f_attributes;
AttributeList *f_olias_attributes;
};
inline

View File

@@ -57,7 +57,7 @@ class Expression
public:
Expression(TermNode *root);
Expression(const Expression&);
~Expression();
virtual ~Expression();
virtual FeatureValue *evaluate() const;
ostream &print(ostream &) const;

View File

@@ -107,7 +107,7 @@ public:
FeatureSet(const FeatureSet &); /* copy */
FeatureSet(const FeatureSet &,
const FeatureSet &); /* merge */
~FeatureSet();
virtual ~FeatureSet();
void add(Feature *);
const Feature *lookup(const Symbol *) const ;

View File

@@ -143,7 +143,7 @@ FeatureSet::print(ostream &o) const
// cast to non-const to get iterator
CC_TPtrSlistIterator<Feature> next(*(CC_TPtrSlist<Feature>*)this);
int i;
unsigned int i;
for (i = 0 ; i < f_print_indent_level; i++)
o << " " ;
@@ -153,7 +153,7 @@ FeatureSet::print(ostream &o) const
while (++next)
{
for (int i = 0 ; i < f_print_indent_level; i++)
for (unsigned int i = 0 ; i < f_print_indent_level; i++)
o << " " ;
o << *next.key() << endl ;
}

View File

@@ -2336,23 +2336,23 @@ FeatureValueDimension::doConvert(Unit unit) const
///////////////////////////////////////////////////
FeatureValueArray::FeatureValueArray(const char* nm, int size) :
f_name(strdup(nm)), FeatureValue(array), pointer_vector<FeatureValue>(size, 0)
FeatureValue(array), pointer_vector<FeatureValue>(size, 0), f_name(strdup(nm))
{
}
FeatureValueArray::FeatureValueArray(const FeatureValueArray& x) :
f_name(strdup(x.f_name)), FeatureValue(array),
pointer_vector<FeatureValue>(x.length(), 0)
FeatureValue(array), pointer_vector<FeatureValue>(x.length(), 0),
f_name(strdup(x.f_name))
{
mtry
{
for ( int i=0; i<length(); i++ )
for ( unsigned int i=0; i<length(); i++ )
(*this)[i] = x[i] -> clone();
return;
}
mcatch_any()
{
for ( int i=0; i<length(); i++ )
for ( unsigned int i=0; i<length(); i++ )
delete (*this)[i];
rethrow;
}
@@ -2361,7 +2361,7 @@ FeatureValueArray::FeatureValueArray(const FeatureValueArray& x) :
FeatureValueArray::~FeatureValueArray()
{
for ( int i=0; i<length(); i++ )
for ( unsigned int i=0; i<length(); i++ )
delete (*this)[i];
delete f_name;
@@ -2374,7 +2374,7 @@ FeatureValueArray::evaluate() const
mtry
{
for ( int i=0; i<length(); i++ ) {
for ( unsigned int i=0; i<length(); i++ ) {
(*result)[i] = (*this)[i] -> evaluate();
}
return result;
@@ -2392,7 +2392,7 @@ FeatureValueArray::print(ostream& out) const
{
out << f_name << "[\n";
for ( int i=0; i<length(); i++ ) {
for ( unsigned int i=0; i<length(); i++ ) {
if ( (*this)[i] == 0 ) {
MESSAGE(cerr, form("%d is a null slot", i));

View File

@@ -644,8 +644,8 @@ public:
private:
FeatureValue *f_value ;
Unit f_unit ;
float f_cachedValue;
Unit f_unit ;
private:
float convert(float y, Unit dimensionOfy, Unit dimensionOfReturn);

View File

@@ -70,7 +70,7 @@ PQPosition::evaluate(const Element &element)
{
switch ( f_optype ) {
case PQEqual:
if ( f_position == element.sibling_number() ||
if ( f_position == (int) element.sibling_number() ||
( f_position==-1 && element.last_child() )
)
return PQTrue;
@@ -85,7 +85,7 @@ PQPosition::evaluate(const Element &element)
else
return PQFalse;
} else
if ( f_position != element.sibling_number() )
if ( f_position != (int) element.sibling_number() )
return PQTrue;
else
return PQFalse;
@@ -104,7 +104,7 @@ PQSibling::evaluate(const Element &element)
{
switch ( f_optype ) {
case PQEqual:
if ( f_sibling == element.relative_sibling_number() ||
if ( f_sibling == (int) element.relative_sibling_number() ||
( f_sibling ==-1 && element.relatively_last_child() )
)
return PQTrue;
@@ -119,7 +119,7 @@ PQSibling::evaluate(const Element &element)
else
return PQFalse;
} else
if ( f_sibling != element.relative_sibling_number() )
if ( f_sibling != (int) element.relative_sibling_number() )
return PQTrue;
else
return PQFalse;

View File

@@ -74,8 +74,8 @@ public:
virtual PQBoolean evaluate(const Element &);
private:
int f_position ;
PQEqOp f_optype;
int f_position ;
};
class PQSibling: public PQExpr
@@ -85,8 +85,8 @@ public:
virtual PQBoolean evaluate(const Element &);
private:
int f_sibling;
PQEqOp f_optype;
int f_sibling;
};
class PQAttributeSelector : public PQExpr

View File

@@ -41,7 +41,7 @@ EncodedPath::~EncodedPath()
}
EncodedPath::EncodedPath(SSPath* p, unsigned int asPattern) :
f_size(p -> entries()), f_SVectors(letterHash), f_patternSize(0),
f_size(p -> entries()), f_patternSize(0), f_SVectors(letterHash),
f_wildCard(gElemSymTab -> wildCardId()),
f_unlimitedWildCard(gElemSymTab -> unlimitedWildCardId()),
f_copyOfS(new BitVector(WORD_SIZE, 0))
@@ -478,7 +478,7 @@ void PathTable::initLastSymIndex()
{
f_lastSymIndexCount = gElemSymTab -> IdsAssigned()+1;
f_lastSymIndex = new CC_TPtrDlist_PathFeature_Ptr_T[f_lastSymIndexCount];
for (int i=0; i<f_lastSymIndexCount; i++)
for (unsigned int i=0; i<f_lastSymIndexCount; i++)
f_lastSymIndex[i] = new CC_TPtrDlist<PathFeature>;

View File

@@ -47,15 +47,15 @@ typedef unsigned int LetterType;
class EncodedPath
{
int f_patternSize;
int f_size;
int f_patternSize;
LetterType* f_array;
hashTable<LetterType, BitVector> f_SVectors;
LetterType f_wildCard;
LetterType f_unlimitedWildCard;
hashTable<LetterType, BitVector> f_SVectors;
BitVector* f_copyOfS; // copy of S vector, used in match()
public:
@@ -98,7 +98,7 @@ class PathFeature : public basePathFeature
public:
PathFeature(SSPath* p,FeatureSet* f,EncodedPath* e=0, unsigned int id=0):
f_encodedPath(e), f_id(id), basePathFeature(p, f) {};
basePathFeature(p, f), f_id(id), f_encodedPath(e) {};
~PathFeature();
EncodedPath* encodedPath() { return f_encodedPath; };
@@ -117,7 +117,7 @@ class PathFeatureList : public CC_TPtrDlist<PathFeature>
public:
PathFeatureList() {};
~PathFeatureList();
virtual ~PathFeatureList();
void appendList(PathFeatureList&);
};

View File

@@ -47,7 +47,7 @@ class Renderer : public Destructable
{
public:
Renderer() {};
~Renderer() {};
virtual ~Renderer() {};
virtual FeatureSet *initialize() = 0; /* return default feature set */

View File

@@ -71,12 +71,12 @@ public:
private:
SSPath f_path ;
ResolverStack f_resolverStack;
PathTable &f_pathTable;
// NOTE: this one could be a pointer so we can change them on the fly
Renderer &f_Renderer;
ResolverStack f_resolverStack;
};
#endif /* _Resolver_h */

View File

@@ -75,7 +75,7 @@ private:
public:
SSPath(char*, unsigned int assignId); // for test purpose
SSPath();
~SSPath();
virtual ~SSPath();
// this call update f_containPathQualifier field
void appendPathTerm(PathTerm*);

View File

@@ -22,7 +22,7 @@
*/
// $TOG: defParser.C /main/5 1997/12/23 11:16:25 bill $
#ifndef lint
static char defParsersccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
static const char defParsersccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#endif
#define defParserBYACC 1
#include <stdio.h>
@@ -230,7 +230,7 @@ defParserparse()
*defParserssp = defParserstate = 0;
defParserloop:
if (defParsern = defParserdefred[defParserstate]) goto defParserreduce;
if ((defParsern = defParserdefred[defParserstate])) goto defParserreduce;
if (defParserchar < 0)
{
if ((defParserchar = defParserlex()) < 0) defParserchar = 0;

View File

@@ -483,7 +483,9 @@ static int defParser_did_buffer_switch_on_eof;
static defParser_state_type defParser_get_previous_state defParser_PROTO(( void ));
static defParser_state_type defParser_try_NUL_trans defParser_PROTO(( defParser_state_type current_state ));
static int defParser_get_next_buffer defParser_PROTO(( void ));
#if 0
static void defParserunput defParser_PROTO(( defParser_CHAR c, defParser_CHAR *buf_ptr ));
#endif
void defParserrestart defParser_PROTO(( FILE *input_file ));
void defParser_switch_to_buffer defParser_PROTO(( defParser_BUFFER_STATE new_buffer ));
void defParser_load_buffer_state defParser_PROTO(( void ));
@@ -1055,6 +1057,7 @@ register defParser_state_type defParser_current_state;
}
#if 0
#ifdef defParser_USE_PROTOS
static void defParserunput( defParser_CHAR c, register defParser_CHAR *defParser_bp )
#else
@@ -1098,6 +1101,7 @@ register defParser_CHAR *defParser_bp;
*/
defParser_DO_BEFORE_ACTION; /* set up defParsertext again */
}
#endif
#ifdef __cplusplus

View File

@@ -22,7 +22,7 @@
*/
// $TOG: style.C /main/6 1998/04/17 11:51:49 mgreess $
#ifndef lint
static char stylesccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
static const char stylesccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
#endif
#define styleBYACC 1
#include <stdio.h>
@@ -70,7 +70,7 @@ const char* toUpperCase(unsigned char* string)
{
static char buffer[512];
int j=0;
for ( int i=0; i<strlen((const char*)string); i++ )
for ( unsigned int i=0; i<strlen((const char*)string); i++ )
{
if (islower(string[i]))
buffer[j] = toupper(string[i]) ;
@@ -488,7 +488,7 @@ styleparse()
*stylessp = stylestate = 0;
styleloop:
if (stylen = styledefred[stylestate]) goto stylereduce;
if ((stylen = styledefred[stylestate])) goto stylereduce;
if (stylechar < 0)
{
if ((stylechar = stylelex()) < 0) stylechar = 0;
@@ -1123,7 +1123,7 @@ case 63:
/* char handling better too? */
if ( gGI_CASE_SENSITIVE == false )
{
for (int i=0; i<strlen((const char*)stylevsp[0].charPtrData); i++)
for (unsigned int i=0; i<strlen((const char*)stylevsp[0].charPtrData); i++)
if ( islower(stylevsp[0].charPtrData[i]) )
stylevsp[0].charPtrData[i] = toupper(stylevsp[0].charPtrData[i]);
}
@@ -1135,21 +1135,33 @@ case 64:
break;
case 65:
{
int l = strlen((char*)stylevsp[-3].charPtrData) + strlen((char*)stylevsp[0].charPtrData) + 2;
int l3 = strlen((char*)stylevsp[-3].charPtrData);
int l0 = strlen((char*)stylevsp[0].charPtrData);
int l = l3 + l0 + 2;
styleval.charPtrData=new unsigned char[l];
strcpy((char*)styleval.charPtrData, (char*)stylevsp[-3].charPtrData);
strcat((char*)styleval.charPtrData, ".");
strcat((char*)styleval.charPtrData, (char*)stylevsp[0].charPtrData);
*((char *) memcpy((char*)styleval.charPtrData,
(char*)stylevsp[-3].charPtrData, l3) + l3) = '\0';
*((char *) memcpy((char*)(styleval.charPtrData + l3),
".", 1) + 1) = '\0';
*((char *) memcpy((char*)(styleval.charPtrData + l3 + 1),
(char*)stylevsp[0].charPtrData, l0) + l0) = '\0';
delete stylevsp[-3].charPtrData;
delete stylevsp[0].charPtrData;
}
break;
case 66:
{
int l = strlen((char*)stylevsp[-1].charPtrData) + 2;
int l1 = strlen((char*)stylevsp[-1].charPtrData);
int l = l1 + 2;
styleval.charPtrData=new unsigned char[l];
strcpy((char*)styleval.charPtrData, (char*)stylevsp[-1].charPtrData);
strcat((char*)styleval.charPtrData, ".");
*((char *) memcpy((char*)styleval.charPtrData,
(char*)stylevsp[-1].charPtrData, l1) + l1) = '\0';
*((char *) memcpy((char*)styleval.charPtrData + l1,
".", 1) + 1) = '\0';
delete stylevsp[-1].charPtrData;
}
break;
@@ -1160,7 +1172,7 @@ case 67:
break;
case 68:
{
int i;
unsigned int i;
for (i=0; i<strlen((const char*)stylevsp[0].charPtrData); i++) {

View File

@@ -586,7 +586,9 @@ static int style_did_buffer_switch_on_eof;
static style_state_type style_get_previous_state style_PROTO(( void ));
static style_state_type style_try_NUL_trans style_PROTO(( style_state_type current_state ));
static int style_get_next_buffer style_PROTO(( void ));
#if 0
static void styleunput style_PROTO(( style_CHAR c, style_CHAR *buf_ptr ));
#endif
void stylerestart style_PROTO(( FILE *input_file ));
void style_switch_to_buffer style_PROTO(( style_BUFFER_STATE new_buffer ));
void style_load_buffer_state style_PROTO(( void ));
@@ -1305,6 +1307,7 @@ register style_state_type style_current_state;
}
#if 0
#ifdef style_USE_PROTOS
static void styleunput( style_CHAR c, register style_CHAR *style_bp )
#else
@@ -1348,6 +1351,7 @@ register style_CHAR *style_bp;
*/
style_DO_BEFORE_ACTION; /* set up styletext again */
}
#endif
#ifdef __cplusplus