mirror of
https://https.git.savannah.gnu.org/git/sed.git
synced 2026-01-27 01:44:34 +00:00
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:
parent
b4d01a9c91
commit
240bb42225
@ -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 */
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user