Errrr,....Ummmm,...., not really.
While testing this I found an intermittant bug that causes a application crash.
Only on files over 500k, but it may be cause Im using garbage data, but it still
needs fixing.
Work in progress with this, then I'll write a function to allow the removal of
X number of bytes from the middle of a file.
BUT, I can say for speed, mines bad cause its in code, but the append is handled
by the operating system. Mine takes about 3500 microseconds on a 10k file, and
append takes LESS than 1 microsecond !!!
So we cant really do ANY comparison between mine and appending.
Anyway, back to the de-bugging
[EDIT] De-bugging complete (till we find something else!?!). I found I was using
a var in my malloc calculations that fell over if one of the file 'halves' was larger than 260k.
The file_str_insert function is all that needs to be replaced, Ive edited my head post
with the corrected code.
Last edited by EvilSOB; 02/14/09 19:16. Reason: Bug Fix