(GENERIC_OBJS): Likewise, remove bignum-copy.o.
(bignum-copy.o): Remove.
* Makefile.in: Regenerate.
* makefile.vms (OBJS): Remove bignum-copy.obj.
* symbols.h (local_symbol_make): Remove declaration.
(verify_symbol_chain_2): Likewise.
* symbols.c (local_symbol_make): Make static.
(max_indent_level): Likewise.
(verify_symbol_chain_2): Remove.
* macro.c (macro_hash): Make static.
* messages.c (fprint_value): Remove.
* read.h (get_absolute_expr): Remove.
(emit_leb128_expr): Likewise.
(do_s_func): Likewise.
* read.c (do_s_func): Make static.
(emit_leb128_expr): Likewise.
(get_absolute_expr): Likewise.
* as.h (as_howmuch): Remove declaration.
(fprint_value): Likewise.
* as.c (myname): Make static.
* input-scrub.c (as_howmuch): Remove.
(as_1_char): Likewise.
* input-file.h (input_file_is_open): Remove.
* input-file.c (input_file_is_open): Likewise.
* expr.h (expr_build_unary): Remove declaration.
(expr_build_binary): Likewise.
* expr.c (expr_build_unary): Remove.
(expr_build_binary): Likewise.
* hash.h (hash_replace): Remove declaration.
(hash_delete): Likewise.
* hash.c (hash_replace): Remove.
(hash_delete): Likewise.
* bignum-copy.c (bignum_copy): Move from here ..
* config/tc-vax.c (bignum_copy): .. to here.
* bignum.h (LOG_TO_BASE_2_OF_10): Remove.
(bignum_copy): Remove extern declaration.
* sb.h (string_count): Remove extern declaration.
(sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
(sb_name): Likewise.
* sb.c (dsize): Replace preprocessor macro with static int.
(string_count): Make static.
(sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
(sb_name): Likewise.
* config/obj-coff.c (dim_index): Make static.
* config/tc-i386.c (GOT_symbol): Likewise.
(output_invalid_buf): Likewise.
* doc/internals.texi (Warning and error messages): Remove the
prototype for fprint_value.
+2005-04-29 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.am (GAS_CFILES): Remove bignum-copy.c.
+ (GENERIC_OBJS): Likewise, remove bignum-copy.o.
+ (bignum-copy.o): Remove.
+ * Makefile.in: Regenerate.
+ * makefile.vms (OBJS): Remove bignum-copy.obj.
+ * symbols.h (local_symbol_make): Remove declaration.
+ (verify_symbol_chain_2): Likewise.
+ * symbols.c (local_symbol_make): Make static.
+ (max_indent_level): Likewise.
+ (verify_symbol_chain_2): Remove.
+ * macro.c (macro_hash): Make static.
+ * messages.c (fprint_value): Remove.
+ * read.h (get_absolute_expr): Remove.
+ (emit_leb128_expr): Likewise.
+ (do_s_func): Likewise.
+ * read.c (do_s_func): Make static.
+ (emit_leb128_expr): Likewise.
+ (get_absolute_expr): Likewise.
+ * as.h (as_howmuch): Remove declaration.
+ (fprint_value): Likewise.
+ * as.c (myname): Make static.
+ * input-scrub.c (as_howmuch): Remove.
+ (as_1_char): Likewise.
+ * input-file.h (input_file_is_open): Remove.
+ * input-file.c (input_file_is_open): Likewise.
+ * expr.h (expr_build_unary): Remove declaration.
+ (expr_build_binary): Likewise.
+ * expr.c (expr_build_unary): Remove.
+ (expr_build_binary): Likewise.
+ * hash.h (hash_replace): Remove declaration.
+ (hash_delete): Likewise.
+ * hash.c (hash_replace): Remove.
+ (hash_delete): Likewise.
+ * bignum-copy.c (bignum_copy): Move from here ..
+ * config/tc-vax.c (bignum_copy): .. to here.
+ * bignum.h (LOG_TO_BASE_2_OF_10): Remove.
+ (bignum_copy): Remove extern declaration.
+ * sb.h (string_count): Remove extern declaration.
+ (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
+ (sb_name): Likewise.
+ * sb.c (dsize): Replace preprocessor macro with static int.
+ (string_count): Make static.
+ (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise.
+ (sb_name): Likewise.
+ * config/obj-coff.c (dim_index): Make static.
+ * config/tc-i386.c (GOT_symbol): Likewise.
+ (output_invalid_buf): Likewise.
+ * doc/internals.texi (Warning and error messages): Remove the
+ prototype for fprint_value.
+
2005-04-27 Ben Elliston <bje@au.ibm.com>
* link.cmd: Remove.
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h hash.h \
$(INCDIR)/elf/dwarf2.h $(BFDVER_H)
atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
CONFIG_CLEAN_FILES = gdb.ini .gdbinit po/Makefile.in
PROGRAMS = $(noinst_PROGRAMS)
am__objects_1 = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \
- bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \
- dwarf2dbg.$(OBJEXT) dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) \
- ehopt.$(OBJEXT) expr.$(OBJEXT) flonum-copy.$(OBJEXT) \
- flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) frags.$(OBJEXT) \
- hash.$(OBJEXT) input-file.$(OBJEXT) input-scrub.$(OBJEXT) \
- listing.$(OBJEXT) literal.$(OBJEXT) macro.$(OBJEXT) \
- messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \
- sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) \
- symbols.$(OBJEXT) write.$(OBJEXT)
+ cond.$(OBJEXT) depend.$(OBJEXT) dwarf2dbg.$(OBJEXT) \
+ dw2gencfi.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) \
+ expr.$(OBJEXT) flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) \
+ flonum-mult.$(OBJEXT) frags.$(OBJEXT) hash.$(OBJEXT) \
+ input-file.$(OBJEXT) input-scrub.$(OBJEXT) listing.$(OBJEXT) \
+ literal.$(OBJEXT) macro.$(OBJEXT) messages.$(OBJEXT) \
+ output-file.$(OBJEXT) read.$(OBJEXT) sb.$(OBJEXT) \
+ stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \
+ write.$(OBJEXT)
am_as_new_OBJECTS = $(am__objects_1)
as_new_OBJECTS = $(am_as_new_OBJECTS)
am__DEPENDENCIES_1 = tc-@target_cpu_type@.o
app.c \
as.c \
atof-generic.c \
- bignum-copy.c \
cond.c \
depend.c \
dwarf2dbg.c \
app.o \
as.o \
atof-generic.o \
- bignum-copy.o \
cond.o \
depend.o \
dwarf2dbg.o \
output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h hash.h \
$(INCDIR)/elf/dwarf2.h $(BFDVER_H)
atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
-bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
depend.o: depend.c $(INCDIR)/symcat.h
dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
int max_macro_nest = 100;
/* argv[0] */
-char * myname;
+static char * myname;
/* The default obstack chunk size. If we set this to zero, the
obstack code will use whatever will fit in a 4096 byte block. */
void as_assert (const char *, int, const char *);
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
-void fprint_value (FILE *, addressT);
void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);
void cond_exit_macro (int);
int seen_at_least_1_file (void);
void app_pop (char *);
-void as_howmuch (FILE *);
void as_perror (const char *, const char *);
void as_where (char **, unsigned int *);
void bump_line_counters (void);
+++ /dev/null
-/* bignum_copy.c - copy a bignum
- Copyright 1987, 1990, 1991, 1992, 1993, 2000, 2003
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "as.h"
-
-/*
- * bignum_copy ()
- *
- * Copy a bignum from in to out.
- * If the output is shorter than the input, copy lower-order littlenums.
- * Return 0 or the number of significant littlenums dropped.
- * Assumes littlenum arrays are densely packed: no unused chars between
- * the littlenums. Uses memcpy() to move littlenums, and wants to
- * know length (in chars) of the input bignum.
- */
-
-/* void */
-int
-bignum_copy (register LITTLENUM_TYPE *in,
- register int in_length, /* in sizeof(littlenum)s */
- register LITTLENUM_TYPE *out,
- register int out_length /* in sizeof(littlenum)s */)
-{
- int significant_littlenums_dropped;
-
- if (out_length < in_length)
- {
- LITTLENUM_TYPE *p; /* -> most significant (non-zero) input
- littlenum. */
-
- memcpy ((void *) out, (void *) in,
- (unsigned int) out_length << LITTLENUM_SHIFT);
- for (p = in + in_length - 1; p >= in; --p)
- {
- if (*p)
- break;
- }
- significant_littlenums_dropped = p - in - in_length + 1;
-
- if (significant_littlenums_dropped < 0)
- {
- significant_littlenums_dropped = 0;
- }
- }
- else
- {
- memcpy ((char *) out, (char *) in,
- (unsigned int) in_length << LITTLENUM_SHIFT);
-
- if (out_length > in_length)
- {
- memset ((char *) (out + in_length),
- '\0',
- (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT);
- }
-
- significant_littlenums_dropped = 0;
- }
-
- return (significant_littlenums_dropped);
-} /* bignum_copy() */
-
-/* end of bignum-copy.c */
/* bignum.h-arbitrary precision integers
- Copyright 1987, 1992, 2003 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2003, 2005 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#endif
typedef unsigned short LITTLENUM_TYPE;
-
-/* JF truncated this to get around a problem with GCC */
-#define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
-/* WARNING: I haven't checked that the trailing digits are correct! */
-
-/* lengths are in sizeof(littlenum)s */
-
-int bignum_copy (LITTLENUM_TYPE * in, int in_length,
- LITTLENUM_TYPE * out, int out_length);
-
-/* end of bignum.h */
SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug));
}
-unsigned int dim_index;
+static unsigned int dim_index;
static void
obj_coff_endef (int ignore ATTRIBUTE_UNUSED)
static unsigned int no_cond_jump_promotion = 0;
/* Pre-defined "_GLOBAL_OFFSET_TABLE_". */
-symbolS *GOT_symbol;
+static symbolS *GOT_symbol;
/* The dwarf2 return column, adjusted for 32 or 64 bit. */
unsigned int x86_dwarf2_return_column;
return 0;
}
\f
-char output_invalid_buf[8];
+static char output_invalid_buf[8];
static char *
output_invalid (c)
}
return retval;
}
+
+/*
+ * Copy a bignum from in to out.
+ * If the output is shorter than the input, copy lower-order
+ * littlenums. Return 0 or the number of significant littlenums
+ * dropped. Assumes littlenum arrays are densely packed: no unused
+ * chars between the littlenums. Uses memcpy() to move littlenums, and
+ * wants to know length (in chars) of the input bignum.
+ */
+
+static int
+bignum_copy (register LITTLENUM_TYPE *in,
+ register int in_length, /* in sizeof(littlenum)s */
+ register LITTLENUM_TYPE *out,
+ register int out_length /* in sizeof(littlenum)s */)
+{
+ int significant_littlenums_dropped;
+
+ if (out_length < in_length)
+ {
+ LITTLENUM_TYPE *p; /* -> most significant (non-zero) input
+ littlenum. */
+
+ memcpy ((void *) out, (void *) in,
+ (unsigned int) out_length << LITTLENUM_SHIFT);
+ for (p = in + in_length - 1; p >= in; --p)
+ {
+ if (*p)
+ break;
+ }
+ significant_littlenums_dropped = p - in - in_length + 1;
+
+ if (significant_littlenums_dropped < 0)
+ {
+ significant_littlenums_dropped = 0;
+ }
+ }
+ else
+ {
+ memcpy ((char *) out, (char *) in,
+ (unsigned int) in_length << LITTLENUM_SHIFT);
+
+ if (out_length > in_length)
+ {
+ memset ((char *) (out + in_length),
+ '\0',
+ (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT);
+ }
+
+ significant_littlenums_dropped = 0;
+ }
+
+ return (significant_littlenums_dropped);
+}
\f
/* vax:md_assemble() emit frags for 1 instruction */
original filename and line number that they are applicable to.
@end deftypefun
-@deftypefun @{@} void fprint_value (FILE *@var{file}, valueT @var{val})
-@deftypefunx @{@} void sprint_value (char *@var{buf}, valueT @var{val})
-These functions are helpful for converting a @code{valueT} value into printable
+@deftypefun @{@} void sprint_value (char *@var{buf}, valueT @var{val})
+This function is helpful for converting a @code{valueT} value into printable
format, in case it's wider than modes that @code{*printf} can handle. If the
type is narrow enough, a decimal number will be produced; otherwise, it will be
in hexadecimal. The value itself is not examined to make this determination.
return make_expr_symbol (&e);
}
-/* Build an expression for OP s1. */
-
-symbolS *
-expr_build_unary (operatorT op, symbolS *s1)
-{
- expressionS e;
-
- e.X_op = op;
- e.X_add_symbol = s1;
- e.X_add_number = 0;
- return make_expr_symbol (&e);
-}
-
-/* Build an expression for s1 OP s2. */
-
-symbolS *
-expr_build_binary (operatorT op, symbolS *s1, symbolS *s2)
-{
- expressionS e;
-
- e.X_op = op;
- e.X_add_symbol = s1;
- e.X_op_symbol = s2;
- e.X_add_number = 0;
- return make_expr_symbol (&e);
-}
-
/* Build an expression for the current location ('.'). */
symbolS *
0 /* sign. */
};
-/* If nonzero, we've been asked to assemble nan, +inf or -inf. */
-int generic_floating_point_magic;
\f
static void
floating_constant (expressionS *expressionP)
extern int expr_symbol_where (symbolS *, char **, unsigned int *);
extern symbolS *expr_build_uconstant (offsetT);
-extern symbolS *expr_build_unary (operatorT, symbolS *);
-extern symbolS *expr_build_binary (operatorT, symbolS *, symbolS *);
extern symbolS *expr_build_dot (void);
return NULL;
}
-/* Replace an existing entry in a hash table. This returns the old
- value stored for the entry. If the entry is not found in the hash
- table, this does nothing and returns NULL. */
-
-PTR
-hash_replace (struct hash_control *table, const char *key, PTR value)
-{
- struct hash_entry *p;
- PTR ret;
-
- p = hash_lookup (table, key, NULL, NULL);
- if (p == NULL)
- return NULL;
-
-#ifdef HASH_STATISTICS
- ++table->replacements;
-#endif
-
- ret = p->data;
-
- p->data = value;
-
- return ret;
-}
-
/* Find an entry in a hash table, returning its value. Returns NULL
if the entry is not found. */
return p->data;
}
-/* Delete an entry from a hash table. This returns the value stored
- for that entry, or NULL if there is no such entry. */
-
-PTR
-hash_delete (struct hash_control *table, const char *key)
-{
- struct hash_entry *p;
- struct hash_entry **list;
-
- p = hash_lookup (table, key, &list, NULL);
- if (p == NULL)
- return NULL;
-
- if (p != *list)
- abort ();
-
-#ifdef HASH_STATISTICS
- ++table->deletions;
-#endif
-
- *list = p->next;
-
- /* Note that we never reclaim the memory for this entry. If gas
- ever starts deleting hash table entries in a big way, this will
- have to change. */
-
- return p->data;
-}
-
/* Traverse a hash table. Call the function on every entry in the
hash table. */
extern const char *hash_jam (struct hash_control *,
const char *key, PTR value);
-/* Replace an existing entry in a hash table. This returns the old
- value stored for the entry. If the entry is not found in the hash
- table, this does nothing and returns NULL. */
-
-extern PTR hash_replace (struct hash_control *, const char *key,
- PTR value);
-
/* Find an entry in a hash table, returning its value. Returns NULL
if the entry is not found. */
extern PTR hash_find (struct hash_control *, const char *key);
-/* Delete an entry from a hash table. This returns the value stored
- for that entry, or NULL if there is no such entry. */
-
-extern PTR hash_delete (struct hash_control *, const char *key);
-
/* Traverse a hash table. Call the function on every entry in the
hash table. */
return (BUFFER_SIZE);
}
-int
-input_file_is_open (void)
-{
- return f_in != (FILE *) 0;
-}
-
/* Push the state of our input, returning a pointer to saved info that
can be restored with input_file_pop (). */
char *input_file_give_next_buffer (char *where);
char *input_file_push (void);
unsigned int input_file_buffer_size (void);
-int input_file_is_open (void);
void input_file_begin (void);
void input_file_close (void);
void input_file_end (void);
static struct input_save *input_scrub_push (char *saved_position);
static char *input_scrub_pop (struct input_save *arg);
-static void as_1_char (unsigned int c, FILE * stream);
/* Saved information about the file that .include'd this one. When we hit EOF,
we automatically pop to that file. */
*linep = 0;
}
}
-\f
-/* Output to given stream how much of line we have scanned so far.
- Assumes we have scanned up to and including input_line_pointer.
- No free '\n' at end of line. */
-
-void
-as_howmuch (FILE *stream /* Opened for write please. */)
-{
- register char *p; /* Scan input line. */
-
- for (p = input_line_pointer - 1; *p != '\n'; --p)
- {
- }
- ++p; /* p->1st char of line. */
- for (; p <= input_line_pointer; p++)
- {
- /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */
- as_1_char ((unsigned char) *p, stream);
- }
-}
-
-static void
-as_1_char (unsigned int c, FILE *stream)
-{
- if (c > 127)
- {
- (void) putc ('%', stream);
- c -= 128;
- }
- if (c < 32)
- {
- (void) putc ('^', stream);
- c += '@';
- }
- (void) putc (c, stream);
-}
/* The macro hash table. */
-struct hash_control *macro_hash;
+static struct hash_control *macro_hash;
/* Whether any macros have been defined. */
/* Support routines. */
-void
-fprint_value (FILE *file, valueT val)
-{
- if (sizeof (val) <= sizeof (long))
- {
- fprintf (file, "%ld", (long) val);
- return;
- }
-#ifdef BFD_ASSEMBLER
- if (sizeof (val) <= sizeof (bfd_vma))
- {
- fprintf_vma (file, val);
- return;
- }
-#endif
- abort ();
-}
-
void
sprint_value (char *buf, valueT val)
{
#endif
#endif
+static void do_s_func (int end_p, const char *default_prefix);
static void do_align (int, char *, int, int);
static void s_align (int, int);
static void s_altmacro (int);
{NULL, NULL, 0} /* End sentinel. */
};
+static offsetT
+get_absolute_expr (expressionS *exp)
+{
+ expression (exp);
+ if (exp->X_op != O_constant)
+ {
+ if (exp->X_op != O_absent)
+ as_bad (_("bad or irreducible absolute expression"));
+ exp->X_add_number = 0;
+ }
+ return exp->X_add_number;
+}
+
+offsetT
+get_absolute_expression (void)
+{
+ expressionS exp;
+
+ return get_absolute_expr (&exp);
+}
+
static int pop_override_ok = 0;
static const char *pop_table_name;
/* Generate the appropriate fragments for a given expression to emit a
leb128 value. */
-void
+static void
emit_leb128_expr (expressionS *exp, int sign)
{
operatorT op = exp->X_op;
return (retval);
}
-offsetT
-get_absolute_expr (expressionS *exp)
-{
- expression (exp);
- if (exp->X_op != O_constant)
- {
- if (exp->X_op != O_absent)
- as_bad (_("bad or irreducible absolute expression"));
- exp->X_add_number = 0;
- }
- return exp->X_add_number;
-}
-
-offsetT
-get_absolute_expression (void)
-{
- expressionS exp;
-
- return get_absolute_expr (&exp);
-}
-
char /* Return terminator. */
get_absolute_expression_and_terminator (long *val_pointer /* Return value of expression. */)
{
/* Subroutine of s_func so targets can choose a different default prefix.
If DEFAULT_PREFIX is NULL, use the target's "leading char". */
-void
+static void
do_s_func (int end_p, const char *default_prefix)
{
/* Record the current function so that we can issue an error message for
extern char *demand_copy_string (int *lenP);
extern char *demand_copy_C_string (int *len_pointer);
extern char get_absolute_expression_and_terminator (long *val_pointer);
-extern offsetT get_absolute_expr (expressionS *);
extern offsetT get_absolute_expression (void);
extern unsigned int next_char_of_string (void);
extern void s_mri_sect (char *);
extern void cons (int nbytes);
extern void demand_empty_rest_of_line (void);
extern void emit_expr (expressionS *exp, unsigned int nbytes);
-extern void emit_leb128_expr (expressionS *, int);
extern void equals (char *sym_name, int reassign);
extern void float_cons (int float_type);
extern void ignore_rest_of_line (void);
extern void s_fill (int);
extern void s_float_space (int mult);
extern void s_func (int);
-extern void do_s_func (int, const char *);
extern void s_globl (int arg);
extern void s_if (int arg);
extern void s_ifc (int arg);
*/
-#define dsize 5
-
+static int dsize = 5;
static void sb_check (sb *, int);
/* Statistics of sb structures. */
-
-int string_count[sb_max_power_two];
+static int string_count[sb_max_power_two];
/* Free list of sb structures. */
-
static sb_list_vector free_list;
/* initializes an sb. */
-void
+static void
sb_build (sb *ptr, int size)
{
/* see if we can find one to allocate */
ptr->len += len;
}
-/* add string at s of length len to sb at ptr */
-
-void
-sb_add_buffer (sb *ptr, const char *s, int len)
-{
- sb_check (ptr, len);
- memcpy (ptr->ptr + ptr->len, s, len);
- ptr->len += len;
-}
-
-/* print the sb at ptr to the output file */
-
-void
-sb_print (FILE *outfile, sb *ptr)
-{
- int i;
- int nc = 0;
-
- for (i = 0; i < ptr->len; i++)
- {
- if (nc)
- {
- fprintf (outfile, ",");
- }
- fprintf (outfile, "%d", ptr->ptr[i]);
- nc = 1;
- }
-}
-
-void
-sb_print_at (FILE *outfile, int idx, sb *ptr)
-{
- int i;
- for (i = idx; i < ptr->len; i++)
- putc (ptr->ptr[i], outfile);
-}
-
-/* put a null at the end of the sb at in and return the start of the
- string, so that it can be used as an arg to printf %s. */
-
-char *
-sb_name (sb *in)
-{
- /* stick a null on the end of the string */
- sb_add_char (in, 0);
- return in->ptr;
-}
-
/* like sb_name, but don't include the null byte in the string. */
char *
sb_element *size[sb_max_power_two];
} sb_list_vector;
-extern int string_count[sb_max_power_two];
-
-extern void sb_build (sb *, int);
extern void sb_new (sb *);
extern void sb_kill (sb *);
extern void sb_add_sb (sb *, sb *);
extern void sb_reset (sb *);
extern void sb_add_char (sb *, int);
extern void sb_add_string (sb *, const char *);
-extern void sb_add_buffer (sb *, const char *, int);
-extern void sb_print (FILE *, sb *);
-extern void sb_print_at (FILE *, int, sb *);
-extern char *sb_name (sb *);
extern char *sb_terminate (sb *);
extern int sb_skip_white (int, sb *);
extern int sb_skip_comma (int, sb *);
/* Create a local symbol and insert it into the local hash table. */
-struct local_symbol *
+static struct local_symbol *
local_symbol_make (const char *name, segT section, valueT value, fragS *frag)
{
char *name_copy;
assert (lastP == symbolP);
}
-void
-verify_symbol_chain_2 (symbolS *sym)
-{
- symbolS *p = sym, *n = sym;
-#ifdef SYMBOLS_NEED_BACKPOINTERS
- while (symbol_previous (p))
- p = symbol_previous (p);
-#endif
- while (symbol_next (n))
- n = symbol_next (n);
- verify_symbol_chain (p, n);
-}
-
static void
report_op_error (symbolS *symp, symbolS *left, symbolS *right)
{
/* Maximum indent level.
Available for modification inside a gdb session. */
-int max_indent_level = 8;
+static int max_indent_level = 8;
void
print_symbol_value_1 (FILE *file, symbolS *sym)
fragS * frag);
symbolS *symbol_create (const char *name, segT segment, valueT value,
fragS * frag);
-struct local_symbol *local_symbol_make (const char *name, segT section,
- valueT value, fragS * frag);
symbolS *symbol_temp_new (segT, valueT, fragS *);
symbolS *symbol_temp_new_now (void);
symbolS *symbol_temp_make (void);
#endif /* SYMBOLS_NEED_BACKPOINTERS */
void verify_symbol_chain (symbolS * rootP, symbolS * lastP);
-void verify_symbol_chain_2 (symbolS * symP);
void symbol_append (symbolS * addme, symbolS * target,
symbolS ** rootP, symbolS ** lastP);