comparison src/gio/gio.c @ 3087:f333e6df5fa9

ungetc(): trash the stack of ungetc()'d chars if a seek is made
author William Pitcock <nenolod@atheme.org>
date Wed, 29 Apr 2009 21:12:44 -0500
parents e02b6092f70e
children 2bd8895c9fe0
comparison
equal deleted inserted replaced
3086:1090853873d2 3087:f333e6df5fa9
201 handle = (VFSGIOHandle *) file->handle; 201 handle = (VFSGIOHandle *) file->handle;
202 202
203 if (!g_seekable_can_seek(handle->seekable)) 203 if (!g_seekable_can_seek(handle->seekable))
204 return -1; 204 return -1;
205 205
206 if (handle->stream_stack != NULL)
207 {
208 g_slist_free(handle->stream_stack);
209 handle->stream_stack = NULL;
210 }
211
206 switch (whence) 212 switch (whence)
207 { 213 {
208 case SEEK_CUR: 214 case SEEK_CUR:
209 seektype = G_SEEK_CUR; 215 seektype = G_SEEK_CUR;
210 break; 216 break;