Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Charles M Richmond <cmr@iisc.com>
Subject: Re: Dec C pecularity
Date: 1999/06/29	[thread overview]
Message-ID: <37789EF3.D7A52B7@iisc.com> (raw)
In-Reply-To: 87vhcb42lh.fsf@romulus.bland.fido.de

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      *
***********************************************************************



  reply	other threads:[~1999-06-29  4:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-09  4:00 Dec C pecularity Bernhard Reiter
1999-06-11  4:00 ` Jeff Sullivan
1999-06-13  4:00   ` Tobias Ernst
1999-06-14  4:00     ` Peter da Silva
1999-06-26  4:00       ` Tobias Ernst
1999-06-29  4:00         ` Charles M Richmond [this message]
1999-07-13  4:00           ` Tobias Ernst
1999-07-13  4:00             ` Kevin Oberman
1999-07-13  4:00             ` Charles M Richmond
1999-07-14  4:00             ` T.E.Dickey
1999-07-15  4:00               ` libcurses and patches for 4.0 jhitchcock
1999-07-16  4:00                 ` T.E.Dickey
1999-08-10  4:00                 ` b_andreasen
1999-07-16  4:00               ` Dec C pecularity Tobias Ernst
1999-07-18  4:00                 ` T.E.Dickey
1999-07-14  4:00         ` T.E.Dickey
1999-06-22  4:00     ` Jeff Sullivan
1999-06-22  4:00       ` Jeff Sullivan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox