From: Philip Guenther Subject: Re: 007 in vis.c To: Theo Buehler Cc: "Todd C. Miller" , Miod Vallat , tech@openbsd.org Date: Mon, 4 Aug 2025 20:44:35 -0700 On Mon, Aug 4, 2025 at 3:47 PM Theo Buehler 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". Philip Guenther