replacing a member, and 'a' when adding one.
* ar.c (truncate): New static variable.
(normalize): Change return type to const char *. Add abfd
argument. Change all callers. If truncate, chop the filename to
abfd->ar_max_namelen.
(main): For the 'f' modifier, set truncate to true. Don't change
quick_append to replace to truncate is true.
(do_quick_append): If truncate, set BFD_TRADITIONAL_FORMAT.
(write_archive): Likewise.
* binutils.texi, ar.1: Document 'f' modifier.
PR 6888.
Malloc buffers rather than allocate on stack (so it works
on NT).
* deflex.l: Names can have an @ in them.
* dlltool.c: Loads of stuff. Can now generate .imp files which
work with NT .dlls.
(inarch): Remove variable.
(map_over_members): Make static. Add arch argument, and use it
instead of inarch. Change all callers.
(main): Treat --version as -v. Accept -t argument. Accept any
number of archive arguments. Catch and use open_inarch return
value, rather than using inarch.
(open_inarch): Return newly opened BFD, rather than using inarch.
(do_quick_append): Make archive_filename const.
(write_archive): Add iarch argument, and use it instead of inarch.
Change all callers.
(delete_members, move_members, replace_members): Likewise.
(ranlib_only): Don't exit on success. Catch and use open_inarch
return value.
(ranlib_touch): New function.
* arsup.h (map_over_members): Don't declare.
(ar_end, ar_extract): Declare.
(open_inarch): Change return value in declaration to bfd *.
* arsup.c (map_over_list): Make static. Always pass two arguments
to function. Add arch argument, and use it instead of inarch.
Change all callers.
(ar_directory_doer): Make static. Add ignored second argument.
Change all callers.
(ar_directory): Use open_inarch return value rather than inarch.
(ar_addlib_doer): Make static.
(ar_addlib): Use open_inarch return value rather than inarch.
(ar_extract): Remove unused local variable abfd.
* ar.c (print_contents, extract_file), size.c
(print_berkeley_format): Use bfd_get_filename and
bfd_my_archive instead of dereferencing the structs directly.
if ambiguous match.
* nm.c (display_file), size.c (display_bfd): Eliminate gotos.
Print matching formats if there is an ambiguous match. Use
bfd_nonfatal instead of hardcoded error message if nothing matches.
* arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of
abfd->filename.
* nm.c (display_archive): New function, from code in display_file.
(display_rel_file): Renamed from do_one_rel_file.
* size.c: Indent.
(display_archive): New function from code in display_file.
(display_file): Check bfd_close error return.
* strings.c (strings_object_file): Check bfd_check_format
error return.
* strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror.
* bucomm.c: Delete references to exit_handler. It wasn't set
anywhere, and now that we're using the libiberty xmalloc, it
wouldn't always get called before exiting.
(list_matching_formats): Function moved from objdump.c.
* bucomm.h: Declare it.
* objdump.c (disassemble_data): Move some variable decls closer to
their use. Add some comments. Replace a nested block with a
return.
* ar.c (main): Put parens around assignment used as truth value.
* objdump.c (display_bfd): Declare return value as void.
(stab_print): Use "" instead of 0 to initialize array.
(dump_stabs_1): Print vma using printf_vma.
(display_info): Put parens around assignment used as truth value.
* strings.c (print_strings): Cast printf arguments.
* arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils.
It still remains as a local macro in gmalloc.c, which is derived
from some other copy of GNU Malloc somewhere (FIXME).
* ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static
fns really static.
* arsup.h: Declare extract_files.