changeset 9760:e80f91c10083

Minor cleanups of __func__ module, suggested by Eric Blake <ebb9@byu.net>.
author Simon Josefsson <simon@josefsson.org>
date Thu, 06 Mar 2008 11:16:06 +0100
parents f2b8b84fb4b4
children f63d3075f044
files ChangeLog doc/gnulib.texi tests/test-__func__.c
diffstat 3 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-03-06  Simon Josefsson  <simon@josefsson.org>
+
+	* doc/gnulib.texi (__func__): Use C99 terminology when talking
+	about __func__.  Make example self-contained.  Suggested by Eric
+	Blake <ebb9@byu.net>.
+
+	* tests/test-__func__.c (main): Avoid extraneous () around __func.
+	Suggested by Eric Blake <ebb9@byu.net>.
+
 2008-03-05  Simon Josefsson  <simon@josefsson.org>
 
 	* modules/byteswap (License): Re-license as LGPLv2+.
--- a/doc/gnulib.texi
+++ b/doc/gnulib.texi
@@ -5829,15 +5829,19 @@
 @node __func__
 @section __func__
 
-The @code{__func__} module makes sure that you can use the
-@code{__func__} variable as defined by C99 in your code.
+The @code{__func__} module makes sure that you can use the predefined
+identifier @code{__func__} as defined by C99 in your code.
 
 A small example is:
 
 @smallexample
 #include <config.h>
-...
-printf ("%s: something happened\n", __func__);
+#include <stdio.h> /* for printf */
+
+int main (void)
+@{
+    printf ("%s: hello world\n", __func__);
+@}
 @end smallexample
 
 @node GNU Free Documentation License
--- a/tests/test-__func__.c
+++ b/tests/test-__func__.c
@@ -36,6 +36,6 @@
 int
 main ()
 {
-  ASSERT (strlen (__func__) + 1 == sizeof (__func__));
+  ASSERT (strlen (__func__) + 1 == sizeof __func__);
   return 0;
 }