Commit 9d1831bb by Tristan Gingold Committed by Tristan Gingold

vmsdbgout.c (write_srccorr): Compute file length from the string.

2011-04-21  Tristan Gingold  <gingold@adacore.com>

	* vmsdbgout.c (write_srccorr): Compute file length from the string.
	(dst_file_info_struct): Remove flen field.
	(lookup_filename): Remove code that set flen field.

From-SVN: r172824
parent f199c029
2011-04-21 Tristan Gingold <gingold@adacore.com> 2011-04-21 Tristan Gingold <gingold@adacore.com>
* vmsdbgout.c (write_srccorr): Compute file length from the string.
(dst_file_info_struct): Remove flen field.
(lookup_filename): Remove code that set flen field.
2011-04-21 Tristan Gingold <gingold@adacore.com>
* config/ia64/ia64.c (ia64_start_function): Add a guard. * config/ia64/ia64.c (ia64_start_function): Add a guard.
2011-04-21 Uros Bizjak <ubizjak@gmail.com> 2011-04-21 Uros Bizjak <ubizjak@gmail.com>
......
...@@ -71,7 +71,6 @@ typedef struct dst_file_info_struct ...@@ -71,7 +71,6 @@ typedef struct dst_file_info_struct
long ebk; long ebk;
short ffb; short ffb;
char rfo; char rfo;
char flen;
} }
dst_file_info_entry; dst_file_info_entry;
...@@ -932,7 +931,7 @@ write_srccorr (int fileid, dst_file_info_entry file_info_entry, ...@@ -932,7 +931,7 @@ write_srccorr (int fileid, dst_file_info_entry file_info_entry,
int src_command_size; int src_command_size;
int linesleft = file_info_entry.max_line; int linesleft = file_info_entry.max_line;
int linestart = file_info_entry.listing_line_start; int linestart = file_info_entry.listing_line_start;
int flen = file_info_entry.flen; int flen = strlen (file_info_entry.file_name);
int linestodo = 0; int linestodo = 0;
DST_SOURCE_CORR src_header; DST_SOURCE_CORR src_header;
DST_SRC_COMMAND src_command; DST_SRC_COMMAND src_command;
...@@ -977,7 +976,7 @@ write_srccorr (int fileid, dst_file_info_entry file_info_entry, ...@@ -977,7 +976,7 @@ write_srccorr (int fileid, dst_file_info_entry file_info_entry,
src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_b_src_df_rms_rfo src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_b_src_df_rms_rfo
= file_info_entry.rfo; = file_info_entry.rfo;
src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_b_src_df_filename src_command.dst_a_src_cmd_fields.dst_a_src_decl_src.dst_b_src_df_filename
= file_info_entry.flen; = flen;
src_header.dst_a_source_corr_header.dst__header_length.dst_w_length src_header.dst_a_source_corr_header.dst__header_length.dst_w_length
= DST_K_SOURCE_CORR_HEADER_SIZE + src_command_size - 1; = DST_K_SOURCE_CORR_HEADER_SIZE + src_command_size - 1;
...@@ -1332,7 +1331,6 @@ lookup_filename (const char *file_name) ...@@ -1332,7 +1331,6 @@ lookup_filename (const char *file_name)
register char *fn; register char *fn;
register unsigned i; register unsigned i;
const char *fnam; const char *fnam;
char flen;
long long cdt = 0; long long cdt = 0;
long ebk = 0; long ebk = 0;
short ffb = 0; short ffb = 0;
...@@ -1341,7 +1339,6 @@ lookup_filename (const char *file_name) ...@@ -1341,7 +1339,6 @@ lookup_filename (const char *file_name)
int ver = 0; int ver = 0;
fnam = full_name (file_name); fnam = full_name (file_name);
flen = strlen (fnam);
/* Check to see if the file name that was searched on the previous call /* Check to see if the file name that was searched on the previous call
matches this file name. If so, return the index. */ matches this file name. If so, return the index. */
...@@ -1386,7 +1383,6 @@ lookup_filename (const char *file_name) ...@@ -1386,7 +1383,6 @@ lookup_filename (const char *file_name)
file_info_table[file_info_table_in_use].ebk = ebk; file_info_table[file_info_table_in_use].ebk = ebk;
file_info_table[file_info_table_in_use].ffb = ffb; file_info_table[file_info_table_in_use].ffb = ffb;
file_info_table[file_info_table_in_use].rfo = rfo; file_info_table[file_info_table_in_use].rfo = rfo;
file_info_table[file_info_table_in_use].flen = flen;
last_file_lookup_index = file_info_table_in_use++; last_file_lookup_index = file_info_table_in_use++;
return last_file_lookup_index; return last_file_lookup_index;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment