i find ftell's return value is not the current pointer of the stream buf
The value returned by the ftell() function is the current value of the
file position indicator for a stream. If the stream is binary (that
is opened with 'b' in the mode string), then it represents the number
of characters from the beginning of the file. If the stream was
opened in text mode, it contains unspecified information.
There is no defined connection at all between the file position
indicator and a buffer associated with the stream by the setbuf() or
setvbuf() functions. Why do you think that there should be?
I know it is the file pointer. but where is it? who maintain it?
Use of the term "file pointer" is very confusing here, as most people
would use it for an object of type 'FILE *' returned by fopen and used
by subsequent calls to file handling functions.
Help you what? What is it that you think you need to know about the
file position indicator, returned by ftell()? What are you trying to
do with it?