Download raw body.
007 in vis.c
On Mon, Aug 04, 2025 at 08:44:35PM -0700, Philip Guenther wrote:
> On Mon, Aug 4, 2025 at 3:47 PM Theo Buehler <tb@theobuehler.org> wrote:
> >
> > On Mon, Aug 04, 2025 at 03:23:14PM -0600, Todd C. Miller wrote:
> > > On Mon, 04 Aug 2025 06:47:03 -0000, Miod Vallat wrote:
> > >
> > > > > I'm not sure if there's a particular reason to treat the BEL character
> > > > > specially here. The \a escape has been available forever. It's in K&R.
> > > > > I think it's clearer, cleaner, and more consistent to use that.
> > > >
> > > > But then you'll need to address the many other uses of \007 in the tree.
> > > >
> > > > And for the reason why \a is not used, have a look at the comment in
> > > > bin/ksh/c_ksh.c: at some point, pcc did not support \a.
> > >
> > > While I would not object to changing this throughout the tree I
> > > don't think everything needs to be converted in one fell swoop.
> >
> > I can convert them but I don't insist. miod gave me the answer I was
> > looking for: why?
> >
> > The one-step vs two-step musings are less convincing since they don't
> > really explain why \r and \b are much more prevalent than their octal
> > representations.
>
> The \r and \b escape sequences go back to the dawn of C, perhaps even
> into the predawn in B, but \a was added later, around v7?
>
> So while it was in UNIX compilers even before ANSI put its stamp on
> things it's still... you know... "young at heart".
miod was right. \a is not in either v7 compiler (dmr or pcc).
\a came in with ANSI.
"The alert sequence ('\a') has been added by popular demand, to replace,
for instance, the ASCII BEL code explicitly coded as '\007'."
Rationale for American National Standard
for Information Systems - Programming Language - C
https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub160.pdf
p256 of the pdf
007 in vis.c