Use fgets() instead of the not-so-widely available readline().