65779ade5dbaa5aa8a2e919c38e781204cf72736
[gnulib.git] / tests / test-quotearg.c
1 /* Test of quotearg family of functions.
2    Copyright (C) 2008-2009 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3, or (at your option)
7    any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software Foundation,
16    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
17
18 /* Written by Eric Blake <ebb9@byu.net>, 2008.  */
19
20 #include <config.h>
21
22 #include "quotearg.h"
23
24 #include <ctype.h>
25 #include <locale.h>
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <string.h>
31
32 #include "progname.h"
33 #include "gettext.h"
34
35 #define ASSERT(expr) \
36   do                                                                         \
37     {                                                                        \
38       if (!(expr))                                                           \
39         {                                                                    \
40           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
41           fflush (stderr);                                                   \
42           abort ();                                                          \
43         }                                                                    \
44     }                                                                        \
45   while (0)
46
47 struct result_strings {
48   char const *str1; /* Translation of "".  */
49   char const *str2; /* Translation of "\0""1\0".  */
50   size_t len2; /* Length of str2.  */
51   char const *str3; /* Translation of "simple".  */
52   char const *str4; /* Translation of " \t\n'\"\033?""?/\\".  */
53   char const *str5; /* Translation of "a:b".  */
54   char const *str6; /* Translation of "a\\b".  */
55   char const *str7; /* Translation of LQ RQ.  */
56 };
57
58 struct result_groups {
59   struct result_strings group1; /* Via quotearg_buffer.  */
60   struct result_strings group2; /* Via quotearg{,_mem}.  */
61   struct result_strings group3; /* Via quotearg_colon{,_mem}.  */
62 };
63
64 /* These quotes are borrowed from a pt_PT.utf8 translation.  */
65 # define LQ "\302\253"
66 # define RQ "\302\273"
67 # define LQ_ENC "\\302\\253"
68 # define RQ_ENC "\\302\\273"
69 # define RQ_ESC "\\\302\273"
70
71 static struct result_strings inputs = {
72   "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
73   LQ RQ
74 };
75
76 static struct result_groups results_g[] = {
77   /* literal_quoting_style */
78   { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
79       LQ RQ },
80     { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
81       LQ RQ },
82     { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
83       LQ RQ } },
84
85   /* shell_quoting_style */
86   { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
87       "'a\\b'", LQ RQ },
88     { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
89       "'a\\b'", LQ RQ },
90     { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
91       "'a\\b'", LQ RQ } },
92
93   /* shell_always_quoting_style */
94   { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
95       "'a\\b'", "'" LQ RQ "'" },
96     { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
97       "'a\\b'", "'" LQ RQ "'" },
98     { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
99       "'a\\b'", "'" LQ RQ "'" } },
100
101   /* c_quoting_style */
102   { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
103       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
104       "\"" LQ_ENC RQ_ENC "\"" },
105     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
106       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
107       "\"" LQ_ENC RQ_ENC "\"" },
108     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
109       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
110       "\"" LQ_ENC RQ_ENC "\"" } },
111
112   /* c_maybe_quoting_style */
113   { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
114       "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
115     { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
116       "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
117     { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
118       "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"" } },
119
120   /* escape_quoting_style */
121   { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
122       "a\\\\b", LQ_ENC RQ_ENC },
123     { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
124       "a\\\\b", LQ_ENC RQ_ENC },
125     { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
126       "a\\\\b", LQ_ENC RQ_ENC } },
127
128   /* locale_quoting_style */
129   { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
130       "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" },
131     { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
132       "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" },
133     { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
134       "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'" } },
135
136   /* clocale_quoting_style */
137   { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
138       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
139       "\"" LQ_ENC RQ_ENC "\"" },
140     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
141       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
142       "\"" LQ_ENC RQ_ENC "\"" },
143     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
144       "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
145       "\"" LQ_ENC RQ_ENC "\"" } }
146 };
147
148 static struct result_groups flag_results[] = {
149   /* literal_quoting_style and QA_ELIDE_NULL_BYTES */
150   { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ },
151     { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ },
152     { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ } },
153
154   /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
155   { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
156       "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
157     { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
158       "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"" },
159     { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
160       "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"" } },
161
162   /* c_quoting_style and QA_SPLIT_TRIGRAPHS */
163   { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
164       "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
165       "\"" LQ_ENC RQ_ENC "\"" },
166     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
167       "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
168       "\"" LQ_ENC RQ_ENC "\"" },
169     { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
170       "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
171       "\"" LQ_ENC RQ_ENC "\"" } }
172 };
173
174 #if ENABLE_NLS
175
176 static struct result_groups locale_results[] = {
177   /* locale_quoting_style */
178   { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
179       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
180       LQ LQ RQ_ESC RQ },
181     { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
182       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
183       LQ LQ RQ_ESC RQ },
184     { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
185       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
186       LQ LQ RQ_ESC RQ } },
187
188   /* clocale_quoting_style */
189   { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
190       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
191       LQ LQ RQ_ESC RQ },
192     { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
193       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
194       LQ LQ RQ_ESC RQ },
195     { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
196       LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
197       LQ LQ RQ_ESC RQ } }
198 };
199
200 #endif /* ENABLE_NLS */
201
202 static char const *custom_quotes[][2] = {
203   { "", ""  },
204   { "'", "'"  },
205   { "(", ")"  },
206   { ":", " "  },
207   { " ", ":"  },
208   { "# ", "\n" },
209   { "\"'", "'\"" }
210 };
211
212 static struct result_groups custom_results[] = {
213   /* left_quote = right_quote = "" */
214   { { "", "\\0001\\0", 7, "simple",
215       " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
216       LQ_ENC RQ_ENC },
217     { "", "\\0001\\0", 7, "simple",
218       " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
219       LQ_ENC RQ_ENC },
220     { "", "\\0001\\0", 7, "simple",
221       " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
222       LQ_ENC RQ_ENC } },
223
224   /* left_quote = right_quote = "'" */
225   { { "''", "'\\0001\\0'", 9, "'simple'",
226       "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
227       "'" LQ_ENC RQ_ENC "'" },
228     { "''", "'\\0001\\0'", 9, "'simple'",
229       "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
230       "'" LQ_ENC RQ_ENC "'" },
231     { "''", "'\\0001\\0'", 9, "'simple'",
232       "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
233       "'" LQ_ENC RQ_ENC "'" } },
234
235   /* left_quote = "(" and right_quote = ")" */
236   { { "()", "(\\0001\\0)", 9, "(simple)",
237       "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
238       "(" LQ_ENC RQ_ENC ")" },
239     { "()", "(\\0001\\0)", 9, "(simple)",
240       "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
241       "(" LQ_ENC RQ_ENC ")" },
242     { "()", "(\\0001\\0)", 9, "(simple)",
243       "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
244       "(" LQ_ENC RQ_ENC ")" } },
245
246   /* left_quote = ":" and right_quote = " " */
247   { { ": ", ":\\0001\\0 ", 9, ":simple ",
248       ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
249       ":" LQ_ENC RQ_ENC " " },
250     { ": ", ":\\0001\\0 ", 9, ":simple ",
251       ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
252       ":" LQ_ENC RQ_ENC " " },
253     { ": ", ":\\0001\\0 ", 9, ":simple ",
254       ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
255       ":" LQ_ENC RQ_ENC " " } },
256
257   /* left_quote = " " and right_quote = ":" */
258   { { " :", " \\0001\\0:", 9, " simple:",
259       "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
260       " " LQ_ENC RQ_ENC ":" },
261     { " :", " \\0001\\0:", 9, " simple:",
262       "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
263       " " LQ_ENC RQ_ENC ":" },
264     { " :", " \\0001\\0:", 9, " simple:",
265       "  \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
266       " " LQ_ENC RQ_ENC ":" } },
267
268   /* left_quote = "# " and right_quote = "\n" */
269   { { "# \n", "# \\0001\\0\n", 10, "# simple\n",
270       "#  \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
271       "# " LQ_ENC RQ_ENC "\n" },
272     { "# \n", "# \\0001\\0\n", 10, "# simple\n",
273       "#  \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
274       "# " LQ_ENC RQ_ENC "\n" },
275     { "# \n", "# \\0001\\0\n", 10, "# simple\n",
276       "#  \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
277       "# " LQ_ENC RQ_ENC "\n" } },
278
279   /* left_quote = "\"'" and right_quote = "'\"" */
280   { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
281       "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
282       "\"'" LQ_ENC RQ_ENC "'\"" },
283     { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
284       "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
285       "\"'" LQ_ENC RQ_ENC "'\"" },
286     { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
287       "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
288       "\"'" LQ_ENC RQ_ENC "'\"" } }
289 };
290
291 static void
292 compare (char const *a, size_t la, char const *b, size_t lb)
293 {
294   ASSERT (la == lb);
295   ASSERT (memcmp (a, b, la) == 0);
296   ASSERT (b[lb] == '\0');
297 }
298
299 static void
300 compare_strings (char *(func) (char const *, size_t *),
301                  struct result_strings *results)
302 {
303   size_t len;
304   char *p;
305
306   len = 0;
307   p = func (inputs.str1, &len);
308   compare (results->str1, strlen (results->str1), p, len);
309
310   len = inputs.len2;
311   p = func (inputs.str2, &len);
312   compare (results->str2, results->len2, p, len);
313
314   len = SIZE_MAX;
315   p = func (inputs.str3, &len);
316   compare (results->str3, strlen (results->str3), p, len);
317
318   len = strlen (inputs.str4);
319   p = func (inputs.str4, &len);
320   compare (results->str4, strlen (results->str4), p, len);
321
322   len = SIZE_MAX;
323   p = func (inputs.str5, &len);
324   compare (results->str5, strlen (results->str5), p, len);
325
326   len = strlen (inputs.str6);
327   p = func (inputs.str6, &len);
328   compare (results->str6, strlen (results->str6), p, len);
329
330   len = strlen (inputs.str7);
331   p = func (inputs.str7, &len);
332   compare (results->str7, strlen (results->str7), p, len);
333 }
334
335 static char *
336 use_quotearg_buffer (const char *str, size_t *len)
337 {
338   static char buf[100];
339   size_t size;
340   memset (buf, 0xa5, 100);
341   size = quotearg_buffer (buf, 100, str, *len, NULL);
342   *len = size;
343   ASSERT ((unsigned char) buf[size + 1] == 0xa5);
344   return buf;
345 }
346
347 static char *
348 use_quotearg (const char *str, size_t *len)
349 {
350   char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len);
351   *len = strlen (p);
352   return p;
353 }
354
355 static char *
356 use_quote_double_quotes (const char *str, size_t *len)
357 {
358   char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
359                                : quotearg_char_mem (str, *len, '"');
360   *len = strlen (p);
361   return p;
362 }
363
364 static char *
365 use_quotearg_colon (const char *str, size_t *len)
366 {
367   char *p = (*len == SIZE_MAX ? quotearg_colon (str)
368              : quotearg_colon_mem (str, *len));
369   *len = strlen (p);
370   return p;
371 }
372
373 int
374 main (int argc, char *argv[])
375 {
376   int i;
377
378   set_program_name (argv[0]);
379
380   /* This program part is hard-wired to the C locale since it does not call
381      setlocale.  */
382   ASSERT (!isprint ('\033'));
383   for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
384     {
385       set_quoting_style (NULL, i);
386       compare_strings (use_quotearg_buffer, &results_g[i].group1);
387       compare_strings (use_quotearg, &results_g[i].group2);
388       if (i == c_quoting_style)
389         compare_strings (use_quote_double_quotes, &results_g[i].group2);
390       compare_strings (use_quotearg_colon, &results_g[i].group3);
391     }
392
393   set_quoting_style (NULL, literal_quoting_style);
394   ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
395   compare_strings (use_quotearg_buffer, &flag_results[0].group1);
396   compare_strings (use_quotearg, &flag_results[0].group2);
397   compare_strings (use_quotearg_colon, &flag_results[0].group3);
398
399   set_quoting_style (NULL, c_quoting_style);
400   ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
401           == QA_ELIDE_NULL_BYTES);
402   compare_strings (use_quotearg_buffer, &flag_results[1].group1);
403   compare_strings (use_quotearg, &flag_results[1].group2);
404   compare_strings (use_quote_double_quotes, &flag_results[1].group2);
405   compare_strings (use_quotearg_colon, &flag_results[1].group3);
406
407   ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
408           == QA_ELIDE_OUTER_QUOTES);
409   compare_strings (use_quotearg_buffer, &flag_results[2].group1);
410   compare_strings (use_quotearg, &flag_results[2].group2);
411   compare_strings (use_quote_double_quotes, &flag_results[2].group2);
412   compare_strings (use_quotearg_colon, &flag_results[2].group3);
413
414   ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
415
416   for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i)
417     {
418       set_custom_quoting (NULL,
419                           custom_quotes[i][0], custom_quotes[i][1]);
420       compare_strings (use_quotearg_buffer, &custom_results[i].group1);
421       compare_strings (use_quotearg, &custom_results[i].group2);
422       compare_strings (use_quotearg_colon, &custom_results[i].group3);
423     }
424
425 #if ENABLE_NLS
426   /* Clean up environment.  */
427   unsetenv ("LANGUAGE");
428   unsetenv ("LC_ALL");
429   unsetenv ("LC_MESSAGES");
430   unsetenv ("LC_CTYPE");
431   unsetenv ("LANG");
432   unsetenv ("OUTPUT_CHARSET");
433
434   /* This program part runs in a French UTF-8 locale.  It uses
435      the test-quotearg.mo message catalog.  */
436   {
437     const char *locale_name = getenv ("LOCALE");
438
439     if (locale_name != NULL && strcmp (locale_name, "none") != 0
440         && setenv ("LC_ALL", locale_name, 1) == 0
441         && setlocale (LC_ALL, "") != NULL)
442       {
443         textdomain ("test-quotearg");
444         bindtextdomain ("test-quotearg", getenv ("LOCALEDIR"));
445
446         set_quoting_style (NULL, locale_quoting_style);
447         compare_strings (use_quotearg_buffer, &locale_results[0].group1);
448         compare_strings (use_quotearg, &locale_results[0].group2);
449         compare_strings (use_quotearg_colon, &locale_results[0].group3);
450
451         set_quoting_style (NULL, clocale_quoting_style);
452         compare_strings (use_quotearg_buffer, &locale_results[1].group1);
453         compare_strings (use_quotearg, &locale_results[1].group2);
454         compare_strings (use_quotearg_colon, &locale_results[1].group3);
455       }
456   }
457 #endif /* ENABLE_NLS */
458
459   quotearg_free ();
460   return 0;
461 }