[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SunOS-5.5 build failure in texinfo-4.6.92
From: |
Karl Berry |
Subject: |
Re: SunOS-5.5 build failure in texinfo-4.6.92 |
Date: |
Wed, 24 Mar 2004 19:27:55 -0500 |
Hi Vin --
here's a patch that removes use of snprintf, except in the gettext
stuff, which I hope will configure itself not to need it. Let me know ...
Thanks,
karl
*** float.c 19 Mar 2004 16:26:45 -0000 1.26
--- float.c 25 Mar 2004 00:20:16 -0000 1.27
***************
*** 56,65 ****
}
{ /* Append the current float number. */
! char s[100];
! snprintf (s, 100, "%s%d", new->number,
! count_floats_of_type_in_chapter (text_expansion (type), new->number)
+ 1);
free (new->number);
new->number = xstrdup (s);
}
--- 56,67 ----
}
{ /* Append the current float number. */
! unsigned len = strlen (new->number) + 21; /* that's 64 bits */
! char *s = xmalloc (len + 1);
! sprintf (s, "%s%d", new->number,
! count_floats_of_type_in_chapter (text_expansion (type),
! new->number) + 1);
free (new->number);
new->number = xstrdup (s);
}
***************
*** 188,201 ****
else if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(float_type);
! char *list_command = xmalloc (command_len);
/* These are for the text following @listoffloats command.
Handling them with delayed writes is too late. */
close_paragraph ();
cm_noindent ();
! snprintf (list_command, command_len, "@%s %s", command, float_type);
register_delayed_write (list_command);
free (list_command);
}
--- 190,203 ----
else if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(float_type);
! char *list_command = xmalloc (command_len + 1);
/* These are for the text following @listoffloats command.
Handling them with delayed writes is too late. */
close_paragraph ();
cm_noindent ();
! sprintf (list_command, "@%s %s", command, float_type);
register_delayed_write (list_command);
free (list_command);
}
*** index.c.~1.21.~ Sun Mar 14 14:47:19 2004
--- index.c Wed Mar 24 16:22:34 2004
***************
*** 653,664 ****
int last_column;
int str_size = output_line_number_len + strlen (_("(line )"))
+ sizeof (NULL);
! char *out_line_no_str = (char *) xmalloc (str_size);
/* Do not translate ``(line NNN)'' below for !no_headers case (Info output),
because it's something like the ``* Menu'' strings. For plaintext output
it should be translated though. */
! snprintf (out_line_no_str, str_size,
no_headers ? _("(line %*d)") : "(line %*d)",
output_line_number_len, line_number);
--- 653,664 ----
int last_column;
int str_size = output_line_number_len + strlen (_("(line )"))
+ sizeof (NULL);
! char *out_line_no_str = (char *) xmalloc (str_size + 1);
/* Do not translate ``(line NNN)'' below for !no_headers case (Info output),
because it's something like the ``* Menu'' strings. For plaintext output
it should be translated though. */
! sprintf (out_line_no_str,
no_headers ? _("(line %*d)") : "(line %*d)",
output_line_number_len, line_number);
***************
*** 713,725 ****
else if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(index_name);
! char *index_command = xmalloc (command_len);
close_paragraph ();
if (docbook)
xml_begin_index ();
! snprintf (index_command, command_len, "@%s %s", command, index_name);
register_delayed_write (index_command);
free (index_command);
}
--- 713,725 ----
else if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(index_name);
! char *index_command = xmalloc (command_len + 1);
close_paragraph ();
if (docbook)
xml_begin_index ();
! sprintf (index_command, "@%s %s", command, index_name);
register_delayed_write (index_command);
free (index_command);
}
***************
*** 781,795 ****
char *max_output_line_number = (char *) xmalloc (25 * sizeof (char));
if (no_headers)
! snprintf (max_output_line_number, 25 * sizeof (char), "%d",
! output_line_number);
else
{
INDEX_ELT *tmp_entry = index;
unsigned tmp = 0;
for (tmp_entry = index; tmp_entry; tmp_entry = tmp_entry->next)
tmp = tmp_entry->output_line > tmp ? tmp_entry->output_line :
tmp;
! snprintf (max_output_line_number, 25 * sizeof (char), "%d", tmp);
}
output_line_number_len = strlen (max_output_line_number);
--- 781,794 ----
char *max_output_line_number = (char *) xmalloc (25 * sizeof (char));
if (no_headers)
! sprintf (max_output_line_number, "%d", output_line_number);
else
{
INDEX_ELT *tmp_entry = index;
unsigned tmp = 0;
for (tmp_entry = index; tmp_entry; tmp_entry = tmp_entry->next)
tmp = tmp_entry->output_line > tmp ? tmp_entry->output_line :
tmp;
! sprintf (max_output_line_number, "%d", tmp);
}
output_line_number_len = strlen (max_output_line_number);