30typedef struct stream_ops *StreamOps;
31typedef int ReadProc(StreamOps ops,
unsigned char *buf,
int max_count);
32typedef int WriteProc(StreamOps ops,
unsigned char *buf,
int count);
33typedef void CloseProc(StreamOps ops);
34typedef int SeekProc(StreamOps ops,
int offset);
38XML_API InputSource SourceFromStream(
const char8 *description, FILE *file);
39XML_API InputSource EntityOpen(Entity e);
40XML_API InputSource NewInputSource(Entity e, FILE16 *f16);
41XML_API
int SourceTell(InputSource s);
42XML_API
int SourceSeek(InputSource s,
int offset);
43XML_API
int SourceLineAndChar(InputSource s,
int *linenum,
int *charnum);
44XML_API
void SourcePosition(InputSource s, Entity *
entity,
int *char_number);
45XML_API
int get_with_fill(InputSource s);
46XML_API
void determine_character_encoding(InputSource s);
54 int line_alloc, line_length;
58 int complicated_utf8_line;
60 int bytes_before_current_line;
70 unsigned char inbuf[4096];
76#define at_eol(s) ((s)->next == (s)->line_length)
77#define get(s) (at_eol(s) ? get_with_fill(s) : (s)->line[(s)->next++])
78#define unget(s) ((s)->seen_eoe ? (s)->seen_eoe= 0 : (s)->next--)