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... */
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)
{
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;
}
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)
{
}
fclose (ifile);
if ((sbuf.st_size % 2) == 1)
- putc ('\n', ofile);
+ putc ('\012', ofile);
}
fclose (ofile);
bfd_close (temp);
{
/* Move this file to the end of the list - first cut from
where it is. */
+ bfd *link;
*current_ptr_ptr = current_ptr->next;
/* Now glue to end */
after_bfd = get_pos_bfd (&inarch->next, pos_end);
+ link = *after_bfd;
*after_bfd = current_ptr;
- current_ptr->next = (bfd *) NULL;
+ current_ptr->next = link;
if (verbose)
printf ("m - %s\n", *files_to_move);
goto next_file;
}
+
current_ptr_ptr = &((*current_ptr_ptr)->next);
}
fprintf (stderr, "%s: no entry %s in archive %s!\n",