Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 370769
Collapse All | Expand All

(-)istream.c.~1.27.~ (-5 / +5 lines)
Lines 22-29 Link Here
22
static void basic_close(int *handle);
22
static void basic_close(int *handle);
23
static int basic_read(int *handle, char *buf, int len);
23
static int basic_read(int *handle, char *buf, int len);
24
24
25
static void file_close(struct file_handle *handle);
25
static void file_close(struct afile_handle *handle);
26
static int file_read(struct file_handle *handle, char *buf, int len);
26
static int file_read(struct afile_handle *handle, char *buf, int len);
27
27
28
static int str_read(Str handle, char *buf, int len);
28
static int str_read(Str handle, char *buf, int len);
29
29
Lines 114-120 Link Here
114
    stream = New(union input_stream);
114
    stream = New(union input_stream);
115
    init_base_stream(&stream->base, STREAM_BUF_SIZE);
115
    init_base_stream(&stream->base, STREAM_BUF_SIZE);
116
    stream->file.type = IST_FILE;
116
    stream->file.type = IST_FILE;
117
    stream->file.handle = New(struct file_handle);
117
    stream->file.handle = New(struct afile_handle);
118
    stream->file.handle->f = f;
118
    stream->file.handle->f = f;
119
    if (closep)
119
    if (closep)
120
	stream->file.handle->close = closep;
120
	stream->file.handle->close = closep;
Lines 658-670 Link Here
658
}
658
}
659
659
660
static void
660
static void
661
file_close(struct file_handle *handle)
661
file_close(struct afile_handle *handle)
662
{
662
{
663
    handle->close(handle->f);
663
    handle->close(handle->f);
664
}
664
}
665
665
666
static int
666
static int
667
file_read(struct file_handle *handle, char *buf, int len)
667
file_read(struct afile_handle *handle, char *buf, int len)
668
{
668
{
669
    return fread(buf, 1, len, handle->f);
669
    return fread(buf, 1, len, handle->f);
670
}
670
}
(-)istream.h.~1.12.~ (-2 / +2 lines)
Lines 20-26 Link Here
20
20
21
typedef struct stream_buffer *StreamBuffer;
21
typedef struct stream_buffer *StreamBuffer;
22
22
23
struct file_handle {
23
struct afile_handle {
24
    FILE *f;
24
    FILE *f;
25
    void (*close) ();
25
    void (*close) ();
26
};
26
};
Lines 53-59 Link Here
53
53
54
struct file_stream {
54
struct file_stream {
55
    struct stream_buffer stream;
55
    struct stream_buffer stream;
56
    struct file_handle *handle;
56
    struct afile_handle *handle;
57
    char type;
57
    char type;
58
    char iseos;
58
    char iseos;
59
    int (*read) ();
59
    int (*read) ();

Return to bug 370769