texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo float.c,1.2,1.3 float.h,1.1.1.1,1.2 xml.c,1.7,1.8


From: dirt
Subject: texinfo/makeinfo float.c,1.2,1.3 float.h,1.1.1.1,1.2 xml.c,1.7,1.8
Date: Tue, 23 Dec 2003 11:28:16 +0100

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

Modified Files:
        float.c float.h xml.c 
Log Message:
2003-12-23  Arnold D. Robbins <address@hidden>

        * float.h (FLOAT_ELT): New member: `title_used'. Avoids reuse of
        title inside nested floats.
        (current_float_used_title, current_float_set_title_used): declared.

        * float.c (add_new_float): Init `new->title_used' to zero.
        (current_float_used_title, current_float_set_title_used): new
        functions.

        * xml.c (xml_begin_docbook_float): Make use of new functions to
        avoid omitting title, tag, id if have already done so inside
        nested float.



Index: float.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** float.c     2003/12/13 10:24:07     1.2
--- float.c     2003/12/23 10:28:13     1.3
***************
*** 41,44 ****
--- 41,45 ----
    new->type = type;
    new->title = title;
+   new->title_used = 0;
  
    new->number = current_chapter_number ();
***************
*** 272,274 ****
--- 273,286 ----
  
    free (float_type);
+ }
+ 
+ int
+ current_float_used_title ()
+ {
+       return float_stack->title_used;
+ }
+ 
+ void current_float_set_title_used ()
+ {
+       float_stack->title_used = 1;
  }

Index: float.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** float.h     2003/12/06 01:33:57     1.1.1.1
--- float.h     2003/12/23 10:28:13     1.2
***************
*** 32,35 ****
--- 32,36 ----
    char *section;
    char *section_name;
+   short title_used;
  } FLOAT_ELT;
  
***************
*** 38,41 ****
--- 39,44 ----
    *current_float_type (),
    *current_float_number (), *get_float_ref ();
+ extern int current_float_used_title ();
+ extern void current_float_set_title_used ();
  
  #endif /* not FLOAT_H */

Index: xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** xml.c       2003/12/19 15:48:32     1.7
--- xml.c       2003/12/23 10:28:13     1.8
***************
*** 1320,1323 ****
--- 1320,1331 ----
      int elt;
  {
+   if (current_float_used_title ())    /* in a nested float */
+     {
+       xml_insert_element (elt, START);        /* just insert the tag */
+       return;
+     }
+ 
+ 
+   /* OK, need the title, tag, etc. */
    if (elt == CARTOUCHE)    /* no labels on <sidebar> */
      {
***************
*** 1338,1341 ****
--- 1346,1351 ----
    execute_string ("%s", current_float_title ());
    xml_insert_element (TITLE, END);
+ 
+   current_float_set_title_used ();    /* mark this title, tag, etc used */
  }
  



reply via email to

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