30 typedef struct stream_ops *StreamOps;
31 typedef int ReadProc(StreamOps ops,
unsigned char *buf,
int max_count);
32 typedef int WriteProc(StreamOps ops,
unsigned char *buf,
int count);
33 typedef void CloseProc(StreamOps ops);
34 typedef int SeekProc(StreamOps ops,
int offset);
38 XML_API InputSource SourceFromStream(
const char8 *description, FILE *file);
39 XML_API InputSource EntityOpen(Entity e);
40 XML_API InputSource NewInputSource(Entity e, FILE16 *f16);
41 XML_API
int SourceTell(InputSource s);
42 XML_API
int SourceSeek(InputSource s,
int offset);
43 XML_API
int SourceLineAndChar(InputSource s,
int *linenum,
int *charnum);
44 XML_API
void SourcePosition(InputSource s, Entity *
entity,
int *char_number);
45 XML_API
int get_with_fill(InputSource s);
46 XML_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--)