Replacing strings of blanks by tabs and blanks to achieve same spacing
I don't think a proper getline() function should return an int, whether it's based on the attempted read (a boolean) or something else.

I believe you're trying to imitate fgets(), which instead returns a char* (the extracted file line) if the read was successful or NULL if it failed.  A proper I/O function should set an error flag upon a failed read attempt, and this is not done by returning an int.  Plus, there will be issues if the caller of your function expects a string or a failbit, which should be the case if the caller expects proper feedback.

Unless fgets() really doesn't satisfy your needs here, I'd recommend using that or another library function that handles this properly.  Recreating an I/O function can cause problems if not written carefully, and even then you shouldn't be doing that.