Minor cleanups of __func__ module, suggested by Eric Blake <ebb9@byu.net>.
authorSimon Josefsson <simon@josefsson.org>
Thu, 6 Mar 2008 10:16:06 +0000 (11:16 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 6 Mar 2008 10:16:06 +0000 (11:16 +0100)
ChangeLog
doc/gnulib.texi
tests/test-__func__.c

index 7b9fa02..16caed6 100644 (file)
--- 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+.
index 31f51df..8de6d8e 100644 (file)
@@ -5829,15 +5829,19 @@ generated automatically.
 @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
index afa6159..7b49026 100644 (file)
@@ -36,6 +36,6 @@
 int
 main ()
 {
-  ASSERT (strlen (__func__) + 1 == sizeof (__func__));
+  ASSERT (strlen (__func__) + 1 == sizeof __func__);
   return 0;
 }