From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9a2a420ec841e44c X-Google-Attributes: gidfee84,public From: Charles M Richmond Subject: Re: Dec C pecularity Date: 1999/06/29 Message-ID: <37789EF3.D7A52B7@iisc.com>#1/1 X-Deja-AN: 495137636 Content-Transfer-Encoding: 7bit References: <37614C91.3FBFAB0A@zk3.dec.com> <87hfocxypx.fsf@romulus.bland.fido.de> <7k37t4$bq@web.nmti.com> <87vhcb42lh.fsf@romulus.bland.fido.de> X-Accept-Language: ja Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@shore.net X-Trace: news.shore.net 930651897 198.5.5.5 (Tue, 29 Jun 1999 06:24:57 EDT) Organization: Integrated International Systems Corporation MIME-Version: 1.0 NNTP-Posting-Date: Tue, 29 Jun 1999 06:24:57 EDT Newsgroups: comp.unix.osf.osf1 Tobias Ernst wrote: > > peter@baileynm.com (Peter da Silva) writes: > > > Since \033 (which you do know about) takes the same number of characters > > as \x1b, and has the advantage of actually being C rather than some > > extension, why not use that? > > People tend to use \x1b instead of \033 because a little more advanced > programmers usually know hexadecimal codes by heart, while they have to > calculate the octal ones manually. It is my opinion that "more advanced programmers" do not even notice a difference between \x1b and \033. I am astounded at the thought of a need to "calculate the octal ones manually" > I personally tend to like compilers that > understand \x.. because they give me less trouble when I take over code from > someone else that has been using \x... In my current code I changed all > occurences of hexadecimal codes to octal ones, but it was not the most > pleasant kind of work. > > BTW, Jeff Sullivan has pointed out to me that DEC cc can handle \x... when > using the -std or -std1 option. So now you know that the compiler does exactly what you want and that some basic RTFM would have shown that your "Dec C pecularity" was just K&R mode, the same mode as provided by -traditional in gcc. > > > cl = tgetstr(tbuf, "cl"); > > I know that this method is more clean in theory. It also works very well if > you restrict yourself on using simple things like clear screen and move the > cursor. However, I made the experiences that especially on countless Linux > installations, but also on some commercial boxes like AIX, tgetstr tells you > lot of very advanced commands that it thinks the terminal understands, which > actually the terminal doesn't understand. The result is that text-based > applications that are written "more cleanly" in theory actually do not work > like the users expects. It would be fun to play with some examples. Would you please provide some. On at least one major vendor, I have the ability to file internal bugs and escalations and if there is something broken then lets get it fixed. The Linux and FSF communities feel the same. If things are broken then lets work on fixing them. Charlie -- *********************************************************************** * Charles Richmond Integrated International Systems Corporation * * cmr@iisc.com cmr@acm.org cmr@shore.net * * UNIX Internals, I18N, L10N, X, Realtime Imaging, and Custom S/W * * One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431 * * (617) 723 7695 FAX (617) 723 6861 Remote (617) 504 3379 * ***********************************************************************