~ubuntu-branches/ubuntu/wily/gsasl/wily-proposed

« back to all changes in this revision

Viewing changes to gl/quotearg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-04-14 07:26:51 UTC
  • mfrom: (2.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100414072651-hoc2231ulo8onq2x
Tags: 1.4.4-1ubuntu1
* Merge from Debian experimental (LP: #548480). Bugfix only release.
  Remaining changes:
  - debian/rules: Include clean-la.mk from cdbs to clean up the
    dependency_libs field in libgsasl.la.
* debian/control: drop libgsasl7 Depends on libgcrypt to what we have in
  Lucid (1.4.4-5). See Debian bug #564661.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* quotearg.h - quote arguments for output
2
2
 
3
 
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 Free
4
 
   Software Foundation, Inc.
 
3
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, 2010
 
4
   Free Software Foundation, Inc.
5
5
 
6
6
   This program is free software: you can redistribute it and/or modify
7
7
   it under the terms of the GNU General Public License as published by
276
276
   that has special meaning after a backslash (for example, "\t" for
277
277
   tab).  */
278
278
void set_custom_quoting (struct quoting_options *o,
279
 
                         char const *left_quote,
280
 
                         char const *right_quote);
 
279
                         char const *left_quote,
 
280
                         char const *right_quote);
281
281
 
282
282
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
283
283
   argument ARG (of size ARGSIZE), using O to control quoting.
291
291
   not -1, the style of O does not use backslash escapes, and the
292
292
   flags of O do not request elision of null bytes.*/
293
293
size_t quotearg_buffer (char *buffer, size_t buffersize,
294
 
                        char const *arg, size_t argsize,
295
 
                        struct quoting_options const *o);
 
294
                        char const *arg, size_t argsize,
 
295
                        struct quoting_options const *o);
296
296
 
297
297
/* Like quotearg_buffer, except return the result in a newly allocated
298
298
   buffer.  It is the caller's responsibility to free the result.  The
299
299
   result will not contain embedded null bytes.  */
300
300
char *quotearg_alloc (char const *arg, size_t argsize,
301
 
                      struct quoting_options const *o);
 
301
                      struct quoting_options const *o);
302
302
 
303
303
/* Like quotearg_alloc, except that the length of the result,
304
304
   excluding the terminating null byte, is stored into SIZE if it is
307
307
   backslash escapes, and the flags of O do not request elision of
308
308
   null bytes.*/
309
309
char *quotearg_alloc_mem (char const *arg, size_t argsize,
310
 
                          size_t *size, struct quoting_options const *o);
 
310
                          size_t *size, struct quoting_options const *o);
311
311
 
312
312
/* Use storage slot N to return a quoted version of the string ARG.
313
313
   Use the default quoting options.
338
338
   argument ARG of size ARGSIZE.  This is like quotearg_n_style
339
339
   (N, S, ARG), except it can quote null bytes.  */
340
340
char *quotearg_n_style_mem (int n, enum quoting_style s,
341
 
                            char const *arg, size_t argsize);
 
341
                            char const *arg, size_t argsize);
342
342
 
343
343
/* Equivalent to quotearg_n_style (0, S, ARG).  */
344
344
char *quotearg_style (enum quoting_style s, char const *arg);
345
345
 
346
346
/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE).  */
347
347
char *quotearg_style_mem (enum quoting_style s,
348
 
                          char const *arg, size_t argsize);
 
348
                          char const *arg, size_t argsize);
349
349
 
350
350
/* Like quotearg (ARG), except also quote any instances of CH.
351
351
   See set_char_quoting for a description of acceptable CH values.  */
365
365
   set_custom_quoting for a description of acceptable LEFT_QUOTE and
366
366
   RIGHT_QUOTE values.  */
367
367
char *quotearg_n_custom (int n, char const *left_quote,
368
 
                         char const *right_quote, char const *arg);
 
368
                         char const *right_quote, char const *arg);
369
369
 
370
370
/* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it
371
371
   can quote null bytes.  */
372
372
char *quotearg_n_custom_mem (int n, char const *left_quote,
373
 
                             char const *right_quote,
374
 
                             char const *arg, size_t argsize);
 
373
                             char const *right_quote,
 
374
                             char const *arg, size_t argsize);
375
375
 
376
376
/* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG).  */
377
377
char *quotearg_custom (char const *left_quote, char const *right_quote,
378
 
                       char const *arg);
 
378
                       char const *arg);
379
379
 
380
380
/* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG,
381
 
                                        ARGSIZE).  */
 
381
                                        ARGSIZE).  */
382
382
char *quotearg_custom_mem (char const *left_quote,
383
 
                           char const *right_quote,
384
 
                           char const *arg, size_t argsize);
 
383
                           char const *right_quote,
 
384
                           char const *arg, size_t argsize);
385
385
 
386
386
/* Free any dynamically allocated memory.  */
387
387
void quotearg_free (void);