> As per discussion on IRC with FRIGN, ioctl is no standard, but it is > probably a defacto standard; how else can you determine the terminal > width portably? However, this patch adds a fallback in case you can't > read the terminal width - this is how cols currently does it.
You can trust the value of COLUMNS. I think this is the correct way programs must detect the size of the terminal. Regards,