I need some Help with this one peace. This whole code works. But.. I used a .jpg image to test it out and It works. But the only thig is the jpg file gets corrupted while Moving.
This means that if you read a smaller chunk than BUFSIZ, you will still be writing out a BUFSIZ length (and remember your buffer still contains the rest of what was in it from the last read).
Actually - looking at it, you should also swap around the count and element size, so that the return value is meaningful (i.e. between 0 and BUFSIZ, rather than 0 and 1).
Thanks that helped. I had to Delete the min in herefwrite( buffer, 1, min(BUFSIZ, len), out ) ; But it works now and It don't have problems. Now I can make that full program I was making