[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo float.c,1.9,1.10
From: |
dirt |
Subject: |
texinfo/makeinfo float.c,1.9,1.10 |
Date: |
Wed, 7 Jan 2004 01:18:26 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv24723/makeinfo
Modified Files:
float.c
Log Message:
2004-01-07 Alper Ersoy <address@hidden>
* makeinfo/float.c (cm_listoffloats): when there is no caption, do not
insert space between the float number and the colon.
Index: float.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** float.c 6 Jan 2004 23:41:30 -0000 1.9
--- float.c 7 Jan 2004 00:18:23 -0000 1.10
***************
*** 194,226 ****
{
char *entry;
char *title = expansion (temp->title, 0);
! int len = strlen (temp->number) + strlen (title);
! /* Auxiliary chars are asterisk, colon, and the like. */
! int aux_chars_len;
! /* This refers to the width of the first column in menus.
*/
! int column_width;
int i = 0;
/* Chosen widths are to match what @printindex produces. */
if (no_headers)
{
column_width = 48;
! /* Width of " :\0" */
! aux_chars_len = sizeof (" :");
}
else
{
column_width = 37;
! /* Width of "* :\0". One of the spaces is after
! the asterisk, the other is before the colon. */
! aux_chars_len = sizeof ("* :");
}
if (len + aux_chars_len > column_width
&& strlen (temp->shorttitle) > 0)
{
title = expansion (temp->shorttitle, 0);
! len = strlen (temp->number) + strlen (title);
}
--- 194,238 ----
{
char *entry;
+ char *number;
char *title = expansion (temp->title, 0);
! int len;
! int aux_chars_len; /* these are asterisk, colon, etc. */
! int column_width; /* width of the first column in menus. */
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);
+
/* Chosen widths are to match what @printindex produces. */
if (no_headers)
{
column_width = 48;
! /* We'll be adding a colon for readability. */
! aux_chars_len = sizeof (":");
}
else
{
column_width = 37;
! /* We'll be adding an asterisk, followed by a space
! and then a colon after the title, to construct a
! proper menu item. */
! aux_chars_len = sizeof ("* :");
}
+ /* If we have a @shortcaption, try it if @caption is
+ too long to fit on a line. */
if (len + aux_chars_len > column_width
&& strlen (temp->shorttitle) > 0)
{
title = expansion (temp->shorttitle, 0);
! len = strlen (number) + strlen (title);
}
***************
*** 233,245 ****
while (title[len] != ' ')
len--;
! len += strlen (temp->number);
entry = xmalloc (len + aux_chars_len);
if (no_headers)
! snprintf (entry, len + sizeof (" "), "%s %s",
! temp->number, title);
else
! snprintf (entry, len + sizeof ("* "), "* %s %s",
! temp->number, title);
strcat (entry, " ...:");
--- 245,257 ----
while (title[len] != ' ')
len--;
! len += strlen (number);
entry = xmalloc (len + aux_chars_len);
if (no_headers)
! snprintf (entry, len + sizeof (" "), "%s%s",
! number, title);
else
! snprintf (entry, len + sizeof ("* "), "* %s%s",
! number, title);
strcat (entry, " ...:");
***************
*** 250,258 ****
if (no_headers)
! snprintf (entry, len + aux_chars_len, "%s %s:",
! temp->number, title);
else
! snprintf (entry, len + aux_chars_len, "* %s %s:",
! temp->number, title);
}
--- 262,270 ----
if (no_headers)
! snprintf (entry, len + aux_chars_len, "%s%s:",
! number, title);
else
! snprintf (entry, len + aux_chars_len, "* %s%s:",
! number, title);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo float.c,1.9,1.10,
dirt <=