- if (bfd_check_format(inarch, bfd_archive) != true)
- fatal("File %s is not an archive.", archive_filename);
- last_one = &(inarch->next);
- /* Read all the contents right away, regardless. */
- for (next_one = bfd_openr_next_archived_file(inarch, NULL);
- next_one;
- next_one = bfd_openr_next_archived_file(inarch, next_one)) {
- *last_one = next_one;
- last_one = &next_one->next;
- }
- *last_one = (bfd *) NULL;
- if (bfd_error != no_more_archived_files)
- goto bloser;
+#if BFD_SUPPORTS_PLUGINS
+ /* xgettext:c-format */
+ const char *command_line
+ = _("Usage: %s [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV]"
+ " [--plugin <name>] [member-name] [count] archive-file file...\n");
+
+#else
+ /* xgettext:c-format */
+ const char *command_line
+ = _("Usage: %s [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV]"
+ " [member-name] [count] archive-file file...\n");
+#endif
+ s = help ? stdout : stderr;
+
+ fprintf (s, command_line, program_name);
+
+ /* xgettext:c-format */
+ fprintf (s, _(" %s -M [<mri-script]\n"), program_name);
+ fprintf (s, _(" commands:\n"));
+ fprintf (s, _(" d - delete file(s) from the archive\n"));
+ fprintf (s, _(" m[ab] - move file(s) in the archive\n"));
+ fprintf (s, _(" p - print file(s) found in the archive\n"));
+ fprintf (s, _(" q[f] - quick append file(s) to the archive\n"));
+ fprintf (s, _(" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"));
+ fprintf (s, _(" s - act as ranlib\n"));
+ fprintf (s, _(" t[O][v] - display contents of the archive\n"));
+ fprintf (s, _(" x[o] - extract file(s) from the archive\n"));
+ fprintf (s, _(" command specific modifiers:\n"));
+ fprintf (s, _(" [a] - put file(s) after [member-name]\n"));
+ fprintf (s, _(" [b] - put file(s) before [member-name] (same as [i])\n"));
+ if (DEFAULT_AR_DETERMINISTIC)
+ {
+ fprintf (s, _("\
+ [D] - use zero for timestamps and uids/gids (default)\n"));
+ fprintf (s, _("\
+ [U] - use actual timestamps and uids/gids\n"));
+ }
+ else
+ {
+ fprintf (s, _("\
+ [D] - use zero for timestamps and uids/gids\n"));
+ fprintf (s, _("\
+ [U] - use actual timestamps and uids/gids (default)\n"));