Error:
do not know the meaning: the meaning is, since we call read() many times, and every time we call read4() it may contains some characters which is useless, so we need to store it.
In order to do so, we set global variables to keep track current index, if we know that current index exceed the size of buffer, then call read4() to read, and when size of read4() == 0, break it.