Subj : printf and color codes
To : Mro
From : Nightfox
Date : Sun Jan 20 2013 09:50 pm
Re: printf and color codes
By: Mro to Nightfox on Sun Jan 20 2013 21:43:04
>> non-printable character subtracts 1 from the field length when the
>> string is printed out. CTRL-A color codes have this effect when used
>> with printf.
Mr> i'm pretty sure that's intentional and certainly seems like it should be.
It's not what I would expect. If you specify a field length for printf(), it
should fill that entire field up to that length. Otherwise, the results can be
unexpected and ugly. The main uses for specifying a field length are to align
text and filling a space when overwriting existing text on the screen. I would
expect printf() to only count visible/printable characters in the length of a
string you give it.
Mr> who's name or other variable would have color codes in it, though?
Anything where color is desired.. :P
Nightfox
---
� Synchronet � Digital Distortion BBS - digitaldistortionbbs.com