diff options
author | TizenOpenSource <tizenopensrc@samsung.com> | 2023-12-28 15:00:17 +0900 |
---|---|---|
committer | TizenOpenSource <tizenopensrc@samsung.com> | 2023-12-28 15:00:17 +0900 |
commit | fa0afb24e35ce19c2a1a660be317f9c2bfff51c0 (patch) | |
tree | bb551af4faaab9e46e88356e57e0df276868de34 /lib/quotearg.h | |
parent | 63bb5dc37a2dfabc6c03c04bc27ea5d47b922863 (diff) | |
download | diffutils-upstream.tar.gz diffutils-upstream.tar.bz2 diffutils-upstream.zip |
Imported Upstream version 3.10upstream/3.10upstream
Diffstat (limited to 'lib/quotearg.h')
-rw-r--r-- | lib/quotearg.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/quotearg.h b/lib/quotearg.h index ecef74f..baab586 100644 --- a/lib/quotearg.h +++ b/lib/quotearg.h @@ -1,11 +1,11 @@ /* quotearg.h - quote arguments for output - Copyright (C) 1998-2002, 2004, 2006, 2008-2021 Free Software Foundation, + Copyright (C) 1998-2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -21,7 +21,11 @@ #ifndef QUOTEARG_H_ # define QUOTEARG_H_ 1 -# include <stddef.h> +/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL. */ +# if !_GL_CONFIG_H_INCLUDED +# error "Please include config.h first." +# endif + # include <stdlib.h> /* Basic quoting styles. For each style, an example is given on the @@ -279,6 +283,7 @@ struct quoting_options; struct quoting_options *clone_quoting_options (struct quoting_options *o) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_RETURNS_NONNULL; + /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options const *o); @@ -333,7 +338,9 @@ size_t quotearg_buffer (char *restrict buffer, size_t buffersize, buffer. It is the caller's responsibility to free the result. The result will not contain embedded null bytes. */ char *quotearg_alloc (char const *arg, size_t argsize, - struct quoting_options const *o); + struct quoting_options const *o) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE + _GL_ATTRIBUTE_RETURNS_NONNULL; /* Like quotearg_alloc, except that the length of the result, excluding the terminating null byte, is stored into SIZE if it is @@ -342,7 +349,9 @@ char *quotearg_alloc (char const *arg, size_t argsize, backslash escapes, and the flags of O do not request elision of null bytes.*/ char *quotearg_alloc_mem (char const *arg, size_t argsize, - size_t *size, struct quoting_options const *o); + size_t *size, struct quoting_options const *o) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE + _GL_ATTRIBUTE_RETURNS_NONNULL; /* Use storage slot N to return a quoted version of the string ARG. Use the default quoting options. |