aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-02-26 21:38:04 +0000
committerStan Shebs <shebs@codesourcery.com>1994-02-26 21:38:04 +0000
commit6eb243a23dbcd79aa5672ac43db0c7749ad7bccf (patch)
tree196b68a340235673068de4b0ef4bbe9ca1f3d7bc /binutils/ar.c
parentedd9075caff5c19967ee23c38b8deef4c65e7969 (diff)
downloadgdb-6eb243a23dbcd79aa5672ac43db0c7749ad7bccf.zip
gdb-6eb243a23dbcd79aa5672ac43db0c7749ad7bccf.tar.gz
gdb-6eb243a23dbcd79aa5672ac43db0c7749ad7bccf.tar.bz2
Sat Feb 26 13:35:26 1994 Stan Shebs (shebs@andros.cygnus.com)
* ar.c (do_quick_append): Pad with a genuine character 10, rather than whatever '\n' might happen to be.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 96f4213..b968c89 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -230,11 +230,12 @@ main (argc, argv)
char *temp;
int show_version;
+ program_name = argv[0];
+ xmalloc_set_program_name (program_name);
+
bfd_init ();
show_version = 0;
- program_name = argv[0];
-
temp = strrchr (program_name, '/');
if (temp == (char *) NULL)
temp = program_name; /* shouldn't happen, but... */
@@ -449,7 +450,7 @@ open_inarch (archive_filename)
bfd **last_one;
bfd *next_one;
struct stat sbuf;
- bfd_error = no_error;
+ bfd_set_error (bfd_error_no_error);
if (stat (archive_filename, &sbuf) != 0)
{
@@ -496,7 +497,7 @@ open_inarch (archive_filename)
last_one = &next_one->next;
}
*last_one = (bfd *) NULL;
- if (bfd_error != no_more_archived_files)
+ if (bfd_get_error () != bfd_error_no_more_archived_files)
goto bloser;
return 1;
}
@@ -643,7 +644,7 @@ do_quick_append (archive_filename, files_to_append)
bfd *temp;
struct stat sbuf;
boolean newfile = false;
- bfd_error = no_error;
+ bfd_set_error (bfd_error_no_error);
if (stat (archive_filename, &sbuf) != 0)
{
@@ -727,7 +728,7 @@ do_quick_append (archive_filename, files_to_append)
}
fclose (ifile);
if ((sbuf.st_size % 2) == 1)
- putc ('\n', ofile);
+ putc ('\012', ofile);
}
fclose (ofile);
bfd_close (temp);