source code of getline function