[PATCH 09/13] input-scrub: make some file name arguments const
tbsaunde+binutils@tbsaunde.org
tbsaunde+binutils@tbsaunde.org
Mon Feb 22 12:28:00 GMT 2016
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
gas/ChangeLog:
2016-02-21 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* input-scrub.c (input_scrub_new_file): Make file name argument const.
(input_scrub_include_file): Likewise.
(new_logical_line_flags): Likewise.
(new_logical_line): Likewise.
* as.h: Adjust.
---
gas/as.h | 8 ++++----
gas/input-scrub.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gas/as.h b/gas/as.h
index 496ebca..3add923 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -486,10 +486,10 @@ char * app_push (void);
char * atof_ieee (char *, int, LITTLENUM_TYPE *);
char * ieee_md_atof (int, char *, int *, bfd_boolean);
char * vax_md_atof (int, char *, int *);
-char * input_scrub_include_file (char *, char *);
+char * input_scrub_include_file (const char *, char *);
void input_scrub_insert_line (const char *);
void input_scrub_insert_file (char *);
-char * input_scrub_new_file (char *);
+char * input_scrub_new_file (const char *);
char * input_scrub_next_buffer (char **bufp);
size_t do_scrub_chars (size_t (*get) (char *, size_t), char *, size_t);
int gen_to_words (LITTLENUM_TYPE *, int, long);
@@ -505,8 +505,8 @@ void do_scrub_begin (int);
void input_scrub_begin (void);
void input_scrub_close (void);
void input_scrub_end (void);
-int new_logical_line (char *, int);
-int new_logical_line_flags (char *, int, int);
+int new_logical_line (const char *, int);
+int new_logical_line_flags (const char *, int, int);
void subsegs_begin (void);
void subseg_change (segT, int);
segT subseg_new (const char *, subsegT);
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 75388d3..def9298 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -235,7 +235,7 @@ input_scrub_end (void)
Return start of caller's part of buffer. */
char *
-input_scrub_new_file (char *filename)
+input_scrub_new_file (const char *filename)
{
input_file_open (filename, !flag_no_comments);
physical_input_file = filename[0] ? filename : _("{standard input}");
@@ -250,7 +250,7 @@ input_scrub_new_file (char *filename)
input_scrub_new_file. */
char *
-input_scrub_include_file (char *filename, char *position)
+input_scrub_include_file (const char *filename, char *position)
{
next_saved_file = input_scrub_push (position);
return input_scrub_new_file (filename);
@@ -435,7 +435,7 @@ bump_line_counters (void)
Returns nonzero if the filename actually changes. */
int
-new_logical_line_flags (char *fname, /* DON'T destroy it! We point to it! */
+new_logical_line_flags (const char *fname, /* DON'T destroy it! We point to it! */
int line_number,
int flags)
{
@@ -476,7 +476,7 @@ new_logical_line_flags (char *fname, /* DON'T destroy it! We point to it! */
}
int
-new_logical_line (char *fname, int line_number)
+new_logical_line (const char *fname, int line_number)
{
return new_logical_line_flags (fname, line_number, 0);
}
--
2.7.0
More information about the Binutils
mailing list