* addr2line.c: Fix formatting.

* ar.c: Likewise.
	* arsup.c: Likewise.
	* arsup.h: Likewise.
	* binemul.c: Likewise.
	* binemul.h: Likewise.
	* bucomm.c: Likewise.
	* coffdump.c: Likewise.
	* coffgrok.c: Likewise.
	* coffgrok.h: Likewise.
This commit is contained in:
Kazu Hirata 2002-05-19 16:17:54 +00:00
parent d13351445b
commit f462a9ea21
11 changed files with 82 additions and 69 deletions

View File

@ -1,3 +1,16 @@
2002-05-19 Kazu Hirata <kazu@cs.umass.edu>
* addr2line.c: Fix formatting.
* ar.c: Likewise.
* arsup.c: Likewise.
* arsup.h: Likewise.
* binemul.c: Likewise.
* binemul.h: Likewise.
* bucomm.c: Likewise.
* coffdump.c: Likewise.
* coffgrok.c: Likewise.
* coffgrok.h: Likewise.
2002-05-16 Marek Michalkiewicz <marekm@amelek.gda.pl>
* MAINTAINERS: Add myself as the second AVR port maintainer.

View File

@ -20,10 +20,10 @@
/* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de
Usage:
Usage:
addr2line [options] addr addr ...
or
addr2line [options]
addr2line [options]
both forms write results to stdout, the second form reads addresses
to be converted from stdin. */
@ -314,14 +314,14 @@ main (argc, argv)
if (optarg != NULL)
{
enum demangling_styles style;
style = cplus_demangle_name_to_style (optarg);
if (style == unknown_demangling)
if (style == unknown_demangling)
fatal (_("unknown demangling style `%s'"),
optarg);
cplus_demangle_set_style (style);
}
}
break;
case 'e':
filename = optarg;

View File

@ -222,7 +222,7 @@ map_over_members (arch, function, files, count)
{
++match_count;
if (counted_name_mode
&& match_count != counted_name_counter)
&& match_count != counted_name_counter)
{
/* Counting, and didn't match on count; go on to the
next one. */
@ -248,7 +248,7 @@ usage (help)
FILE *s;
s = help ? stdout : stderr;
if (! is_ranlib)
{
/* xgettext:c-format */
@ -283,7 +283,7 @@ usage (help)
}
else
{
/* xgettext:c-format */
/* xgettext:c-format */
fprintf (s, _("Usage: %s [options] archive\n"), program_name);
fprintf (s, _(" Generate an index to speed access to archives\n"));
fprintf (s, _(" The options are:\n\
@ -405,14 +405,14 @@ main (argc, argv)
temp = strrchr (program_name, '/');
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (program_name, '\\');
if (temp == NULL || (bslash != NULL && bslash > temp))
temp = bslash;
if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
temp = program_name + 1;
}
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (program_name, '\\');
if (temp == NULL || (bslash != NULL && bslash > temp))
temp = bslash;
if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
temp = program_name + 1;
}
#endif
if (temp == NULL)
temp = program_name;
@ -452,7 +452,7 @@ main (argc, argv)
break;
argv += (i - 1);
argc -= (i - 1);
if (is_ranlib)
{
boolean touch = false;
@ -626,12 +626,12 @@ main (argc, argv)
if (postype != pos_default)
posname = argv[arg_index++];
if (counted_name_mode)
if (counted_name_mode)
{
if (operation != extract && operation != delete)
if (operation != extract && operation != delete)
fatal (_("`N' is only meaningful with the `x' and `d' options."));
counted_name_counter = atoi (argv[arg_index++]);
if (counted_name_counter <= 0)
if (counted_name_counter <= 0)
fatal (_("Value for `N' must be positive."));
}
@ -667,7 +667,7 @@ main (argc, argv)
if (operation == quick_append)
{
/* Note that quick appending to a non-existent archive creates it,
even if there are no files to append. */
even if there are no files to append. */
do_quick_append (inarch_filename, files);
xexit (0);
}
@ -882,7 +882,7 @@ extract_file (abfd)
long ncopied = 0;
long size;
struct stat buf;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
/* xgettext:c-format */
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
@ -891,7 +891,7 @@ extract_file (abfd)
if (size < 0)
/* xgettext:c-format */
fatal (_("stat returns negative size for %s"), bfd_get_filename (abfd));
if (verbose)
printf ("x - %s\n", bfd_get_filename (abfd));
@ -1203,11 +1203,11 @@ delete_members (arch, files_to_delete)
while (*current_ptr_ptr)
{
if (FILENAME_CMP (normalize (*files_to_delete, arch),
(*current_ptr_ptr)->filename) == 0)
(*current_ptr_ptr)->filename) == 0)
{
++match_count;
if (counted_name_mode
&& match_count != counted_name_counter)
&& match_count != counted_name_counter)
{
/* Counting, and didn't match on count; go on to the
next one. */
@ -1339,7 +1339,7 @@ replace_members (arch, files_to_move, quick)
after_bfd = get_pos_bfd (&arch->next, pos_after,
current->filename);
if (ar_emul_replace (after_bfd, *files_to_move,
if (ar_emul_replace (after_bfd, *files_to_move,
verbose))
{
/* Snip out this entry from the chain. */

View File

@ -74,7 +74,7 @@ map_over_list (arch, function, list)
boolean found = false;
bfd *prev = arch;
for (head = arch->next; head; head = head->next)
for (head = arch->next; head; head = head->next)
{
if (head->filename != NULL
&& FILENAME_CMP (ptr->name, head->filename) == 0)
@ -121,7 +121,7 @@ ar_directory (ar_name, list, output)
output = 0;
}
}
else
else
outfile = stdout;
map_over_list (arch, ar_directory_doer, list);
@ -136,23 +136,23 @@ void
DEFUN_VOID(prompt)
{
extern int interactive;
if (interactive)
if (interactive)
{
printf("AR >");
fflush(stdout);
fflush(stdout);
}
}
void
maybequit ()
{
if (! interactive)
if (! interactive)
xexit (9);
}
bfd *obfd;
char *real_name ;
char *real_name ;
void
DEFUN(ar_open,(name, t),
char *name AND
@ -250,7 +250,7 @@ DEFUN(ar_addmod, (list),
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
else
{
while (list) {
bfd *abfd = bfd_openr(list->name, NULL);
@ -273,7 +273,7 @@ DEFUN(ar_addmod, (list),
void
DEFUN_VOID(ar_clear)
{
if (obfd)
if (obfd)
obfd->archive_head = 0;
}
@ -285,7 +285,7 @@ DEFUN(ar_delete, (list),
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
else
{
while (list) {
/* Find this name in the archive */
@ -324,7 +324,7 @@ DEFUN_VOID(ar_save)
else {
char *ofilename = xstrdup (bfd_get_filename (obfd));
bfd_close(obfd);
rename (ofilename, real_name);
obfd = 0;
free(ofilename);
@ -341,20 +341,20 @@ DEFUN(ar_replace, (list),
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
else
{
while (list) {
/* Find this name in the archive */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
while (member)
while (member)
{
if (FILENAME_CMP(member->filename, list->name) == 0)
if (FILENAME_CMP(member->filename, list->name) == 0)
{
/* Found the one to replace */
bfd *abfd = bfd_openr(list->name, 0);
if (!abfd)
if (!abfd)
{
fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
maybequit();
@ -374,12 +374,12 @@ DEFUN(ar_replace, (list),
bfd *abfd = bfd_openr(list->name, 0);
fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
list->name);
if (!abfd)
if (!abfd)
{
fprintf(stderr, _("%s: can't open file %s\n"), program_name, list->name);
maybequit();
}
else
else
{
*prev = abfd;
}
@ -394,7 +394,7 @@ DEFUN(ar_replace, (list),
void
DEFUN_VOID(ar_list)
{
if (!obfd)
if (!obfd)
{
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
@ -406,7 +406,7 @@ DEFUN_VOID(ar_list)
printf(_("Current open archive is %s\n"), bfd_get_filename (obfd));
for (abfd = obfd->archive_head;
abfd != (bfd *)NULL;
abfd = abfd->next)
abfd = abfd->next)
{
ar_directory_doer (abfd, (bfd *) NULL);
}
@ -414,7 +414,7 @@ DEFUN_VOID(ar_list)
}
void
void
DEFUN_VOID(ar_end)
{
if (obfd)
@ -427,21 +427,21 @@ void
DEFUN(ar_extract,(list),
struct list *list)
{
if (!obfd)
if (!obfd)
{
fprintf(stderr, _("%s: no open archive\n"), program_name);
maybequit();
}
else
else
{
while (list) {
/* Find this name in the archive */
bfd *member = obfd->archive_head;
int found = 0;
while (member && !found)
while (member && !found)
{
if (FILENAME_CMP(member->filename, list->name) == 0)
if (FILENAME_CMP(member->filename, list->name) == 0)
{
extract_file(member);
found = 1;

View File

@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
struct list {
char *name;
char *name;
struct list *next;
};

View File

@ -108,7 +108,7 @@ ar_emul_create (abfd_out, archive_file_name, file_name)
char *file_name;
{
if (bin_dummy_emulation.ar_create)
return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
file_name);
return false;

View File

@ -50,7 +50,7 @@ extern boolean ar_emul_default_parse_arg PARAMS ((char *));
#define AR_EMUL_REPLACE_PRINT_VERBOSE(verbose, file_name) \
do { if (verbose) printf ("r - %s\n", file_name); } while (0)
typedef struct bin_emulation_xfer_struct
typedef struct bin_emulation_xfer_struct
{
/* Print out the extra options. */
void (* ar_usage) PARAMS ((FILE *fp));
@ -61,4 +61,4 @@ typedef struct bin_emulation_xfer_struct
}
bin_emulation_xfer_type;
#endif
#endif

View File

@ -257,7 +257,7 @@ parse_vma (s, arg)
const char *end;
ret = bfd_scan_vma (s, &end, 0);
if (*end != '\0')
fatal (_("%s: bad number: %s"), arg, s);

View File

@ -106,7 +106,7 @@ dump_coff_lines (p)
tab (1);
printf (_("#lines %d "),p->nlines);
for (i = 0; i < p->nlines; i++)
for (i = 0; i < p->nlines; i++)
{
printf ("(%d 0x%x)", p->lines[i], p->addresses[i]);
@ -133,7 +133,7 @@ dump_coff_type (p)
switch (p->type)
{
case coff_secdef_type:
printf ("section definition at %x size %x\n",
printf ("section definition at %x size %x\n",
p->u.asecdef.address,
p->u.asecdef.size);
nl ();
@ -427,14 +427,14 @@ dump_coff_section(ptr)
int i;
tab (1);
printf ("section %s %d %d address %x size %x number %d nrelocs %d",
printf ("section %s %d %d address %x size %x number %d nrelocs %d",
ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
ptr->number, ptr->nrelocs);
nl ();
for (i = 0; i < ptr->nrelocs; i++)
for (i = 0; i < ptr->nrelocs; i++)
{
tab (0);
tab (0);
printf ("(%x %s %x)",
ptr->relocs[i].offset,
ptr->relocs[i].symbol->name,

View File

@ -145,7 +145,7 @@ do_sections_p1 (head)
if (relsize < 0)
bfd_fatal (bfd_get_filename (abfd));
if (relsize == 0)
continue;
continue;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
if (relcount < 0)
@ -277,7 +277,7 @@ do_lines (i, name)
/* These lines are for this function - so count them and stick them on */
int c = 0;
/* Find the linenumber of the top of the function, since coff linenumbers
are relative to the start of the function. */
are relative to the start of the function. */
int start_line = rawsyms[i + 3].u.auxent.x_sym.x_misc.x_lnsz.x_lnno;
l++;
@ -605,7 +605,7 @@ doit ()
int i;
int infile = 0;
struct coff_ofile *head =
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
ofile = head;
head->source_head = 0;
head->source_tail = 0;

View File

@ -1,4 +1,4 @@
/* coffgrok.h
/* coffgrok.h
Copyright 2001 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
int addend;
};
struct coff_section
struct coff_section
{
char *name;
int code;
@ -82,7 +82,7 @@ struct coff_sfile
/* Vector which maps where in each output section
the input file has it's data */
struct coff_isection *section;
struct coff_isection *section;
};
@ -97,7 +97,7 @@ struct coff_sfile
} type;
union
{
struct
struct
{
int address;
int size;
@ -147,7 +147,7 @@ struct coff_sfile
};
struct coff_line
struct coff_line
{
int nlines;
int *lines;
@ -188,7 +188,7 @@ struct coff_sfile
coff_vis_tag,
coff_vis_member_of_struct,
coff_vis_member_of_enum,
coff_vis_autoparam,
coff_vis_autoparam,
coff_vis_regparam,
} type;
};