texinfo-commits
[Top][All Lists]
Advanced

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

[6755] install-info comment changes


From: Gavin D. Smith
Subject: [6755] install-info comment changes
Date: Sat, 07 Nov 2015 10:46:30 +0000

Revision: 6755
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6755
Author:   gavin
Date:     2015-11-07 10:46:27 +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-03 17:55:12 UTC (rev 6754)
+++ trunk/ChangeLog     2015-11-07 10:46:27 UTC (rev 6755)
@@ -1,3 +1,12 @@
+2015-11-07  Gavin Smith  <address@hidden>
+
+       Comments and formatting changes.
+       * install-info/install-info.c (parse_input): Combine a comment 
+       with comment at start of function, and add more information.
+       Change another comment.
+       (install_entry_here): Formatting changes.
+       (main) <not deleting>: Comment changed for grammar.
+
 2015-11-03  Gavin Smith  <address@hidden>
 
        Prevent line breaks in Chinese text in cross-refereces, reported 

Modified: trunk/install-info/install-info.c
===================================================================
--- trunk/install-info/install-info.c   2015-11-03 17:55:12 UTC (rev 6754)
+++ trunk/install-info/install-info.c   2015-11-07 10:46:27 UTC (rev 6755)
@@ -1062,8 +1062,13 @@
     fclose (output);
 }
 
-/* Parse the input to find the section names and the entry names it
-   specifies.  Return the number of entries to add from this file.  */
+/* Read through the input LINES, to find the section names and the
+   entry names it specifies. Each INFO-DIR-SECTION entry is added
+   to the SECTIONS linked list.  Each START-INFO-DIR-ENTRY block is added to 
+   the ENTRIES linked list, and the last group of INFO-DIR-SECTION entries
+   is recorded in next->entry_sections and next->entry_sections_tail, where
+   next is the new entry.  Return the number of entries to add from this 
+   file.  */
 int
 parse_input (const struct line_data *lines, int nlines,
              struct spec_section **sections, struct spec_entry **entries,
@@ -1082,12 +1087,6 @@
   if (ignore_sections && ignore_entries)
     return 0;
 
-  /* Loop here processing lines from the input file.  Each
-     INFO-DIR-SECTION entry is added to the SECTIONS linked list.
-     Each START-INFO-DIR-ENTRY block is added to the ENTRIES linked
-     list, and all its entries inherit the chain of SECTION entries
-     defined by the last group of INFO-DIR-SECTION entries we have
-     seen until that point.  */
   for (i = 0; i < nlines; i++)
     {
       if (!ignore_sections
@@ -1129,6 +1128,8 @@
                  tail pointer.  */
               reset_tail = 1;
 
+              /* Save start of the entry.  If this is non-zero, we're
+                 already inside an entry, so fail. */
               if (start_of_this_entry != 0)
                 fatal (_("START-INFO-DIR-ENTRY without matching 
END-INFO-DIR-ENTRY"));
               start_of_this_entry = lines[i + 1].start;
@@ -1141,9 +1142,8 @@
                                 lines[i].start, lines[i].size)
                       && sizeof ("END-INFO-DIR-ENTRY") - 1 == lines[i].size))
                 {
-                  /* We found an end of this entry.  Allocate another
-                     entry, fill its data, and add it to the linked
-                     list.  */
+                  /* We found the end of this entry.  Save its contents
+                     in a new entry in the linked list.  */
                   struct spec_entry *next
                     = (struct spec_entry *) xmalloc (sizeof (struct 
spec_entry));
                   next->text
@@ -2342,8 +2342,8 @@
                    &input_sections, &entries_to_add_from_file, delete_flag);
   if (!delete_flag)
     {
-      /* If there are no entries on the command-line at all, so we use the 
-         entries found in the Info file itself (if any). */
+      /* If there are no entries on the command-line at all, use the entries
+         found in the Info file itself (if any). */
       if (entries_to_add == NULL)
         {
           entries_to_add = entries_to_add_from_file;
@@ -2776,11 +2776,9 @@
   return mbsncasecmp (text1, text2, len1 <= len2 ? len1 : len2);
 }
 
-/* Insert ENTRY into the add_entries_before vector
-   for line number LINE_NUMBER of the dir file.
-   DIR_LINES and N_ENTRIES carry information from like-named variables
-   in main.  */
-
+/* Insert ENTRY into the ADD_ENTRIES_BEFORE vector for line number LINE_NUMBER 
+   of the dir file.  DIR_LINES and N_ENTRIES carry information from like-named 
+   variables in main.  */
 void
 insert_entry_here (struct spec_entry *entry, int line_number,
                    struct line_data *dir_lines, int n_entries)
@@ -2801,8 +2799,8 @@
   for (i = 0; i < n_entries; i++)
     if (dir_lines[line_number].add_entries_before[i] == 0
         || menu_line_lessp (entry->text, strlen (entry->text),
-                            dir_lines[line_number].add_entries_before[i]->text,
-                            strlen 
(dir_lines[line_number].add_entries_before[i]->text)))
+              dir_lines[line_number].add_entries_before[i]->text,
+              strlen (dir_lines[line_number].add_entries_before[i]->text)))
       break;
 
   if (i == n_entries)




reply via email to

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