diff options
author | Alan Modra <amodra@gmail.com> | 2012-06-07 12:47:23 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-06-07 12:47:23 +0000 |
commit | 39a45edc073226e748566b497c216830cec119c4 (patch) | |
tree | bd35d385584a6fcaca5e6a40a9933b33cafe1b2d /gas/read.c | |
parent | fb1b895daad773efd7dc023f913678e9c80d8c3a (diff) | |
download | gdb-39a45edc073226e748566b497c216830cec119c4.zip gdb-39a45edc073226e748566b497c216830cec119c4.tar.gz gdb-39a45edc073226e748566b497c216830cec119c4.tar.bz2 |
PR gas/14201
* sb.h (sb_max_power_two): Delete.
(struct sb): Delete "item" and "pot". Make "len" a size_t. Add "max".
(sb_element): Delete.
(sb_add_char, sb_add_buffer, sb_skip_comma, sb_skip_write): Update
prototypes.
* sb.c (string_count, free_list): Delete.
(sb_build, sb_kill, sb_check): Rewrite.
(scrub_from_sb, sb_add_char, sb_add_string, sb_add_buffer,
sb_skip_white, sb_skip_comma): Replace assorted int params,
vars and return types with size_t.
* input-scrub.c: Likewise.
* macro.c: Likewise.
* macro.h: Likewise.
* as.c: Likewise.
* as.h: Likewise.
* input-file.h: Likewise.
* input-file.c: Likewise.
* read.c: Likewise.
* app.c: ..or ptrdiff_t.
* input-file.c (input_file_get): Use ferror.
(input_file_give_next_buffer): Use input_file_get.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -251,7 +251,7 @@ static void s_reloc (int); static int hex_float (int, char *); static segT get_known_segmented_expression (expressionS * expP); static void pobegin (void); -static int get_non_macro_line_sb (sb *); +static size_t get_non_macro_line_sb (sb *); static void generate_file_debug (void); static char *_find_end_of_line (char *, int, int, int); @@ -579,10 +579,10 @@ pobegin (void) static char *scrub_string; static char *scrub_string_end; -static int -scrub_from_string (char *buf, int buflen) +static size_t +scrub_from_string (char *buf, size_t buflen) { - int copy; + size_t copy; copy = scrub_string_end - scrub_string; if (copy > buflen) @@ -1235,8 +1235,8 @@ read_a_source_file (char *name) new_tmp = new_buf; for (;;) { - int space; - int size; + size_t space; + size_t size; space = (new_buf + new_length) - new_tmp; size = do_scrub_chars (scrub_from_string, new_tmp, space); @@ -2748,13 +2748,13 @@ get_line_sb (sb *line, int in_macro) return *input_line_pointer++; } -static int +static size_t get_non_macro_line_sb (sb *line) { return get_line_sb (line, 0); } -static int +static size_t get_macro_line_sb (sb *line) { return get_line_sb (line, 1); |