Mercurial > hg > octave-kai > gnulib-hg
comparison lib/quotearg.c @ 2145:d0a924014953
(quotearg_buffer_restyled): Do not quote
alert, backslash, formfeed, and vertical tab unnecessarily in
shell quoting style.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 17 Jan 2000 08:01:40 +0000 |
parents | 30abc8682bdf |
children | 37b73a4c0ec5 |
comparison
equal
deleted
inserted
replaced
2144:058d24018808 | 2145:d0a924014953 |
---|---|
260 #if HAVE_C_BACKSLASH_A | 260 #if HAVE_C_BACKSLASH_A |
261 case '\a': esc = 'a'; goto c_escape; | 261 case '\a': esc = 'a'; goto c_escape; |
262 #endif | 262 #endif |
263 case '\b': esc = 'b'; goto c_escape; | 263 case '\b': esc = 'b'; goto c_escape; |
264 case '\f': esc = 'f'; goto c_escape; | 264 case '\f': esc = 'f'; goto c_escape; |
265 case '\n': esc = 'n'; goto c_escape; | 265 case '\n': esc = 'n'; goto c_and_shell_escape; |
266 case '\r': esc = 'r'; goto c_escape; | 266 case '\r': esc = 'r'; goto c_and_shell_escape; |
267 case '\t': esc = 't'; goto c_escape; | 267 case '\t': esc = 't'; goto c_and_shell_escape; |
268 case '\v': esc = 'v'; goto c_escape; | 268 case '\v': esc = 'v'; goto c_escape; |
269 case '\\': esc = c; goto c_escape; | 269 case '\\': esc = c; goto c_and_shell_escape; |
270 | 270 |
271 c_and_shell_escape: | |
272 if (quoting_style == shell_quoting_style) | |
273 goto use_shell_always_quoting_style; | |
271 c_escape: | 274 c_escape: |
272 if (backslash_escapes) | 275 if (backslash_escapes) |
273 { | 276 { |
274 c = esc; | 277 c = esc; |
275 goto store_escape; | 278 goto store_escape; |
276 } | 279 } |
277 if (quoting_style == shell_quoting_style) | |
278 goto use_shell_always_quoting_style; | |
279 break; | 280 break; |
280 | 281 |
281 case '#': case '~': | 282 case '#': case '~': |
282 if (i != 0) | 283 if (i != 0) |
283 break; | 284 break; |