texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo sectioning.c,1.9,1.10 xml.c,1.31,1.32 xref.c,1.7,1.8


From: dirt
Subject: texinfo/makeinfo sectioning.c,1.9,1.10 xml.c,1.31,1.32 xref.c,1.7,1.8
Date: Wed, 18 Feb 2004 14:58:17 +0100

Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv5747/makeinfo

Modified Files:
        sectioning.c xml.c xref.c 
Log Message:
2004-02-18  Alper Ersoy  <address@hidden>

        * makeinfo/xml.h:
        * makeinfo/xml.c (xml_get_assoc_for_id, xml_associate_title_with_id):
        removed these functions.
        
        * makeinfo/xref.c (cm_xref): do not call xml_get_assoc_for_id.

        * makeinfo/sectioning.c (sectioning_underscore): added xreflabel
        attribute to @unnumbered for Docbook.



Index: sectioning.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/sectioning.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** sectioning.c        13 Feb 2004 22:01:39 -0000      1.9
--- sectioning.c        18 Feb 2004 13:58:14 -0000      1.10
***************
*** 348,357 ****
          xml_last_section_output_position = output_paragraph_offset;
  
            /* Docbook does not support @unnumbered at all.  So we provide 
numbers
               that other formats use.  @appendix seems to be fine though, so 
we let
               Docbook handle that as usual.  */
            if (docbook && enum_marker != APPENDIX_MAGIC)
!               xml_insert_element_with_attribute (xml_element (secname), 
START, "label=\"%s\"",
!                   handle_enum_increment (level, search_sectioning (cmd)));
            else
              xml_insert_element (xml_element (secname), START);
--- 348,372 ----
          xml_last_section_output_position = output_paragraph_offset;
  
+         get_rest_of_line (0, &temp);
+           /* Use @settitle value if @top parameter is empty.  */
+           if (STREQ (command, "top") && strlen(temp) == 0)
+             temp = xstrdup (title);
+ 
            /* Docbook does not support @unnumbered at all.  So we provide 
numbers
               that other formats use.  @appendix seems to be fine though, so 
we let
               Docbook handle that as usual.  */
            if (docbook && enum_marker != APPENDIX_MAGIC)
!             {
!               if (section_alist[search_sectioning (cmd)].num == ENUM_SECT_NO
!                   && section_alist[search_sectioning (cmd)].toc == TOC_YES)
!                 xml_insert_element_with_attribute (xml_element (secname),
!                     START, "label=\"%s\" xreflabel=\"%s\"",
!                     handle_enum_increment (level, search_sectioning (cmd)),
!                     text_expansion (temp));
!               else
!                 xml_insert_element_with_attribute (xml_element (secname),
!                     START, "label=\"%s\"",
!                     handle_enum_increment (level, search_sectioning (cmd)));
!             }
            else
              xml_insert_element (xml_element (secname), START);
***************
*** 359,376 ****
          xml_insert_element (TITLE, START);
          xml_open_section (level, secname);
!         get_rest_of_line (0, &temp);
!           /* Use @settitle value if @top parameter is empty.  */
!           if (STREQ (command, "top") && strlen(temp) == 0)
!             temp = xstrdup (title);
!         execute_string ("%s", temp);
! 
!           /* Keep track of @unnumbered sections for proper @xrefs.  */
!           if (docbook && current_node
!               && section_alist[search_sectioning (cmd)].num == ENUM_SECT_NO
!               && section_alist[search_sectioning (cmd)].toc == TOC_YES)
!             xml_associate_title_with_id (current_node, temp);
  
          free (temp);
-         xml_insert_element (TITLE, END);
        }
        else
--- 374,381 ----
          xml_insert_element (TITLE, START);
          xml_open_section (level, secname);
!         execute_string (temp);
!         xml_insert_element (TITLE, END);
  
          free (temp);
        }
        else

Index: xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** xml.c       18 Feb 2004 02:37:12 -0000      1.31
--- xml.c       18 Feb 2004 13:58:14 -0000      1.32
***************
*** 1061,1107 ****
  }
  
- /* To be able to properly xref unnumbered sections with only one parameter,
-    we have to keep track of their titles and use as the missing parameters.  
*/
- typedef struct unnumbered_label
- {
-   struct unnumbered_label *next;
-   char *id;
-   char *title;
- } UNNUMBERED_LABEL;
- 
- static UNNUMBERED_LABEL *unnumbered_labels = NULL;
- 
- char *
- xml_get_assoc_for_id (char *id)
- { /* Return the title, if its id matches the parameter.  */
-   UNNUMBERED_LABEL *temp = unnumbered_labels;
- 
-   while (temp)
-     {
-       if (STREQ (id, temp->id))
-         return temp->title;
-       temp = temp->next;
-     }
- 
-   /* Tough luck.  */
-   return "";
- }
- 
- void
- xml_associate_title_with_id (char *nodename, char *title)
- { /* Check to see if this node already has an associated title with it.  */
-   UNNUMBERED_LABEL *temp;
- 
-   if (strlen (xml_get_assoc_for_id (xml_id (nodename))) > 0)
-     return;
- 
-   /* Associated Titles.  */
-   temp = xmalloc (sizeof (UNNUMBERED_LABEL));
-   temp->id = xml_id (nodename);
-   temp->title = xstrdup (title);
-   temp->next = unnumbered_labels;
-   unnumbered_labels = temp;
- }
- 
  void
  xml_start_menu_entry (char *tem)
--- 1061,1064 ----

Index: xref.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xref.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** xref.c      18 Feb 2004 02:38:45 -0000      1.7
--- xref.c      18 Feb 2004 13:58:14 -0000      1.8
***************
*** 138,147 ****
                char *arg1_id = xml_id (arg1);
  
-               if (!*arg2 && !*arg3)
-                 {
-                   free (arg3);
-                   arg3 = xstrdup (xml_get_assoc_for_id (arg1_id));
-                 }
- 
                if (*arg2 || *arg3)
                  {
--- 138,141 ----



reply via email to

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