From: David Vallner Date: 2006-04-09T11:21:41+09:00 Subject: Re: Console width? --nextPart1246563.DhUpvq6py7 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline D=C5=88a Sobota 8. Apr=C3=ADl 2006 21:33 Guillaume Marcais nap=C3=ADsal: > I don't know what your application is. In all cases when I needed to > modify the last line of output, I would send a line feed (\r) and > rewrite completely. It seems to always be simpler than doing tricky > calculation on how many character to go back. > There's way more scenarios than doing screen rewrites when you need to know= =20 console width. Text layout comes to mind - wrapping words at the end of a=20 line or writing a multi-column table, As a matter of fact, ignoring console= =20 width sounds like a pretty bad thing to do when outputting any text at all= =20 that might span over the usual lowest-common denominator of 80 columns, and= =20 it's not completely good practice to rely on this value either, even if it'= s=20 unlikely to ever cause problems for most programs. David Vallner --nextPart1246563.DhUpvq6py7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEOG+x+aUhotvmpDgRAteKAJ9x5WXn2cZN9i4ze+1NzC1ojVHrtgCeMYCe 2b+nkMd91pd3xwD+TwpdlrU= =Og2L -----END PGP SIGNATURE----- --nextPart1246563.DhUpvq6py7--