It would be useful to check for COLUMNS, many unix utilities respect this to override the default width. Some pseudo shells also set this automatically...<br><br> - Daniel<br><br><div class="gmail_quote">On Fri, May 1, 2009 at 6:15 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On May 1, 2009, at 5:31 PM, Mike Stump wrote:<br>
<br>
> On May 1, 2009, at 5:03 PM, Douglas Gregor wrote:<br>
>> +  if (ioctl(2, TIOCGWINSZ, &ws) == 0)<br>
>> +    Columns = ws.ws_col;<br>
><br>
> Danger...  Someone is gonna discover this isn't as portable as<br>
> people would like...  Though, I guess if the Windows people like it,<br>
> maybe we can ignore the really old systems out there.<br>
<br>
<br>
</div>Yes, I know; it's hidden behind an #ifdef so it shouldn't trip too<br>
many people up. We'll see!<br>
<br>
        - Doug<br>
<div><div></div><div class="h5">_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br>