Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Inserting

Name: Anonymous 2009-09-03 7:48

are there any open/write functions for C , which do not overwrite chars in a file , but insert them ?

or do i have to write a shitty loop that just reads , stores and writes a char ?

also discuss file and string handling libraries because most that i have seen suck .

Name: Anonymous 2009-09-03 11:14

>>15
And even then, the fucking filesystems provide no interface to do so, so you're fucked either way. You can truncate at the end, but that's it.
Very true, it's just theoretically possible.

Allowing arbitrary byte editing wouldn't hurt as much as some people assume (you'd just need 3 extra bytes per file extent and it would hurt performance a bit when used, but it'd be better than rewriting the whole file - but it's correct it's not a very big use case, not worth implementing)
Could you expand on that? I don't see a way that wouldn't hurt performance significantly in the long run (read: when this feature has been used lots of times).

This is false. They use two buffers in total: one for everything before the last insertion, and one for everything after.
I know that this isn't true for kate, see <<16. I may have been wrong on the "many" part though.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List