[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo float.c,1.16,1.17 index.c,1.6,1.7
From: |
dirt |
Subject: |
texinfo/makeinfo float.c,1.16,1.17 index.c,1.6,1.7 |
Date: |
Tue, 13 Jan 2004 02:01:04 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv22901/makeinfo
Modified Files:
float.c index.c
Log Message:
2004-01-13 Alper Ersoy <address@hidden>
* makeinfo/float.c (cm_listoffloats):
* makeinfo/index.c (cm_printindex): decrement line_number just after
get_rest_of_line to make messages refer to the correct line,
re-increment it just before returning.
Index: float.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/float.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** float.c 12 Jan 2004 22:35:22 -0000 1.16
--- float.c 13 Jan 2004 01:01:01 -0000 1.17
***************
*** 172,178 ****
{
char *float_type;
-
get_rest_of_line (1, &float_type);
if (handling_delayed_writes && !float_type_exists (float_type))
warning (_("Requested float type %s is not previously used"), float_type);
--- 172,182 ----
{
char *float_type;
get_rest_of_line (1, &float_type);
+ /* get_rest_of_line increments the line number by one,
+ so to make warnings/errors point to the correct line,
+ we decrement the line_number again. */
+ line_number--;
+
if (handling_delayed_writes && !float_type_exists (float_type))
warning (_("Requested float type %s is not previously used"), float_type);
***************
*** 183,191 ****
"type=\"%s\"", text_expansion (float_type));
xml_insert_element (LISTOFFLOATS, END);
-
- return;
}
!
! if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(float_type);
--- 187,192 ----
"type=\"%s\"", text_expansion (float_type));
xml_insert_element (LISTOFFLOATS, END);
}
! else if (!handling_delayed_writes)
{
int command_len = sizeof ("@ ") + strlen (command) + strlen
(float_type);
***************
*** 357,363 ****
float_stack = (FLOAT_ELT *) reverse_list (temp);
/* node_has_listoffloats = 1; */
! } /* handling_delayed_writes */
free (float_type);
}
--- 358,367 ----
float_stack = (FLOAT_ELT *) reverse_list (temp);
/* node_has_listoffloats = 1; */
! }
free (float_type);
+ /* Re-increment the line number, because get_rest_of_line
+ left us looking at the next line after the command. */
+ line_number++;
}
Index: index.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/index.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** index.c 12 Jan 2004 22:49:33 -0000 1.6
--- index.c 13 Jan 2004 01:01:01 -0000 1.7
***************
*** 659,681 ****
cm_printindex ()
{
if (xml && !docbook)
{
- char *index_name;
- get_rest_of_line (0, &index_name);
xml_insert_element (PRINTINDEX, START);
insert_string (index_name);
xml_insert_element (PRINTINDEX, END);
-
- return;
}
else if (!handling_delayed_writes && !docbook)
{
! char *index_name;
! char *index_command;
! int command_len;
!
! get_rest_of_line (0, &index_name);
! command_len = sizeof ("@ ") + strlen (command) + strlen (index_name);
! index_command = xmalloc (command_len);
close_paragraph ();
--- 659,680 ----
cm_printindex ()
{
+ char *index_name;
+ get_rest_of_line (0, &index_name);
+ /* get_rest_of_line increments the line number by one,
+ so to make warnings/errors point to the correct line,
+ we decrement the line_number again. */
+ line_number--;
+
+
if (xml && !docbook)
{
xml_insert_element (PRINTINDEX, START);
insert_string (index_name);
xml_insert_element (PRINTINDEX, END);
}
else if (!handling_delayed_writes && !docbook)
{
! int command_len = sizeof ("@ ") + strlen (command) + strlen
(index_name);
! char *index_command = xmalloc (command_len);
close_paragraph ();
***************
*** 691,695 ****
INDEX_ELT *last_index = 0;
INDEX_ELT **array;
- char *index_name;
unsigned line_length;
char *line;
--- 690,693 ----
***************
*** 700,705 ****
unsigned output_line_number_len;
- get_rest_of_line (0, &index_name);
-
index = index_list (index_name);
if (index == (INDEX_ELT *)-1)
--- 698,701 ----
***************
*** 885,889 ****
free (line);
- free (index_name);
me_inhibit_expansion--;
--- 881,884 ----
***************
*** 901,903 ****
--- 896,903 ----
xml_end_index ();
}
+
+ free (index_name);
+ /* Re-increment the line number, because get_rest_of_line
+ left us looking at the next line after the command. */
+ line_number++;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo float.c,1.16,1.17 index.c,1.6,1.7,
dirt <=