| 2883 | QUOTING_STYLE if set and valid, -1 otherwise. */ |
| 2884 | |
| 2885 | static int |
| 2886 | getenv_quoting_style (void) |
| 2887 | { |
| 2888 | char const *q_style = getenv ("QUOTING_STYLE"); |
| 2889 | if (!q_style) |
| 2890 | return -1; |
| 2891 | int i = ARGMATCH (q_style, quoting_style_args, quoting_style_vals); |
| 2892 | if (i < 0) |
| 2893 | { |
| 2894 | error (0, 0, |
| 2895 | _("ignoring invalid value" |
| 2896 | " of environment variable QUOTING_STYLE: %s"), |
| 2897 | quote (q_style)); |
| 2898 | return -1; |
| 2899 | } |
| 2900 | return quoting_style_vals[i]; |
| 2901 | } |
| 2902 | |
| 2903 | /* Set the exit status to report a failure. If SERIOUS, it is a |
| 2904 | serious failure; otherwise, it is merely a minor problem. */ |