James Robertson wrote:
I usually run frame buffer consoles at 1024x768 or larger and hate it when a message comes up formated for a 80x25 console - ugh.

On the other hand, I have trouble following long lines (more than, say, 90 characters) after reading thoughts of Donald Knuth on the optimal line length (he says 66 characters). Anyway, if you can fix the function, you are welcome. Allowed assumptions:


You can even make an assumption that all characters are one cell wide, because the plain linux console assumes the same. However, you cannot assume that one character is one byte.

For counting characters in $STRING, the ${#STRING} construction can be used. It won't work with non-bash in UTF-8 locales correctly, but the only (AFAIK) shell that supports UTF-8 is bash. So it's safe to assume that non-bash just won't be used in UTF-8 locales.

--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to