* ar.c (mri_mode): Make static.

* arsup.c (obfd, real_name, outfile): Likewise.
	* binemul.c (ar_emul_create): Remove unused function.
	(ar_emul_default_create): Likewise.
	* binemul.h (ar_emul_create): Remove declaration.
	(ar_emul_default_create): Likewise.
	(struct bin_emulation_xfer_struct): Remove ar_create member.
	* bucomm.c (report): Make static.
	* bucomm.h (report): Remove declaration.
	* cxxfilt.c (mbuffer): Make static.
	(main): Use unsigned ints for some loop control variables.
	* readelf.c: Make many global variables static.
	* size.c (berkeley_format): Make static.
	(long_options): Likewise.
	* emul_aix.c (bin_aix_emulation): Remove ar_emul_default_create
	structure initialiser.
	(bin_aix5_emulation): Likewise.
	* emul_vanilla.c (bin_vanilla_emulation): Likewise.
This commit is contained in:
Ben Elliston
2005-04-29 00:03:33 +00:00
parent c7f05afbc5
commit 85b1c36d31
12 changed files with 96 additions and 124 deletions

View File

@@ -92,8 +92,7 @@ Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\
exit (status);
}
#define MBUF_SIZE 32767
char mbuffer[MBUF_SIZE];
static char mbuffer[32767];
int strip_underscore = 0;
@@ -243,19 +242,19 @@ main (int argc, char **argv)
for (;;)
{
int i = 0;
unsigned i = 0;
c = getchar ();
/* Try to read a label. */
while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
{
if (i >= MBUF_SIZE-1)
if (i >= sizeof (mbuffer) - 1)
break;
mbuffer[i++] = c;
c = getchar ();
}
if (i > 0)
{
int skip_first = 0;
unsigned skip_first = 0;
mbuffer[i] = 0;
if (mbuffer[0] == '.' || mbuffer[0] == '$')