This file is indexed.

/usr/include/OpenSP/SGMLApplication.h is in libosp-dev 1.5.2-10ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// Copyright (c) 1995 James Clark
// See the file COPYING for copying permission.

#ifndef SGMLApplication_INCLUDED
#define SGMLApplication_INCLUDED 1

#ifdef __GNUG__
#pragma interface
#endif

#include <limits.h>
#include <stddef.h>

#ifndef SP_API
#define SP_API /* as nothing */
#endif

class SP_API SGMLApplication {
public:
#ifdef SP_MULTI_BYTE
#if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
  typedef unsigned int Char;
#else
  typedef unsigned long Char;
#endif
#else
  typedef unsigned char Char;
#endif
  // A Position represents a position in an OpenEntity.
  // The meaning of a Position depends on the
  // particular implementation of OpenEntity.
  // It might be a line number or it might be
  // an offset in the entity.  The only thing
  // that can be done with Position is to use
  // it with an OpenEntityPtr to get a Location.
  typedef unsigned long Position;
  struct CharString {
    const Char *ptr;
    size_t len;
  };
  struct ExternalId {
    bool haveSystemId;
    bool havePublicId;
    bool haveGeneratedSystemId;
    CharString systemId;	// valid only if haveSystemId is true
    CharString publicId;	// valid only if havePublicId is true
    CharString generatedSystemId; // valid if haveGeneratedSystemId is true
  };
  struct Notation {
    CharString name;
    ExternalId externalId;
  };
  struct Attribute;
  struct Entity {
    CharString name;
    enum DataType { sgml, cdata, sdata, ndata, subdoc, pi };
    enum DeclType { general, parameter, doctype, linktype };
    DataType dataType;
    DeclType declType;
    bool isInternal;
    // Following valid if isInternal is true
    CharString text;
    // Following valid if isInternal is false
    ExternalId externalId;
    size_t nAttributes;
    const Attribute *attributes;
    Notation notation;
  };
  struct Attribute {
    CharString name;
    enum Type {
      invalid,
      implied,
      cdata,
      tokenized
      };
    Type type;
    enum Defaulted {
      specified,		// not defaulted
      definition,		// defaulted from definition
      current			// defaulted from current value
      };
    Defaulted defaulted;	// non-ESIS; valid only if type != implied
    struct CdataChunk {
      bool isSdata;
      // This rather awkward representation of non-SGML characters was chosen
      // for backwards compatibility.
      bool isNonSgml;		// valid only if !isSdata
      Char nonSgmlChar;		// valid only if isNonSgml
      CharString data;		// always valid; empty if isNonSgml
      CharString entityName;	// non-ESIS; optional for SDATA chunks
    };
    // Following valid if type == cdata
    size_t nCdataChunks;
    const CdataChunk *cdataChunks; // valid if type == cdata
    // Following valid if type == tokenized
    CharString tokens; // separated by spaces
    bool isId;	       // non-ESIS (probably)
    bool isGroup;      // non-ESIS
    size_t nEntities;
    const Entity *entities;
    // length of notation.name will be 0 if no notation
    Notation notation;
  };
  struct PiEvent {
    Position pos;
    CharString data;
    CharString entityName;	// non-ESIS; optional for PI entities
  };
  struct StartElementEvent {
    Position pos;
    enum ContentType {
      empty,			// declared EMPTY or with CONREF attribute
      cdata,
      rcdata,
      mixed,
      element
      };
    CharString gi;
    ContentType contentType;	// non-ESIS
    bool included;		// non-ESIS
    size_t nAttributes;
    const Attribute *attributes;
  };
      
  struct EndElementEvent {
    Position pos;
    CharString gi;
  };
  struct DataEvent {
    Position pos;
    CharString data;
  };
  struct SdataEvent {
    Position pos;
    CharString text;
    CharString entityName;	// non-ESIS; optional
  };
  struct ExternalDataEntityRefEvent {
    Position pos;
    Entity entity;
  };
  struct SubdocEntityRefEvent {
    Position pos;
    Entity entity;
  };
  struct NonSgmlCharEvent {
    Position pos;
    Char c;
  };
  struct ErrorEvent {
    Position pos;
    enum Type {
      info,			// not an error
      warning,			// not an error
      quantity,
      idref,
      capacity,
      otherError
      };
    Type type;
    CharString message;
  };
  struct AppinfoEvent {
    Position pos;
    bool none;
    CharString string;
  };
  struct StartDtdEvent {
    Position pos;
    CharString name;
    bool haveExternalId;
    ExternalId externalId;
  };
  struct EndDtdEvent {
    Position pos;
    CharString name;
  };
  struct EndPrologEvent {
    Position pos;
  };
  // non-ESIS
  struct GeneralEntityEvent {
    // no position
    Entity entity;
  };
  // non-ESIS
  struct CommentDeclEvent {
    Position pos;
    size_t nComments;
    const CharString *comments;
    const CharString *seps;
  };
  // non-ESIS
  struct MarkedSectionStartEvent {
    Position pos;
    enum Status {
      include,
      rcdata,
      cdata,
      ignore
    };
    Status status;
    struct Param {
      enum Type {
	temp,
	include,
	rcdata,
	cdata,
	ignore,
	entityRef
	};
      Type type;
      CharString entityName;
    };
    size_t nParams;
    const Param *params;
  };
  // non-ESIS
  struct MarkedSectionEndEvent {
    Position pos;
    enum Status {
      include,
      rcdata,
      cdata,
      ignore
    };
    Status status;
  };
  struct IgnoredCharsEvent {
    Position pos;
    CharString data;
  };
  class OpenEntityPtr;
  struct SP_API Location {
    Location();
    Location(const OpenEntityPtr &, Position);
    void init();

    unsigned long lineNumber;
    unsigned long columnNumber;
    unsigned long byteOffset;
    unsigned long entityOffset;
    CharString entityName;
    CharString filename;
    const void *other;
  };
  class OpenEntity;
  class SP_API OpenEntityPtr {
  public:
    OpenEntityPtr();
    OpenEntityPtr(const OpenEntityPtr &);
    void operator=(const OpenEntityPtr &);
    void operator=(OpenEntity *);
    ~OpenEntityPtr();
    const OpenEntity *operator->() const;
    operator int() const;
  private:
    OpenEntity *ptr_;
  };
  class SP_API OpenEntity {
  public:
    OpenEntity();
    virtual ~OpenEntity();
    virtual Location location(Position) const = 0;
  private:
    OpenEntity(const OpenEntity &); // undefined
    void operator=(const OpenEntity &);	// undefined
    unsigned count_;
    friend class OpenEntityPtr;
  };
  virtual ~SGMLApplication();
  virtual void appinfo(const AppinfoEvent &);
  virtual void startDtd(const StartDtdEvent &);
  virtual void endDtd(const EndDtdEvent &);
  virtual void endProlog(const EndPrologEvent &);
  virtual void startElement(const StartElementEvent &);
  virtual void endElement(const EndElementEvent &);
  virtual void data(const DataEvent &);
  virtual void sdata(const SdataEvent &);
  virtual void pi(const PiEvent &);
  virtual void externalDataEntityRef(const ExternalDataEntityRefEvent &);
  virtual void subdocEntityRef(const SubdocEntityRefEvent &);
  virtual void nonSgmlChar(const NonSgmlCharEvent &);
  virtual void commentDecl(const CommentDeclEvent &);
  virtual void markedSectionStart(const MarkedSectionStartEvent &);
  virtual void markedSectionEnd(const MarkedSectionEndEvent &);
  virtual void ignoredChars(const IgnoredCharsEvent &);
  virtual void generalEntity(const GeneralEntityEvent &);
  virtual void error(const ErrorEvent &);
  virtual void openEntityChange(const OpenEntityPtr &);
};

inline
const SGMLApplication::OpenEntity *
SGMLApplication::OpenEntityPtr::operator->() const
{
  return ptr_;
}

inline
void SGMLApplication::OpenEntityPtr::operator=(const OpenEntityPtr &ptr)
{
  *this = ptr.ptr_;
}

inline
SGMLApplication::OpenEntityPtr::operator int() const
{
  return ptr_ != 0;
}

#endif /* not SGMLApplication_INCLUDED */