So the GNU C Library provides the nonstandard getline function that makes it easy to read ... Function: ssize_t getline (char ** lineptr , size_t * n , FILE * stream ).
www.gnu.org