~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/quotearg.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* quotearg.c - quote arguments for output
2
2
 
3
 
   Copyright (C) 1998-2002, 2004-2012 Free Software Foundation, Inc.
 
3
   Copyright (C) 1998-2002, 2004-2013 Free Software Foundation, Inc.
4
4
 
5
5
   This program is free software: you can redistribute it and/or modify
6
6
   it under the terms of the GNU General Public License as published by
929
929
}
930
930
 
931
931
 
932
 
/* The quoting option used by quote_n and quote.  */
 
932
/* The quoting option used by the functions of quote.h.  */
933
933
struct quoting_options quote_quoting_options =
934
934
  {
935
935
    locale_quoting_style,
939
939
  };
940
940
 
941
941
char const *
942
 
quote_n (int n, char const *name)
943
 
{
944
 
  return quotearg_n_options (n, name, SIZE_MAX, &quote_quoting_options);
945
 
}
946
 
 
947
 
char const *
948
 
quote (char const *name)
949
 
{
950
 
  return quote_n (0, name);
 
942
quote_n_mem (int n, char const *arg, size_t argsize)
 
943
{
 
944
  return quotearg_n_options (n, arg, argsize, &quote_quoting_options);
 
945
}
 
946
 
 
947
char const *
 
948
quote_mem (char const *arg, size_t argsize)
 
949
{
 
950
  return quote_n_mem (0, arg, argsize);
 
951
}
 
952
 
 
953
char const *
 
954
quote_n (int n, char const *arg)
 
955
{
 
956
  return quote_n_mem (n, arg, SIZE_MAX);
 
957
}
 
958
 
 
959
char const *
 
960
quote (char const *arg)
 
961
{
 
962
  return quote_n (0, arg);
951
963
}