[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo index.c,1.21,1.22
From: |
karl |
Subject: |
texinfo/makeinfo index.c,1.21,1.22 |
Date: |
Thu, 25 Mar 2004 01:24:09 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv17276
Modified Files:
index.c
Log Message:
avoid use of snprintf, which is not available on
all platforms.
Index: index.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/index.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** index.c 14 Mar 2004 22:47:19 -0000 1.21
--- index.c 25 Mar 2004 00:24:07 -0000 1.22
***************
*** 654,663 ****
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);
--- 654,663 ----
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);
***************
*** 714,718 ****
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(index_name);
! char *index_command = xmalloc (command_len);
close_paragraph ();
--- 714,718 ----
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(index_name);
! char *index_command = xmalloc (command_len + 1);
close_paragraph ();
***************
*** 720,724 ****
xml_begin_index ();
! snprintf (index_command, command_len, "@%s %s", command, index_name);
register_delayed_write (index_command);
free (index_command);
--- 720,724 ----
xml_begin_index ();
! sprintf (index_command, "@%s %s", command, index_name);
register_delayed_write (index_command);
free (index_command);
***************
*** 782,787 ****
if (no_headers)
! snprintf (max_output_line_number, 25 * sizeof (char), "%d",
! output_line_number);
else
{
--- 782,786 ----
if (no_headers)
! sprintf (max_output_line_number, "%d", output_line_number);
else
{
***************
*** 790,794 ****
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);
}
--- 789,793 ----
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);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo index.c,1.21,1.22,
karl <=