X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fquotearg.c;h=6e7ac8afed7b780ff65c5182fc80060e073113d8;hb=7f284e211999d7ba633c864deafb428abe5ead16;hp=47e4c142544d6798616656d0c1ae5e1e6c4c0fdb;hpb=017cf285c1cd32280266df64449c0003458c122b;p=gnulib.git diff --git a/lib/quotearg.c b/lib/quotearg.c index 47e4c1425..6e7ac8afe 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -44,6 +44,12 @@ # define UCHAR_MAX ((unsigned char) -1) #endif +#if HAVE_C_BACKSLASH_A +# define ALERT_CHAR '\a' +#else +# define ALERT_CHAR '\7' +#endif + #if HAVE_STDLIB_H # include #endif @@ -75,7 +81,7 @@ # define ISASCII(c) isascii (c) #endif /* Undefine to protect against the definition in wctype.h of solaris2.6. */ -#undef ISASCII +#undef ISPRINT #define ISPRINT(c) (ISASCII (c) && isprint (c)) struct quoting_options @@ -266,9 +272,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize, } break; -#if HAVE_C_BACKSLASH_A - case '\a': esc = 'a'; goto c_escape; -#endif + case ALERT_CHAR: esc = 'a'; goto c_escape; case '\b': esc = 'b'; goto c_escape; case '\f': esc = 'f'; goto c_escape; case '\n': esc = 'n'; goto c_and_shell_escape;