texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6758] install-info comment changes


From: Gavin D. Smith
Subject: [6758] install-info comment changes
Date: Sat, 07 Nov 2015 14:36:51 +0000

Revision: 6758
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6758
Author:   gavin
Date:     2015-11-07 14:36:51 +0000 (Sat, 07 Nov 2015)
Log Message:
-----------
install-info comment changes

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/install-info/install-info.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-11-07 14:24:46 UTC (rev 6757)
+++ trunk/ChangeLog     2015-11-07 14:36:51 UTC (rev 6758)
@@ -1,5 +1,10 @@
 2015-11-07  Gavin Smith  <address@hidden>
 
+       * install-info/install-info.c (format_entry): Add comment for 
+       local variable, and goto label.
+
+2015-11-07  Gavin Smith  <address@hidden>
+
        * install-info/install-info.c (format_entry): Use a local 
        variable to avoid dereferences of output variable.
 

Modified: trunk/install-info/install-info.c
===================================================================
--- trunk/install-info/install-info.c   2015-11-07 14:24:46 UTC (rev 6757)
+++ trunk/install-info/install-info.c   2015-11-07 14:36:51 UTC (rev 6758)
@@ -1379,11 +1379,12 @@
   return column;
 }
 
-/* Indent the Info entry's NAME and DESCRIPTION.  Lines are wrapped at the
-   WIDTH column.  The description on first line is indented at the CALIGN-th 
-   column, and all subsequent lines are indented at the ALIGN-th column.  
+/* Format the Info entry's NAME and DESCRIPTION.
+   NAME is of the form "* TEXT (TEXT)[:TEXT].".
+   The description on the first line is indented at the CALIGN-th column, and 
+   all subsequent lines are indented at the ALIGN-th column.
+   Lines are wrapped at the WIDTH column.
    The resulting Info entry is put into OUTSTR.
-   NAME is of the form "* TEXT (TEXT)[:TEXT].".
  */
 static int
 format_entry (char *name, size_t name_len, char *desc, size_t desc_len,
@@ -1393,9 +1394,11 @@
   int i, j;
   char c;
   size_t column = 0;            /* Screen column where next char will go */
-  size_t offset_out = 0;        /* Index in `line_out' for next char. */
+
+  /* Used to collect a line at a time, before transferring to outstr. */
   static char *line_out = NULL;
-  static size_t allocated_out = 0;
+  size_t offset_out = 0;           /* Index in `line_out' for next char. */
+  static size_t allocated_out = 0; /* Space allocated in `line_out'. */
   char *outstr;
 
   if (!desc || !name)
@@ -1447,11 +1450,12 @@
       if (c == '\n')
         {
           line_out[offset_out++] = c;
-          strncat (outstr, line_out, offset_out); /************/
+          strncat (outstr, line_out, offset_out);
           column = offset_out = 0;
           continue;
         }
 
+      /* Come here from inside "column > width" block below. */
     rescan:
       column = adjust_column (column, c);
 
@@ -1512,7 +1516,6 @@
           column = offset_out = 0;
           goto rescan;
         }
-
       line_out[offset_out++] = c;
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]