Mango0x45/center

Bug

Closed this issue · 1 comments

I am a beginner in C and want to help a bit with this project after seeing this from hacktoberfest.
I found some bug that I don't know is this bug, but I want to improve it after I get your permission.

  1. ./center will not exit
    image

  2. ./center -w (not valid width) will have unexpected output and do not exit

Valid width:
image

Not valid width:
Empty after pressing enter
image

After force exit by ctrl+c , and I could not find my history after I scroll up
image

This looks like intended behavior to me. When you call center it reads
input from the standard input if no files are provided as command-line
arguments. This is so that you can do preprocessing on the input with
another commands (grep <some regex> file | center for example). In the
case of your screenshots, you just need to send an EOF signifying the end
of input. You can do that with ‹ctrl-d›.