file functions

B

Bill Cunningham

fseek() fgetpos() and fsetpos() work this way if I understand and please
anyone correct me if I'm wrong. fseek() reading from origin and reads
addresses and f*pos get and puts the file pointer to a value at any address?
I want to read bytes in a file stream up from JUNK in a .avi file to LIST.
This is filler data and I would like to remove the unset bytes. Why would I
want to do this? As an experiment with these fuctions and to make an .avi
unreadable until the correct amount of padding is restored.

Bill
 
B

Barry Schwarz

fseek() fgetpos() and fsetpos() work this way if I understand and please
anyone correct me if I'm wrong. fseek() reading from origin and reads
addresses and f*pos get and puts the file pointer to a value at any address?
I want to read bytes in a file stream up from JUNK in a .avi file to LIST.
This is filler data and I would like to remove the unset bytes. Why would I
want to do this? As an experiment with these fuctions and to make an .avi
unreadable until the correct amount of padding is restored.

Here's a start:

fseek need not read anything from the stream. If it does, it
won't be addresses.

fseek need not start from the origin (even after you decide
what you think origin means).

None of the functions change the file pointer at all.

Why did you ignore the ftell function which you will need to
complement fseek (the same way fgetpos and fsetpos complement each
other)?

Now go get a reference manual and stop guessing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

stream functions 23
add bytes to file 23
skipping bytes 10
fseek/fsetpos moving stream position incorrectly 4
Preallocating a file 6
fseek 62
File Seeking / Overwriting bytes 23
Need help with this script 4

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top