Revert "gets() -> fgets()"

This reverts commit b22d89cf176f24d8534b5acd85a15b001df7aa72.