X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgprintf.c;h=cf4bf21cd878982fd7db435e4970fac77074e554;hb=30ed5f53e205e6bfc35126a9d3c62dac8a9c5dad;hp=06fb6cb2b27b7bff1650835514a9a1c21f8116db;hpb=ac342a8d0c4e50b5983631808ca6b7dc7508e17d;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gprintf.c b/glib/gprintf.c index 06fb6cb..cf4bf21 100644 --- a/glib/gprintf.c +++ b/glib/gprintf.c @@ -12,22 +12,15 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library; if not, see . */ #include "config.h" -#ifndef _WIN32 -#define _GNU_SOURCE /* For vasprintf */ -#endif - #include #include #include -#include "glib.h" #include "gprintf.h" #include "gprintfint.h" @@ -35,12 +28,16 @@ /** * g_printf: * @format: a standard printf() format string, but notice - * string precision pitfalls. - * @Varargs: the arguments to insert in the output. + * [string precision pitfalls][string-precision] + * @...: the arguments to insert in the output. * * An implementation of the standard printf() function which supports * positional parameters, as specified in the Single Unix Specification. * + * As with the standard printf(), this does not automatically append a trailing + * new-line character to the message, so typically @format should end with its + * own new-line character. + * * Returns: the number of bytes printed. * * Since: 2.2 @@ -63,8 +60,8 @@ g_printf (gchar const *format, * g_fprintf: * @file: the stream to write to. * @format: a standard printf() format string, but notice - * string precision pitfalls. - * @Varargs: the arguments to insert in the output. + * [string precision pitfalls][string-precision] + * @...: the arguments to insert in the output. * * An implementation of the standard fprintf() function which supports * positional parameters, as specified in the Single Unix Specification. @@ -94,8 +91,8 @@ g_fprintf (FILE *file, * is up to the caller to ensure that the allocated buffer is large * enough to hold the formatted result * @format: a standard printf() format string, but notice - * string precision pitfalls. - * @Varargs: the arguments to insert in the output. + * [string precision pitfalls][string-precision] + * @...: the arguments to insert in the output. * * An implementation of the standard sprintf() function which supports * positional parameters, as specified in the Single Unix Specification. @@ -130,8 +127,8 @@ g_sprintf (gchar *string, * @n: the maximum number of bytes to produce (including the * terminating nul character). * @format: a standard printf() format string, but notice - * string precision pitfalls. - * @Varargs: the arguments to insert in the output. + * [string precision pitfalls][string-precision] + * @...: the arguments to insert in the output. * * A safer form of the standard sprintf() function. The output is guaranteed * to not exceed @n characters (including the terminating nul character), so @@ -173,7 +170,7 @@ g_snprintf (gchar *string, /** * g_vprintf: * @format: a standard printf() format string, but notice - * string precision pitfalls. + * [string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. * * An implementation of the standard vprintf() function which supports @@ -196,7 +193,7 @@ g_vprintf (gchar const *format, * g_vfprintf: * @file: the stream to write to. * @format: a standard printf() format string, but notice - * string precision pitfalls. + * [string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. * * An implementation of the standard fprintf() function which supports @@ -220,7 +217,7 @@ g_vfprintf (FILE *file, * g_vsprintf: * @string: the buffer to hold the output. * @format: a standard printf() format string, but notice - * string precision pitfalls. + * [string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. * * An implementation of the standard vsprintf() function which supports @@ -247,7 +244,7 @@ g_vsprintf (gchar *string, * @n: the maximum number of bytes to produce (including the * terminating nul character). * @format: a standard printf() format string, but notice - * string precision pitfalls. + * string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. * * A safer form of the standard vsprintf() function. The output is guaranteed @@ -287,7 +284,7 @@ g_vsnprintf (gchar *string, * g_vasprintf: * @string: the return location for the newly-allocated string. * @format: a standard printf() format string, but notice - * string precision pitfalls. + * [string precision pitfalls][string-precision] * @args: the list of arguments to insert in the output. * * An implementation of the GNU vasprintf() function which supports