Hi Akim,

How about the following patch to:
- include timevar.texi in the Gnulib documentation,
- mention '#include <stdio.h>', needed for stderr,
- use GNU coding style for function definitions,
- use #include "work.h". The common practice is to use #include <>
  for header files defined outside the package.

Also, Where is the documentation regarding
  - the comparison with profiling tools,
  - the multithreading,
  - child processes?

Bruno

diff --git a/doc/gnulib.texi b/doc/gnulib.texi
index 4ddb34d..2f53059 100644
--- a/doc/gnulib.texi
+++ b/doc/gnulib.texi
@@ -6367,6 +6367,7 @@ to POSIX that it can be treated like any other Unix-like 
platform.
 * Quoting::
 * error and progname::
 * gcd::
+* Profiling of program phases::
 * Library version handling::
 * Supporting Relocation::
 * func::
@@ -6399,6 +6400,8 @@ to POSIX that it can be treated like any other Unix-like 
platform.
 
 @include gcd.texi
 
+@include timevar.texi
+
 @include check-version.texi
 
 @include relocatable-maint.texi
diff --git a/doc/timevar.texi b/doc/timevar.texi
index 86ef811..ae818fb 100644
--- a/doc/timevar.texi
+++ b/doc/timevar.texi
@@ -1,7 +1,8 @@
-@node timevar
-@section timevar
+@node Profiling of program phases
+@section Profiling of program phases
 
-A simple self-profiling module based on timers.
+The module @samp{timevar} provides a simple self-profiling facility,
+based on timers.
 
 @smallexample
 Execution times (seconds)
@@ -44,11 +45,13 @@ the following example.
 #include <config.h>
 #include "timevar.h"
 
+#include <stdio.h>
 #include "read.h"
 #include "work.h"
 #include "output.h"
 
-int main (void)
+int
+main (void)
 @{
   timevar_enabled = true;
   timevar_init ();
@@ -76,9 +79,10 @@ with, for instance, in @file{work.c}
 
 @smallexample
 #include <config.h>
-#include <work.h>
+#include "work.h"
 
-void work (void)
+void
+work (void)
 @{
   timevar_push (tv_work_phase1);
   work1 ();


Reply via email to