Text.cxx revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __GNUG__
#pragma implementation
#endif
#include "splib.h"
#include "Text.h"
#include "Entity.h"
// for memcmp()
#include <string.h>
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
{
}
{
}
chars_ += c;
}
{
}
}
{
}
{
}
{
chars_ += c;
}
{
// FIXME speed this up
else
}
}
{
const Char *p;
size_t n;
switch (type) {
break;
{
tem += n;
}
break;
break;
default:
break;
}
}
}
{
}
{
}
void Text::ignoreLastChar()
{
size_t i;
;
// lastIndex >= items_[i].index
i++;
}
}
// All characters other than spaces are substed.
{
size_t j;
break;
}
if (j < lim) {
for (; j < lim; j++)
0);
}
}
}
{
}
{
return 0;
return 1;
}
{
return 0;
break;
default:
return 0;
}
return 1;
}
{
return 0;
lita = 0;
return 1;
lita = 1;
return 1;
default:
break;
}
return 0;
}
{
}
{
}
{
}
{
length = 1;
return &ptr_->c;
}
else {
else
}
}
{
return 0;
length = 1;
}
else {
else
}
ptr_++;
return 1;
}
{
}
}
{
n += normsep;
n += normsep;
break;
default:
break;
}
return n;
}
// This is used to determine for a FIXED CDATA attribute
// whether a specified value if equal to the default value.
{
return 0;
size_t j = 0;
for (;;) {
return 0;
return 0;
break;
j++;
}
return 0;
break;
for (;;) {
return 0;
return 0;
break;
j++;
}
return 0;
break;
default:
break;
}
return 0;
default:
break;
}
return 1;
}
{
// Find the last item whose index <= ind.
// Invariant:
// indexes < i implies index <= ind
// indexes >= lim implies index > ind
// The first item will always have index 0.
size_t i = 1;
while (i < lim) {
else
i = mid + 1;
}
#if 0
break;
#endif
i--;
// If items_.size() == 0, then i == lim.
if (i < lim) {
}
return 1;
}
#ifdef SP_NAMESPACE
}
#endif