str->mark += copycount;
}
+ /* Move the EOF marker if we wrote past it */
+ if(str->mark > str->endmark)
+ str->endmark = str->mark;
+
str->write_count += len;
break;
str->mark += copycount;
}
+ /* Move the EOF marker if we wrote past it */
+ if(str->mark > str->endmark)
+ str->endmark = str->mark;
+
str->write_count += len;
break;
glsi32 ch2 = utf8? read_utf8_char_from_file(str) :
read_ucs4be_char_from_file(str);
if(ch2 != 0x0A) {
- if(fseek(str->file_pointer, utf8? -1 : -4, SEEK_CUR) == -1);
+ if(fseek(str->file_pointer, utf8? -1 : -4, SEEK_CUR) == -1)
WARNING_S("Seek failed on stream", g_strerror(errno) );
str->lastop = 0; /* can read or write after a seek */
}
{
case seekmode_Start: str->mark = pos; break;
case seekmode_Current: str->mark += pos; break;
- case seekmode_End: str->mark = str->buflen + pos; break;
+ case seekmode_End: str->mark = str->endmark + pos; break;
default:
g_return_if_reached();
return;