1
// Copyright (c) 1994 James Clark
2
// See the file COPYING for copying permission.
8
#include "InputSource.h"
9
#include "MarkupScan.h"
12
namespace SP_NAMESPACE {
15
InputSource::InputSource(InputSourceOrigin *origin, const Char *start,
17
: origin_(origin), start_(start), end_(end), cur_(start), accessError_(0),
18
startLocation_(origin, 0), multicode_(0), scanSuppress_(0)
22
void InputSource::reset(const Char *start,
25
origin_ = origin_->copy();
29
startLocation_ = Location(origin_.pointer(), 0);
32
markupScanTable_.clear();
35
InputSource::~InputSource()
39
void InputSource::advanceStartMulticode(const Char *to)
42
switch (markupScanTable_[*start_]) {
43
case MarkupScan::normal:
49
if (!scanSuppress()) {
51
scanSuppressSingle_ = 0;
54
case MarkupScan::suppress:
55
// what's the effect of MSSCHAR followed by MSSCHAR
56
if (!scanSuppress()) {
58
scanSuppressSingle_ = 1;
59
scanSuppressIndex_ = startLocation_.index() + 1;
68
void InputSource::willNotRewind()
72
void InputSource::setDocCharset(const CharsetInfo &,
77
void InputSource::willNotSetDocCharset()