maint: assume that compilers support '\a' as specified by C89

* sed/compile.c (normalize_text): Remove backup code for pre-C89
compilers.
* sed/execute.c (do_list): Likewise.
This commit is contained in:
Collin Funk 2025-06-23 21:36:40 -07:00 committed by Jim Meyering
parent b4d01a9c91
commit 240bb42225
2 changed files with 0 additions and 8 deletions

View File

@ -1329,11 +1329,7 @@ normalize_text (char *buf, idx_t len, enum text_types buftype)
if (*p == '\\' && p+1 < bufend && bracket_state == 0)
switch (*++p)
{
#if defined __STDC__ && __STDC__-0
case 'a': *q++ = '\a'; p++; continue;
#else /* Not STDC; we'll just assume ASCII */
case 'a': *q++ = '\007'; p++; continue;
#endif
/* case 'b': *q++ = '\b'; p++; continue; --- conflicts with \b RE */
case 'f': *q++ = '\f'; p++; continue;
case '\n': /*fall through */

View File

@ -936,11 +936,7 @@ do_list (intmax_t line_len)
} else {
*o++ = '\\';
switch (*p) {
#if defined __STDC__ && __STDC__-0
case '\a': *o++ = 'a'; break;
#else /* Not STDC; we'll just assume ASCII */
case 007: *o++ = 'a'; break;
#endif
case '\b': *o++ = 'b'; break;
case '\f': *o++ = 'f'; break;
case '\n': *o++ = 'n'; break;