I have a console (C++) program that I wrote that can produce a fairly large number of different error/warning messages, some of which can be quite long. I find it annoying that when lines are too long, they "wrap" to the next line, often (usually!) in the middle of a word or file name. So I set out to fix this by getting the width of the console in characters and wrapping messages to new lines at appropriate blanks in the line. The way I get the width of the console in characters is to use the Windows API function GetConsoleScreenBufferInfo, which fills in a GetConsoleScreenBufferInfo structure with the appropriate information (the console width appears in the dwSize.X member of the structure). This works just fine in plain old Microsoft DOS (which I don't use very often), but when I execute the code in TCC the dwSize.X member of the structure contains (the useless!!!) number "52427"(?????). This program is/will be used by a number of people other than me, all of whom still use Plain Old DOS (despite my urgings for them to upgrade to something better!!!) and the program works just fine for them. I have to say that I find it somewhat ironic that the only person that the program doesn't work well for is me, and I wrote the program. I will also acknowledge that I could work around the problem by just hard-coding a reasonable number into the program, but I really hate doing that because it only works well if the user is using the same font as I am (and I use a very large font because of bad eyesight). I would guess that you can anticipate my question: How do you get the width of the console window (in characters) in TCC?