changeset 39870:eaceb00fc84b

timevar: Include documentation in gnulib manual. * doc/timevar.texi: Change node and section name to 'Profiling of program phases'. In the code snippets, tweak the #includes and use GNU coding style. * doc/gnulib.texi: Include timevar.texi.
author Bruno Haible <bruno@clisp.org>
date Sun, 30 Sep 2018 19:27:56 +0200
parents f315e5e30ddd
children 08db1aa192ec
files ChangeLog doc/gnulib.texi doc/timevar.texi
diffstat 3 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 27 18:20:29 2018 +0200
+++ b/ChangeLog	Sun Sep 30 19:27:56 2018 +0200
@@ -1,3 +1,11 @@
+2018-09-30  Bruno Haible  <bruno@clisp.org>
+
+	timevar: Include documentation in gnulib manual.
+	* doc/timevar.texi: Change node and section name to 'Profiling of
+	program phases'.
+	In the code snippets, tweak the #includes and use GNU coding style.
+	* doc/gnulib.texi: Include timevar.texi.
+
 2018-09-27  Akim Demaille  <akim@lrde.epita.fr>
 
 	timevar: import from Bison.
--- a/doc/gnulib.texi	Thu Sep 27 18:20:29 2018 +0200
+++ b/doc/gnulib.texi	Sun Sep 30 19:27:56 2018 +0200
@@ -6367,6 +6367,7 @@
 * Quoting::
 * error and progname::
 * gcd::
+* Profiling of program phases::
 * Library version handling::
 * Supporting Relocation::
 * func::
@@ -6399,6 +6400,8 @@
 
 @include gcd.texi
 
+@include timevar.texi
+
 @include check-version.texi
 
 @include relocatable-maint.texi
--- a/doc/timevar.texi	Thu Sep 27 18:20:29 2018 +0200
+++ b/doc/timevar.texi	Sun Sep 30 19:27:56 2018 +0200
@@ -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 @@
 #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 @@
 
 @smallexample
 #include <config.h>
-#include <work.h>
+#include "work.h"
 
-void work (void)
+void
+work (void)
 @{
   timevar_push (tv_work_phase1);
   work1 ();