TIL
- C does not support function overloading
- the \v vertical tab character is kind of the equivalent of starting a new line and then indenting to the end of the previous line
@derickflorian yeah, is the same thing \n does if your terminal is not configured to convert it to \r\n. \v is basically unused nowadays but in its day would move the printer down to the next printable line on the forms you were printing on
@radehi oh, ok. Thank you for the background. The book I’m reading just said that \r\n is on Windows and \n is linux so I didn’t know the history or the behind the scenes on how it works!
It makes sense that a new line would not go to beginning if there isn’t a carriage return though.
@derickflorian There is a stty setting on Linux, onlcr, where the kernel inserts a CR (\r) before each newline (\n, LF) before giving it to the terminal. Programs using cursor addressing usually turn this off.
Teletypes sometimes needed a delay, or maybe a few NUL characters, following the CR character to give the carriage time to return to the left margin before they could process more characters (such as the line feed to advance the paper). There are settings in stty for this as well (crN, ffN, nlN, ofill, ofdel).
Probably at this point we should just repurpose \v for something else.
@radehi I had no idea about any of this. I will definitely take a look at stty out of curiosity when I have a chance. That is extremely interesting especially with the historical context!
@radehi