I want to insert and delete some chars in the middle of a file.
fopen() and fdopen() just allow to append at the end.
Is there any simple method or existing library that allow these actions?
There is no simple method. You have do it manually. For example: