X-Git-Url: https://git.stderr.nl/gitweb?p=projects%2Fchimara%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fstream.h;h=33497ceb2d11f36b17cc1afedde5b59cc66fe7e4;hp=7ff7618c61ef44dc78a75ebc1b60033f45c81718;hb=7cbc2c68d146433b1d438d60406ca05e14a523ce;hpb=ea1acbd0ed1f4ee7b7a8cd65412f6213ccf62094 diff --git a/libchimara/stream.h b/libchimara/stream.h index 7ff7618..33497ce 100644 --- a/libchimara/stream.h +++ b/libchimara/stream.h @@ -12,7 +12,8 @@ enum StreamType { STREAM_TYPE_WINDOW, STREAM_TYPE_MEMORY, - STREAM_TYPE_FILE + STREAM_TYPE_FILE, + STREAM_TYPE_RESOURCE }; /** @@ -36,18 +37,20 @@ struct glk_stream_struct enum StreamType type; /* Specific to window stream: the window this stream is connected to */ winid_t window; - /* For memory and file streams */ + /* For memory, file, and resource streams */ gboolean unicode; - /* Specific to memory streams */ - gchar *buffer; + /* For file and resource streams */ + gboolean binary; + /* For memory and resource streams */ + char *buffer; glui32 *ubuffer; glui32 mark; glui32 endmark; glui32 buflen; + /* Specific to memory streams */ gidispatch_rock_t buffer_rock; /* Specific to file streams */ FILE *file_pointer; - gboolean binary; gchar *filename; /* Displayable filename in UTF-8 for error handling */ glui32 lastop; /* 0, filemode_Write, or filemode_Read */