diff options
author | Rob Savoye <rob@cygnus> | 1992-08-19 03:24:16 +0000 |
---|---|---|
committer | Rob Savoye <rob@cygnus> | 1992-08-19 03:24:16 +0000 |
commit | 8fb94c7a789c076eac410b2d596884d1f86fb1a4 (patch) | |
tree | 29b9667085afc033546f512daefe859ea3edd853 /binutils/ar.c | |
parent | fb3e61f06920f7a6e88238cfdb46bba6650d227c (diff) | |
download | gdb-8fb94c7a789c076eac410b2d596884d1f86fb1a4.zip gdb-8fb94c7a789c076eac410b2d596884d1f86fb1a4.tar.gz gdb-8fb94c7a789c076eac410b2d596884d1f86fb1a4.tar.bz2 |
Added -V option to print the version number.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r-- | binutils/ar.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index 255d230..b27ac7b 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -56,6 +56,7 @@ PROTO(void, ranlib_only, (char *archname)); /** Globals and flags */ +extern *program_version; char *program_name = NULL; bfd *inarch; /* The input arch we're manipulating */ @@ -186,8 +187,11 @@ main(argc, argv) char **files; char *inarch_filename; char *temp; + int show_version; bfd_init(); + verbose = 1; + show_version = 0; #ifdef GNU960 check_v960( argc, argv ); default_target = bfd_make_targ_name(BFD_COFF_FORMAT,HOST_BYTE_ORDER_BIG_P); @@ -264,6 +268,9 @@ main(argc, argv) case 'o': preserve_dates = 1; break; + case 'V': + show_version = true; + break; case 's': write_armap = true; break; @@ -291,6 +298,9 @@ main(argc, argv) } } + if (show_version) + printf ("%s version %s\n", program_name, program_version); + if (mri_mode) { mri_emul(); } @@ -939,3 +949,6 @@ print_descr(abfd) { print_arelt_descr(stdout,abfd, verbose); } + + + |