Rename getline to getlinestr to avoid a name collision with the same named function in stdio.h.