texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/makeinfo float.c,1.17,1.18


From: dirt
Subject: texinfo/makeinfo float.c,1.17,1.18
Date: Sat, 17 Jan 2004 13:52:37 +0100

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

Modified Files:
        float.c 
Log Message:
2004-01-17  Alper Ersoy  <address@hidden>

        * makeinfo/float.c (cm_listoffloats): Prefixed captions with
        float_type.  For HTML, used an <ul> block.  



Index: float.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** float.c     13 Jan 2004 01:01:01 -0000      1.17
--- float.c     17 Jan 2004 12:52:34 -0000      1.18
***************
*** 202,206 ****
        free (list_command);
      }
!   else
      {
        FLOAT_ELT *temp = (FLOAT_ELT *) reverse_list (float_stack);
--- 202,206 ----
        free (list_command);
      }
!   else if (float_type_exists (float_type))
      {
        FLOAT_ELT *temp = (FLOAT_ELT *) reverse_list (float_stack);
***************
*** 208,212 ****
  
        if (html)
!         insert_string ("<div class=\"listoffloats\">\n");
        else
          {
--- 208,212 ----
  
        if (html)
!         insert_string ("<ul class=\"listoffloats\">\n");
        else
          {
***************
*** 222,229 ****
                  {
                    /* A bit of space for HTML reabality.  */
!                   insert_string ("  ");
!                   execute_string ("@ref{%s, %s %s}", temp->id, temp->number,
!                       temp->title);
!                   insert_string ("<br>\n");
                  }
                else
--- 222,229 ----
                  {
                    /* A bit of space for HTML reabality.  */
!                   insert_string ("  <li>");
!                   execute_string ("@ref{%s, %s %s: %s}", temp->id, float_type,
!                       temp->number, temp->title);
!                   insert_string ("</li>\n");
                  }
                else
***************
*** 238,248 ****
                    int i = 0;
  
                    if (strlen (title) > 0)
!                     {
!                       number = (char *) xmalloc (sizeof (temp->number) + 1);
!                       sprintf (number, "%s ", temp->number);
!                     }
!                   else
!                     number = temp->number;
  
                    len = strlen (number) + strlen (title);
--- 238,248 ----
                    int i = 0;
  
+                   /* Allocate enough space for possible expansion later.  */
+                   number = (char *) xmalloc (strlen (float_type)
+                       + strlen (temp->number) + sizeof (":  "));
+ 
+                   sprintf (number, "%s %s", float_type, temp->number);
                    if (strlen (title) > 0)
!                     strcat (number, ": ");
  
                    len = strlen (number) + strlen (title);
***************
*** 252,257 ****
                      {
                        column_width = 43;
!                       /* We'll be adding a colon for readability.  */
!                       aux_chars_len = sizeof (":");
                      }
                    else
--- 252,257 ----
                      {
                        column_width = 43;
!                       /* We have only one auxiliary character, NULL.  */
!                       aux_chars_len = sizeof ("");
                      }
                    else
***************
*** 285,295 ****
  
                        if (no_headers)
!                         snprintf (entry, len + sizeof (" "), "%s%s",
                              number, title);
                        else
!                         snprintf (entry, len + sizeof ("*  "), "* %s%s",
                              number, title);
- 
-                       strcat (entry, " ...:");
                      }
                    else
--- 285,293 ----
  
                        if (no_headers)
!                         snprintf (entry, len + sizeof (" "), "%s%s ...",
                              number, title);
                        else
!                         snprintf (entry, len + sizeof ("*  "), "* %s%s ...:",
                              number, title);
                      }
                    else
***************
*** 298,302 ****
  
                        if (no_headers)
!                         snprintf (entry, len + aux_chars_len, "%s%s:",
                              number, title);
                        else
--- 296,300 ----
  
                        if (no_headers)
!                         snprintf (entry, len + aux_chars_len, "%s%s",
                              number, title);
                        else
***************
*** 349,353 ****
          {
            inhibit_paragraph_indentation = 1;
!           insert_string ("</div>\n\n");
          }
        else
--- 347,351 ----
          {
            inhibit_paragraph_indentation = 1;
!           insert_string ("</ul>\n\n");
          }
        else



reply via email to

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