annotate lib/quote.c @ 5848:a48fb0e98c8c

*** empty log message ***
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 14 May 2005 06:03:57 +0000
parents fcd34d3861a4
children 96c32553b4c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4008
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
1 /* quote.c - quote arguments for output
4260
f72c290c70d2 (quote_n): Fix typo in comment.
Jim Meyering <jim@meyering.net>
parents: 4008
diff changeset
2 Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
4008
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
3
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
4 This program is free software; you can redistribute it and/or modify
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
5 it under the terms of the GNU General Public License as published by
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
7 any later version.
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
8
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
9 This program is distributed in the hope that it will be useful,
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
12 GNU General Public License for more details.
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
13
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
14 You should have received a copy of the GNU General Public License
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
5848
a48fb0e98c8c *** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents: 4333
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
4008
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
17
2746
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
18 /* Written by Paul Eggert <eggert@twinsun.com> */
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
19
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
20 #if HAVE_CONFIG_H
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
21 # include <config.h>
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
22 #endif
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
23
4008
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
24 #include "quotearg.h"
fe967957b27c Add copyright notice.
Paul Eggert <eggert@cs.ucla.edu>
parents: 3132
diff changeset
25 #include "quote.h"
2746
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
26
4260
f72c290c70d2 (quote_n): Fix typo in comment.
Jim Meyering <jim@meyering.net>
parents: 4008
diff changeset
27 /* Return an unambiguous printable representation of NAME,
f72c290c70d2 (quote_n): Fix typo in comment.
Jim Meyering <jim@meyering.net>
parents: 4008
diff changeset
28 allocated in slot N, suitable for diagnostics. */
2746
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
29 char const *
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
30 quote_n (int n, char const *name)
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
31 {
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
32 return quotearg_n_style (n, locale_quoting_style, name);
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
33 }
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
34
4260
f72c290c70d2 (quote_n): Fix typo in comment.
Jim Meyering <jim@meyering.net>
parents: 4008
diff changeset
35 /* Return an unambiguous printable representation of NAME,
f72c290c70d2 (quote_n): Fix typo in comment.
Jim Meyering <jim@meyering.net>
parents: 4008
diff changeset
36 suitable for diagnostics. */
2746
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
37 char const *
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
38 quote (char const *name)
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
39 {
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
40 return quote_n (0, name);
2326ac681ccc (quote, quote_n): New file. Two functions taken verbatim
Jim Meyering <jim@meyering.net>
parents:
diff changeset
41 }