[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo files.c,1.7,1.8 files.h,1.3,1.4
From: |
dirt |
Subject: |
texinfo/makeinfo files.c,1.7,1.8 files.h,1.3,1.4 |
Date: |
Fri, 23 Jan 2004 16:58:38 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv22758/makeinfo
Modified Files:
files.c files.h
Log Message:
2004-01-23 Alper Ersoy <address@hidden>
* makeinfo/files.h: new input_filename member in delayed_write struct.
* makeinfo/files.c (register_delayed_write): added input_filename to
saved variables, and adjusted line_number saving.
(handle_delayed_writes): set input_filename and line_number for
correct warning and error messages.
Index: files.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/files.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** files.c 13 Jan 2004 18:43:01 -0000 1.7
--- files.c 23 Jan 2004 15:58:35 -0000 1.8
***************
*** 614,619 ****
new->command = xstrdup (delayed_command);
new->filename = xstrdup (current_output_filename);
new->position = output_position;
! new->calling_line = line_number - 1;
new->next = delayed_writes;
delayed_writes = new;
--- 614,620 ----
new->command = xstrdup (delayed_command);
new->filename = xstrdup (current_output_filename);
+ new->input_filename = xstrdup (input_filename);
new->position = output_position;
! new->calling_line = line_number;
new->next = delayed_writes;
delayed_writes = new;
***************
*** 661,666 ****
--- 662,676 ----
int output_position_at_start = output_position;
int line_number_at_start = output_line_number;
+
+ /* In order to make warnings and errors
+ refer to the correct line number. */
+ input_filename = temp->input_filename;
+ line_number = temp->calling_line;
+
execute_string ("%s", temp->command);
flush_output ();
+
+ /* Since the output file is modified, following delayed writes
+ need to be updated by this amount. */
position_shift_amount = output_position - output_position_at_start;
line_number_shift_amount = output_line_number - line_number_at_start;
***************
*** 673,676 ****
--- 683,689 ----
fs_error (temp->filename);
+ /* Done with the buffer. */
+ free (delayed_buf);
+
/* Update positions in tag table for nodes that are defined after
the line this delayed write is registered. */
***************
*** 696,701 ****
}
}
-
- free (delayed_buf);
/* Shift remaining delayed positions
--- 709,712 ----
Index: files.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/files.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** files.h 8 Jan 2004 19:15:49 -0000 1.3
--- files.h 23 Jan 2004 15:58:35 -0000 1.4
***************
*** 50,53 ****
--- 50,54 ----
char *command;
char *filename;
+ char *input_filename;
int position;
int calling_line;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo files.c,1.7,1.8 files.h,1.3,1.4,
dirt <=