[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Spelling & formatting tidy ups in binutils
From: |
Nick Clifton |
Subject: |
Spelling & formatting tidy ups in binutils |
Date: |
27 May 2002 16:45:35 +0100 |
Hi Guys,
Following the recent email from Tommy Pettersson on the Swedish
translation team I am checking in the patch below to fix up some
internationalisation problems in the binutils sources.
Cheers
Nick
2002-05-27 Nick Clifton <address@hidden>
* arsup.c: Fix formatting.
* debug.c (debug_record_label): Add missing colon to error
message.
* ieee.c (parse_ieee_ty): Fix spelling typo.
* readelf.c (process_program_headers): Remove English assumption
about making a plural word.
(process_section_headers): Likewise.
(process_relocs): Allow quotes to be translated.
(process_unwind): Likewise,
(process_mips_specific): Improve error message.
(get_note_type): Fix spelling typo.
Index: binutils/arsup.c
===================================================================
RCS file: /cvs/src/src/binutils/arsup.c,v
retrieving revision 1.7
diff -c -3 -p -w -r1.7 arsup.c
*** binutils/arsup.c 26 May 2002 14:55:04 -0000 1.7
--- binutils/arsup.c 27 May 2002 15:34:43 -0000
***************
*** 1,5 ****
/* arsup.c - Archive support for MRI compatibility
! Copyright 1992, 1994, 1995, 1996, 1997, 2000
Free Software Foundation, Inc.
This file is part of GNU Binutils.
--- 1,5 ----
/* arsup.c - Archive support for MRI compatibility
! Copyright 1992, 1994, 1995, 1996, 1997, 2000, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
*************** Foundation, Inc., 59 Temple Place - Suit
*** 23,31 ****
address@hidden
This file looks after requests from arparse.y, to provide the MRI
! style librarian command syntax + 1 word LIST
!
! */
#include "bfd.h"
#include "arsup.h"
--- 23,29 ----
address@hidden
This file looks after requests from arparse.y, to provide the MRI
! style librarian command syntax + 1 word LIST. */
#include "bfd.h"
#include "arsup.h"
*************** void
*** 135,140 ****
--- 133,139 ----
DEFUN_VOID(prompt)
{
extern int interactive;
+
if (interactive)
{
printf ("AR >");
*************** maybequit ()
*** 152,199 ****
bfd *obfd;
char *real_name ;
- void
- DEFUN(ar_open,(name, t),
- char *name AND
- int t)
{
char *tname = (char *) xmalloc (strlen (name) + 10);
const char *bname = lbasename (name);
real_name = name;
/* Prepend tmp- to the beginning, to avoid file-name clashes after
truncation on filesystems with limited namespaces (DOS). */
sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname);
obfd = bfd_openw(tname, NULL);
! if (!obfd) {
! fprintf(stderr,_("%s: Can't open output archive %s\n"), program_name,
! tname);
maybequit();
}
! else {
! if (!t) {
bfd **ptr;
bfd *element;
bfd *ibfd;
ibfd = bfd_openr(name, NULL);
! if (!ibfd) {
fprintf(stderr,_("%s: Can't open input archive %s\n"),
program_name, name);
maybequit();
return;
}
! if (bfd_check_format(ibfd, bfd_archive) != true) {
! fprintf(stderr,_("%s: file %s is not an archive\n"), program_name,
! name);
maybequit();
return;
}
ptr = &(obfd->archive_head);
element = bfd_openr_next_archived_file(ibfd, NULL);
! while (element) {
*ptr = element;
ptr = &element->next;
element = bfd_openr_next_archived_file(ibfd, element);
--- 151,211 ----
bfd *obfd;
char *real_name;
+ void
+ ar_open (name, t)
+ char *name;
+ int t;
{
char *tname = (char *) xmalloc (strlen (name) + 10);
const char *bname = lbasename (name);
real_name = name;
+
/* Prepend tmp- to the beginning, to avoid file-name clashes after
truncation on filesystems with limited namespaces (DOS). */
sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
obfd = bfd_openw (tname, NULL);
! if (!obfd)
! {
! fprintf (stderr,
! _("%s: Can't open output archive %s\n"),
! program_name, tname);
maybequit ();
}
! else
! {
! if (!t)
! {
bfd **ptr;
bfd *element;
bfd *ibfd;
+
ibfd = bfd_openr (name, NULL);
!
! if (!ibfd)
! {
fprintf (stderr,_("%s: Can't open input archive %s\n"),
program_name, name);
maybequit ();
return;
}
!
! if (bfd_check_format(ibfd, bfd_archive) != true)
! {
! fprintf (stderr,
! _("%s: file %s is not an archive\n"),
! program_name, name);
maybequit ();
return;
}
+
ptr = &(obfd->archive_head);
element = bfd_openr_next_archived_file (ibfd, NULL);
! while (element)
! {
*ptr = element;
ptr = &element->next;
element = bfd_openr_next_archived_file (ibfd, element);
*************** DEFUN(ar_open,(name, t),
*** 206,220 ****
}
}
-
static void
ar_addlib_doer (abfd, prev)
bfd *abfd;
bfd *prev;
{
! /* Add this module to the output bfd */
if (prev != NULL)
prev->next = abfd->next;
abfd->next = obfd->archive_head;
obfd->archive_head = abfd;
}
--- 218,232 ----
}
}
static void
ar_addlib_doer (abfd, prev)
bfd *abfd;
bfd *prev;
{
! /* Add this module to the output bfd. */
if (prev != NULL)
prev->next = abfd->next;
+
abfd->next = obfd->archive_head;
obfd->archive_head = abfd;
}
*************** ar_addlib (name, list)
*** 237,264 ****
if (arch != NULL)
map_over_list (arch, ar_addlib_doer, list);
! /* Don't close the bfd, since it will make the elements disasppear */
}
}
void
! DEFUN(ar_addmod, (list),
! struct list *list)
{
- if (!obfd) {
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
{
! while (list) {
bfd *abfd = bfd_openr(list->name, NULL);
! if (!abfd) {
! fprintf(stderr,_("%s: can't open file %s\n"), program_name,
! list->name);
maybequit();
}
! else {
abfd->next = obfd->archive_head;
obfd->archive_head = abfd;
}
--- 249,281 ----
if (arch != NULL)
map_over_list (arch, ar_addlib_doer, list);
! /* Don't close the bfd, since it will make the elements disasppear. */
}
}
void
! ar_addmod (list)
! struct list *list;
! {
! if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
else
{
! while (list)
! {
bfd *abfd = bfd_openr (list->name, NULL);
!
! if (!abfd)
! {
! fprintf (stderr, _("%s: can't open file %s\n"),
! program_name, list->name);
maybequit ();
}
! else
! {
abfd->next = obfd->archive_head;
obfd->archive_head = abfd;
}
*************** DEFUN(ar_addmod, (list),
*** 268,327 ****
}
-
void
! DEFUN_VOID(ar_clear)
{
if (obfd)
obfd->archive_head = 0;
}
void
! DEFUN(ar_delete, (list),
! struct list *list)
{
- if (!obfd) {
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
{
! while (list) {
! /* Find this name in the archive */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
! while (member) {
! if (FILENAME_CMP(member->filename, list->name) == 0) {
*prev = member->next;
found = 1;
}
! else {
prev = &(member->next);
! }
member = member->next;
}
! if (!found) {
! fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
! list->name);
maybequit();
}
list = list->next;
}
}
}
-
void
! DEFUN_VOID(ar_save)
{
-
- if (!obfd) {
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
! else {
char *ofilename = xstrdup (bfd_get_filename (obfd));
bfd_close(obfd);
rename (ofilename, real_name);
--- 285,352 ----
}
void
! ar_clear ()
{
if (obfd)
obfd->archive_head = 0;
}
void
! ar_delete (list)
! struct list *list;
! {
! if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
else
{
! while (list)
! {
! /* Find this name in the archive. */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
!
! while (member)
! {
! if (FILENAME_CMP(member->filename, list->name) == 0)
! {
*prev = member->next;
found = 1;
}
! else
prev = &(member->next);
!
member = member->next;
}
!
! if (!found)
! {
! fprintf (stderr, _("%s: can't find module file %s\n"),
! program_name, list->name);
maybequit ();
}
+
list = list->next;
}
}
}
void
! ar_save ()
! {
! if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
! else
! {
char *ofilename = xstrdup (bfd_get_filename (obfd));
+
bfd_close (obfd);
rename (ofilename, real_name);
*************** DEFUN_VOID(ar_save)
*** 330,420 ****
}
}
-
-
void
! DEFUN(ar_replace, (list),
! struct list *list)
{
- if (!obfd) {
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
else
{
! while (list) {
! /* Find this name in the archive */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
while (member)
{
if (FILENAME_CMP(member->filename, list->name) == 0)
{
! /* Found the one to replace */
bfd *abfd = bfd_openr(list->name, 0);
if (!abfd)
{
! fprintf(stderr, _("%s: can't open file %s\n"), program_name,
list->name);
maybequit();
}
! else {
*prev = abfd;
abfd->next = member->next;
found = 1;
}
}
! else {
prev = &(member->next);
}
member = member->next;
}
! if (!found) {
bfd *abfd = bfd_openr(list->name, 0);
! fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
! list->name);
if (!abfd)
{
! fprintf(stderr, _("%s: can't open file %s\n"), program_name,
list->name);
maybequit();
}
else
- {
*prev = abfd;
}
- }
list = list->next;
}
}
}
! /* And I added this one */
void
! DEFUN_VOID(ar_list)
{
if (!obfd)
{
fprintf(stderr, _("%s: no open output archive\n"), program_name);
maybequit();
}
! else {
bfd *abfd;
outfile = stdout;
verbose =1 ;
printf(_("Current open archive is %s\n"), bfd_get_filename (obfd));
for (abfd = obfd->archive_head;
abfd != (bfd *)NULL;
abfd = abfd->next)
- {
ar_directory_doer (abfd, (bfd *) NULL);
}
}
- }
-
void
! DEFUN_VOID(ar_end)
{
if (obfd)
{
--- 355,452 ----
}
}
void
! ar_replace (list)
! struct list *list;
! {
! if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
else
{
! while (list)
! {
! /* Find this name in the archive. */
bfd *member = obfd->archive_head;
bfd **prev = &(obfd->archive_head);
int found = 0;
+
while (member)
{
if (FILENAME_CMP (member->filename, list->name) == 0)
{
! /* Found the one to replace. */
bfd *abfd = bfd_openr (list->name, 0);
+
if (!abfd)
{
! fprintf (stderr, _("%s: can't open file %s\n"),
! program_name, list->name);
maybequit ();
}
! else
! {
*prev = abfd;
abfd->next = member->next;
found = 1;
}
}
! else
! {
prev = &(member->next);
}
member = member->next;
}
!
! if (!found)
! {
bfd *abfd = bfd_openr (list->name, 0);
!
! fprintf (stderr,_("%s: can't find module file %s\n"),
! program_name, list->name);
if (!abfd)
{
! fprintf (stderr, _("%s: can't open file %s\n"),
! program_name, list->name);
maybequit ();
}
else
*prev = abfd;
}
list = list->next;
}
}
}
! /* And I added this one. */
void
! ar_list ()
{
if (!obfd)
{
fprintf (stderr, _("%s: no open output archive\n"), program_name);
maybequit ();
}
! else
! {
bfd *abfd;
+
outfile = stdout;
verbose =1 ;
printf (_("Current open archive is %s\n"), bfd_get_filename (obfd));
+
for (abfd = obfd->archive_head;
abfd != (bfd *)NULL;
abfd = abfd->next)
ar_directory_doer (abfd, (bfd *) NULL);
}
}
void
! ar_end ()
{
if (obfd)
{
*************** DEFUN_VOID(ar_end)
*** 422,443 ****
unlink(bfd_get_filename (obfd));
}
}
void
! DEFUN(ar_extract,(list),
! struct list *list)
{
if (!obfd)
{
-
fprintf(stderr, _("%s: no open archive\n"), program_name);
maybequit();
}
else
{
! while (list) {
! /* Find this name in the archive */
bfd *member = obfd->archive_head;
int found = 0;
while (member && !found)
{
if (FILENAME_CMP(member->filename, list->name) == 0)
--- 454,477 ----
unlink (bfd_get_filename (obfd));
}
}
+
void
! ar_extract (list)
! struct list *list;
{
if (!obfd)
{
fprintf (stderr, _("%s: no open archive\n"), program_name);
maybequit ();
}
else
{
! while (list)
! {
! /* Find this name in the archive. */
bfd *member = obfd->archive_head;
int found = 0;
+
while (member && !found)
{
if (FILENAME_CMP (member->filename, list->name) == 0)
*************** DEFUN(ar_extract,(list),
*** 448,459 ****
member = member->next;
}
- if (!found) {
- bfd_openr(list->name, 0);
- fprintf(stderr,_("%s: can't find module file %s\n"), program_name,
- list->name);
}
list = list->next;
}
}
--- 482,495 ----
member = member->next;
}
+ if (!found)
+ {
+ bfd_openr (list->name, 0);
+ fprintf (stderr, _("%s: can't find module file %s\n"),
+ program_name, list->name);
}
+
list = list->next;
}
}
Index: binutils/debug.c
===================================================================
RCS file: /cvs/src/src/binutils/debug.c,v
retrieving revision 1.6
diff -c -3 -p -w -r1.6 debug.c
*** binutils/debug.c 26 May 2002 14:55:04 -0000 1.6
--- binutils/debug.c 27 May 2002 15:34:44 -0000
***************
*** 1,5 ****
/* debug.c -- Handle generic debugging information.
! Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Written by Ian Lance Taylor <address@hidden>.
This file is part of GNU Binutils.
--- 1,5 ----
/* debug.c -- Handle generic debugging information.
! Copyright 1995, 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <address@hidden>.
This file is part of GNU Binutils.
*************** debug_record_label (handle, name, type,
*** 1149,1155 ****
bfd_vma addr ATTRIBUTE_UNUSED;
{
/* FIXME. */
! debug_error (_("debug_record_label not implemented"));
return false;
}
--- 1149,1155 ----
bfd_vma addr ATTRIBUTE_UNUSED;
{
/* FIXME. */
! debug_error (_("debug_record_label: not implemented"));
return false;
}
Index: binutils/ieee.c
===================================================================
RCS file: /cvs/src/src/binutils/ieee.c,v
retrieving revision 1.10
diff -c -3 -p -w -r1.10 ieee.c
*** binutils/ieee.c 26 May 2002 14:55:04 -0000 1.10
--- binutils/ieee.c 27 May 2002 15:34:45 -0000
***************
*** 1,5 ****
/* ieee.c -- Read and write IEEE-695 debugging information.
! Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <address@hidden>.
This file is part of GNU Binutils.
--- 1,5 ----
/* ieee.c -- Read and write IEEE-695 debugging information.
! Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <address@hidden>.
This file is part of GNU Binutils.
*************** parse_ieee_ty (info, pp)
*** 1916,1922 ****
switch (kind)
{
default:
! ieee_error (info, ty_start, _("unsupported qualifer"));
return false;
case 1:
--- 1916,1922 ----
switch (kind)
{
default:
! ieee_error (info, ty_start, _("unsupported qualifier"));
return false;
case 1:
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.158
diff -c -3 -p -w -r1.158 readelf.c
*** binutils/readelf.c 23 May 2002 13:12:41 -0000 1.158
--- binutils/readelf.c 27 May 2002 15:34:47 -0000
*************** process_program_headers (file)
*** 2764,2771 ****
if (do_segments)
{
! printf
! (_("\nProgram Header%s:\n"), elf_header.e_phnum > 1 ? "s" : "");
if (is_32bit_elf)
printf
--- 2764,2773 ----
if (do_segments)
{
! if (elf_header.e_phnum > 1)
! printf (_("\nProgram Headers:\n"));
! else
! printf (_("\nProgram Headers:\n"));
if (is_32bit_elf)
printf
*************** process_section_headers (file)
*** 3342,3348 ****
if (! do_sections)
return 1;
! printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : "");
if (is_32bit_elf)
printf
--- 3344,3353 ----
if (! do_sections)
return 1;
! if (elf_header.e_shnum > 1)
! printf (_("\nSection Headers:\n"));
! else
! printf (_("\nSection Header:\n"));
if (is_32bit_elf)
printf
*************** process_relocs (file)
*** 3548,3554 ****
if (string_table == NULL)
printf ("%d", section->sh_name);
else
! printf ("'%s'", SECTION_NAME (section));
printf (_(" at offset 0x%lx contains %lu entries:\n"),
rel_offset, (unsigned long) (rel_size / section->sh_entsize));
--- 3553,3559 ----
if (string_table == NULL)
printf ("%d", section->sh_name);
else
! printf (_("'%s'"), SECTION_NAME (section));
printf (_(" at offset 0x%lx contains %lu entries:\n"),
rel_offset, (unsigned long) (rel_size / section->sh_entsize));
*************** process_unwind (file)
*** 3981,3987 ****
if (string_table == NULL)
printf ("%d", unwsec->sh_name);
else
! printf ("'%s'", SECTION_NAME (unwsec));
}
else
{
--- 3986,3992 ----
if (string_table == NULL)
printf ("%d", unwsec->sh_name);
else
! printf (_("'%s'"), SECTION_NAME (unwsec));
}
else
{
*************** process_unwind (file)
*** 3995,4001 ****
if (string_table == NULL)
printf ("%d", unwsec->sh_name);
else
! printf ("'%s'", SECTION_NAME (unwsec));
printf (_(" at offset 0x%lx contains %lu entries:\n"),
(unsigned long) unwsec->sh_offset,
--- 4000,4006 ----
if (string_table == NULL)
printf ("%d", unwsec->sh_name);
else
! printf (_("'%s'"), SECTION_NAME (unwsec));
printf (_(" at offset 0x%lx contains %lu entries:\n"),
(unsigned long) unwsec->sh_offset,
*************** process_mips_specific (file)
*** 9227,9233 ****
if (dynamic_symbols == NULL)
{
! error (_("conflict list with without table"));
return 0;
}
--- 9232,9238 ----
if (dynamic_symbols == NULL)
{
! error (_("conflict list found without a dynamic symbol table"));
return 0;
}
*************** get_note_type (e_type)
*** 9310,9316 ****
case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t
structure)");
case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)");
! case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus
strcuture)");
default:
sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
return buff;
--- 9315,9321 ----
case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
case NT_LWPSTATUS: return _("NT_LWPSTATUS (lwpstatus_t
structure)");
case NT_LWPSINFO: return _("NT_LWPSINFO (lwpsinfo_t structure)");
! case NT_WIN32PSTATUS: return _("NT_WIN32PSTATUS (win32_pstatus
structure)");
default:
sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
return buff;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Spelling & formatting tidy ups in binutils,
Nick Clifton <=