From 240bb42225b95320ed02e19ccac33ab0bc8e723b Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 23 Jun 2025 21:36:40 -0700 Subject: [PATCH] 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. --- sed/compile.c | 4 ---- sed/execute.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/sed/compile.c b/sed/compile.c index 46b0bed..8a43945 100644 --- a/sed/compile.c +++ b/sed/compile.c @@ -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 */ diff --git a/sed/execute.c b/sed/execute.c index adc7575..63c7cc5 100644 --- a/sed/execute.c +++ b/sed/execute.c @@ -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;