Imported Debian patch 2.5.2-4 debian/2.5.2-4
authorBdale Garbee <bdale@gag.com>
Wed, 16 Apr 2008 06:26:26 +0000 (00:26 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 20 May 2008 05:00:11 +0000 (23:00 -0600)
15 files changed:
Makefile
dds-dd.man
dds2index.man
dds2tar.man
dds_extract.c
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/ddstool.1 [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/scsi_vendor.1 [new file with mode: 0644]
debian/scsi_vendor.bash [new file with mode: 0644]
mt-dds.man

index 6b758972c32bc30c1c9e5e30c7d39be299ffad45..8b5f5f3b60b882fe6febbab214e80f17cc7a07be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ HPDAT=-DHPDAT
 
 # Default tape device is: /dev/nst0
 # edit or uncomment the following line to change the default device
 
 # Default tape device is: /dev/nst0
 # edit or uncomment the following line to change the default device
-DEVICE=/dev/rmt0
+DEVICE=/dev/nst0
 
 # Enable trace mode -- for debugging only
 # TRACE=-DDDS_TRACE=1
 
 # Enable trace mode -- for debugging only
 # TRACE=-DDDS_TRACE=1
@@ -31,22 +31,22 @@ DEVICE=/dev/rmt0
 #
 # To configure the buffer size of dds2tar
 # change or uncomment the following line :
 #
 # To configure the buffer size of dds2tar
 # change or uncomment the following line :
-BUFFER=-DST_BUFFER_BLOCKS=32
-BUFFER=-DST_BUFFER_BLOCKS=0
+BUFFER=-DST_BUFFER_BLOCKS=32
+BUFFER=-DST_BUFFER_BLOCKS=0
 
 # To include some experimental stuff
 # uncomment the following line :
 # EXP_STUFF=-DEXP_STUFF
 
 # change this to where you want to install:
 
 # To include some experimental stuff
 # uncomment the following line :
 # EXP_STUFF=-DEXP_STUFF
 
 # change this to where you want to install:
-BINDIR=/usr/bin
-MANDIR=/usr/man
+BINDIR=$(DESTDIR)/usr/bin
+MANDIR=$(DESTDIR)/usr/share/man
 MANEXT=1
 
 # place here your favorite C compiler and options
 CC=cc -g
 CCOPT=$(HPDAT) $(HPDAT4) $(EXP_STUFF) $(MATCH) $(BUFFER) \
 MANEXT=1
 
 # place here your favorite C compiler and options
 CC=cc -g
 CCOPT=$(HPDAT) $(HPDAT4) $(EXP_STUFF) $(MATCH) $(BUFFER) \
-      -DDEVICE=\"$(DEVICE)\" -O4 -Wall $(TRACE)
+      -DDEVICE=\"$(DEVICE)\" -O4 -Wall $(TRACE) -D_GNU_SOURCE
 
 #        -Wall \
 #        -Wstrict-prototypes \
 
 #        -Wall \
 #        -Wstrict-prototypes \
@@ -139,7 +139,7 @@ dds-dd: dds-dd.o $(OBJ)
 
 install: dds2tar ddstool \
        dds2tar.$(MANEXT) mt-dds.$(MANEXT) dds2index.$(MANEXT) dds-dd.$(MANEXT)
 
 install: dds2tar ddstool \
        dds2tar.$(MANEXT) mt-dds.$(MANEXT) dds2index.$(MANEXT) dds-dd.$(MANEXT)
-       install -c -s dds2tar $(BINDIR)
+       install -c dds2tar $(BINDIR)
        install scsi_vendor $(BINDIR)
        install -c ddstool $(BINDIR)
        ls -l $(BINDIR)/dds2tar $(BINDIR)/ddstool
        install scsi_vendor $(BINDIR)
        install -c ddstool $(BINDIR)
        ls -l $(BINDIR)/dds2tar $(BINDIR)/ddstool
@@ -191,7 +191,7 @@ clean:
        -rm -f dds2tar dds2index mt-dds dds-dd fio_test 
        -rm -f *~ *.$(MANEXT) *.ps
        -rm -f tags *.bak
        -rm -f dds2tar dds2index mt-dds dds-dd fio_test 
        -rm -f *~ *.$(MANEXT) *.ps
        -rm -f tags *.bak
-       chmod 644 *
+#      chmod 644 *
 
 doc:
                        a2ps -p -nP    [A-Z]* *.h *.c *.lsm > a.ps
 
 doc:
                        a2ps -p -nP    [A-Z]* *.h *.c *.lsm > a.ps
index d8ad7d535d4def29af343e04af9a87a84822d4ca..8e6545341163497cfefc8867dfc7544a4b7dfd2f 100644 (file)
@@ -1,4 +1,4 @@
-.TH dds-dd 1L 2.4 \" -*- nroff -*-
+.TH dds-dd 1 2.4 \" -*- nroff -*-
 .\"----------
 .SH NAME
 .\"----------
 .\"----------
 .SH NAME
 .\"----------
index e836388321b194ca245e8ad8377451a519561bdd..5cce9042990a3a5e90206dc9c28e57e3b35a77c0 100644 (file)
@@ -1,4 +1,4 @@
-.TH dds2index 1L 2.4 \" -*- nroff -*-
+.TH dds2index 1 2.4 \" -*- nroff -*-
 .\"----------
 .SH NAME
 .\"----------
 .\"----------
 .SH NAME
 .\"----------
index af262f803ed658bfef44a3bd8cd5f14d3249b717..0f1791e51d5e6efbc9f0638fec163b3c3974350b 100644 (file)
@@ -1,4 +1,4 @@
-.TH dds2tar 1L 2.3 \" -*- nroff -*-
+.TH dds2tar 1 2.3 \" -*- nroff -*-
 .SH NAME
 dds2tar \- tool for fast tape access
 .SH SYNOPSIS
 .SH NAME
 dds2tar \- tool for fast tape access
 .SH SYNOPSIS
@@ -58,6 +58,7 @@ A patch for
 .B GNU tar-1.12
 is available, adding the option
 .B --record-file.
 .B GNU tar-1.12
 is available, adding the option
 .B --record-file.
+This patch is not included in the version of tar that ships with Debian.
 Alternatively there are some tricks to get the missing
 information.
 .PP
 Alternatively there are some tricks to get the missing
 information.
 .PP
index 45e7dafd12a57b784f3eacbac4aa4443fe990908..1c1face7f8c8656ff5fc74c63b60930332c77a50 100644 (file)
@@ -410,21 +410,37 @@ dds_cmp(char const *const *const pattern_list)
                         */
                        dds_unquote(cur_line);
 
                         */
                        dds_unquote(cur_line);
 
-                       /*
-                        * Set scanoffset
-                        */
-                       so = (0 == strncmp(cur_line, "block", 5))? 2 : 0 ;
-                       
-                       recno = atoi(cur_line + 4 + so );
-                       /*
-                        * tar-1.13 writes now the block number:
-                        */
-                       if ( so == 0 ){
-                               int x ;
-                               int n ;
+                       if (0 == strncmp(cur_line, "block ", 6))
+                       {
+                               int x;
+                               int n;
                                char c;
                                char c;
+
+                               so = 6;
+                               if (2 == sscanf(cur_line + so, "%d%c%n",
+                                               &x, &c, &n)) {
+                                       so += n + 1;
+                                       recno = x;
+#ifdef DDS_TRACE
+                                       fprintf(stderr,"Blocks found:%d\n",x);
+#endif
+                               }
+                               else
+                               {
+                                       recno = 0;
+                               }
+                       }
+                       else
+                       {
+                               int x;
+                               int n;
+                               char c;
+
+                               recno = atoi(cur_line + 4);
+
+                               so = 16;
                                if ( 2 == sscanf(
                                if ( 2 == sscanf(
-                                       cur_line+16,"block %d%c%n",&x,&c,&n
+                                       cur_line+so,"block %d%c%n",&x,&c,&n
                                        ) && c == ':' ) {
                                        so += n + 1 ;
                                        recno = x ;
                                        ) && c == ':' ) {
                                        so += n + 1 ;
                                        recno = x ;
@@ -433,6 +449,7 @@ dds_cmp(char const *const *const pattern_list)
 #endif
                                }
                        }
 #endif
                                }
                        }
+
                        /*
                         * Now we are fixing a bug of gnu tar ...
                         * The first number should be zero, othewise we
                        /*
                         * Now we are fixing a bug of gnu tar ...
                         * The first number should be zero, othewise we
@@ -459,47 +476,40 @@ dds_cmp(char const *const *const pattern_list)
 #ifdef DDS_TRACE
                        fprintf(stderr,"file-loc(%d:%d,%d)\n",tar_bs,blkno,recno);
 #endif
 #ifdef DDS_TRACE
                        fprintf(stderr,"file-loc(%d:%d,%d)\n",tar_bs,blkno,recno);
 #endif
-                       if (name == NULL) {     /* calculate only once */
-                               if ( strlen(cur_line) >= (66) ) {
-                                       name = cur_line + (65);
-                                       while ( ( name[ 0] != '\0' )
-                                        && ((     ( name[-1] != ' '  )
-                                               || ( name[-6] != ' '  )
-                                               || ( name[-9] != ':'  )
-                                        )&&(      ( name[-1] != ' '  )
-                                               || ( name[-4] != ':'  )
-                                               || ( name[-7] != ' '  )
-                                               || ( name[-10] != '-'  )
-                                               || ( name[-13] != '-'  )
-                                        ))
-                                       ) name++ ;
-                                       if ( name[0] == '\0' ) {
-                                               name = cur_line + (16+so);
-                                       }
-                               } else {
-                                       if ( strlen(cur_line) <= (16+so) ) {
-                                               strcat(cur_line,
-                                               "                    ");
-                                       }
-                                       name = cur_line + (16+so);
+
+                       /* skip file permissions */
+                       name = strchr(cur_line + so, ' ');
+                       if (name) {
+                         /* skip owner/group */
+                         name = strchr(name + 1, ' ');
+                         if (name) {
+                           /* skip size */
+                           while (*++name == ' ');
+                           name = strchr(name, ' ');
+                           if (name) {
+                             /* skip date */
+                             name = strchr(name + 1, ' ');
+                             if (name) {
+                               /* skip time */
+                               name = strchr(name + 1, ' ');
+
+                               if (name) {
+                                 ++name;
                                }
                                }
+                             }
+                           }
+                         }
+                       }
+
+                       if (!name || (name[-4] != ':'))
+                       {
+                         name = cur_line + so;
+                       }
+
 #ifdef DDS_TRACE
 #ifdef DDS_TRACE
-                               fprintf(stderr,"%d\n",__LINE__);
-                               fprintf(stderr,"filename=%s\n",name);
+                       fprintf(stderr,"%d\n",__LINE__);
+                       fprintf(stderr,"filename=%s\n",name);
 #endif
 #endif
-                       }
-                       while ( ( name[ 0] != '\0' )
-                        &&     ( name != ( cur_line + (16+so) ) )
-                        && ((     ( name[-1] != ' '  )
-                               || ( name[-6] != ' '  )
-                               || ( name[-9] != ':'  )
-                        )&&(      ( name[-1] != ' '  )
-                               || ( name[-4] != ':'  )
-                               || ( name[-7] != ' '  )
-                               || ( name[-10] != '-'  )
-                               || ( name[-13] != '-'  )
-                        ))
-                       ) name++ ;
                }
 #ifdef DDS_TRACE
                fprintf(stderr,"%d\n",__LINE__);
                }
 #ifdef DDS_TRACE
                fprintf(stderr,"%d\n",__LINE__);
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..41a634e
--- /dev/null
@@ -0,0 +1,108 @@
+dds2tar (2.5.2-4) unstable; urgency=low
+
+  * don't let Makefile strip binaries, closes: #436710
+  * update man pages to make it clear that Debian does not include the
+    --record-file option in our package of tar, so some of the functionality
+    of the dds2tar package will only work with a locally modified version
+    of the tar executable, closes: #220228, #285796
+  * accept patch for scsi_vendor csh->bash translation bugs, closes: #292066
+
+ -- Bdale Garbee <bdale@gag.com>  Wed, 16 Apr 2008 00:26:26 -0600
+
+dds2tar (2.5.2-3) unstable; urgency=low
+
+  * correct Kieren's email address here and in scsi_vendor script
+
+ -- Bdale Garbee <bdale@gag.com>  Wed,  2 Jul 2003 09:04:43 -0600
+
+dds2tar (2.5.2-2) unstable; urgency=low
+
+  * update control file to direct this to optional, not extra
+  * accept bash port of scsi_vendor script from Kieren Hynd <kieren@tigs.org>
+    to eliminate dependency on tcsh for this script to be useful.
+
+ -- Bdale Garbee <bdale@gag.com>  Tue,  1 Jul 2003 20:27:40 -0600
+
+dds2tar (2.5.2-1) unstable; urgency=low
+
+  * new upstream version
+  * apply fix for parsing of indexes from current Debian tar provided by
+    Christof Meerwald <cmeerw@web.de>, closes: #119692
+
+ -- Bdale Garbee <bdale@gag.com>  Mon, 11 Mar 2002 19:17:56 -0700
+
+dds2tar (2.4.21-3) unstable; urgency=low
+
+  * update to current policy
+
+ -- Bdale Garbee <bdale@gag.com>  Wed,  1 Dec 1999 23:27:00 -0700
+
+dds2tar (2.4.21-2) frozen unstable; urgency=low
+
+  * update dependencies, since scsi_vendor apparently needs tcsh, not just 
+    c-shell... closes 30895
+
+ -- Bdale Garbee <bdale@gag.com>  Mon, 18 Jan 1999 22:38:05 -0700
+
+dds2tar (2.4.21-1) unstable; urgency=low
+  
+  * new upstream version, closes 27551
+
+ -- Bdale Garbee <bdale@gag.com>  Wed,  7 Oct 1998 23:13:37 -0600
+
+dds2tar (2.4.15-3) frozen unstable; urgency=high
+
+  * another attempt to get this into hamm, rebuilding to get a good changes
+    file
+
+ -- Bdale Garbee <bdale@gag.com>  Tue, 23 Jun 1998 16:04:30 -0600
+
+dds2tar (2.4.15-2) frozen unstable; urgency=low
+
+  * reinstate package after having requested it be removed from the archive,
+    since the utilities here are still needed by DDS tape users to take 
+    advantage of the patch which is now part of the base tar package... /o\
+  * update rules file to reflect debhelper changes and get a clean lintian
+    report
+
+ -- Bdale Garbee <bdale@gag.com>  Sat, 25 Apr 1998 22:28:41 -0600
+
+dds2tar (2.4.15-1) unstable; urgency=low
+
+  * new upstream version
+  * dds2tar now depends on tar being patched instead of providing a new tar
+
+ -- Bdale Garbee <bdale@gag.com>  Wed,  4 Feb 1998 04:20:37 -0700
+
+dds2tar (2.4.13-4) unstable; urgency=low
+
+  * make copyright reference the GPL instead of including it.  Closes 14909.
+
+ -- Bdale Garbee <bdale@gag.com>  Fri, 21 Nov 1997 21:36:48 -0700
+
+dds2tar (2.4.13-3) unstable; urgency=low
+
+  * New maintainer.
+  * libc6
+
+ -- Bdale Garbee <bdale@gag.com>  Mon, 27 Oct 1997 08:08:41 -0700
+
+dds2tar (2.4.13-2) frozen unstable; urgency=low
+
+  * Rebuilt to change name of upstream changelog (#9641).
+  * Fixed source package to compile with bash 2.0
+  * Changed section to utils.
+  * Fixed typo in description.
+  * Upgrade to package standard 2.1.3.2.
+
+ -- Christian Schwarz <schwarz@debian.org>  Sun, 11 May 1997 13:57:07 +0200
+
+dds2tar (2.4.13-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Christian Schwarz <schwarz@debian.org>  Thu, 9 Jan 1997 13:40:02 +0100
+
+Local variables:
+mode: debian-changelog
+End:
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..1a6f229
--- /dev/null
@@ -0,0 +1,16 @@
+Source: dds2tar
+Section: utils
+Priority: optional
+Maintainer: Bdale Garbee <bdale@gag.com>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.3
+
+Package: dds2tar
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Tools for using DDS features of DAT drives with GNU tar
+ This tool makes use of the fast seek command of DAT devices.
+ Files from a selected file archive can be extracted within one minute.
+ .
+ A script scsi_vendor is provided which may help in learning more about 
+ an unknown SCSI device.  It is used by the mt-dds tool.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..b1bf765
--- /dev/null
@@ -0,0 +1,8 @@
+Package built from sources acquired at
+       http://ibiblio.org/pub/Linux/system/backup/dds2tar-2.5.2.tar.gz
+
+Copyright 2000 by J"org Weule <weule@cs.uni-duesseldorf.de>
+
+This package is licensed under the GNU GENERAL PUBLIC LICENSE.  A copy of the
+GPL is provided on Debian systems in the /usr/share/common-licenses directory.
+
diff --git a/debian/ddstool.1 b/debian/ddstool.1
new file mode 100644 (file)
index 0000000..0b2c7d9
--- /dev/null
@@ -0,0 +1,50 @@
+.TH DDSTOOL 1 "9 Januar 1997"\r
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection\r
+.\" other parms are allowed: see man(7), man(1)\r
+.SH NAME\r
+ddstool \- simple shell script to manage dds tapes\r
+.SH SYNOPSIS\r
+.B ddstool\r
+.I "<command> <options>"\r
+.SH "DESCRIPTION"\r
+This manual page documents briefly the\r
+.BR ddstool\r
+command.\r
+This manual page was written for the Debian GNU/Linux distribution\r
+(but may be used by others), because the original program does not\r
+have a manual page.\r
+.PP
+Since the version of tar now shipping in Debian does not contain the
+patch necessary to support the \-\-record-file option, this program 
+will do nothing useful unless you're running a locally patched version
+of tar.
+.PP\r
+First label a tape:\r
+.RS\r
+.sp\r
+ddstool create-label 'unique-string and more'\r
+.sp\r
+.RE\r
+To archive something:\r
+.RS\r
+.sp\r
+ddstool append pathnames...\r
+.sp\r
+.RE\r
+To delete the old index-files and make a new label:\r
+.RS\r
+.sp\r
+ddstool new-label 'unique-string and more strings'\r
+.sp\r
+.RE\r
+Each index is stored by the pathnames:\r
+.RS\r
+.sp\r
+$A/$unique-string.$file-number         (soft link)\r
+\r
+$A/$timestamp-of-the-tapelabel.$file-number (file)\r
+.sp\r
+.RE\r
+.SH AUTHOR\r
+This manual page was written by Christian Schwarz\r
+for the Debian GNU/Linux system.\r
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..98d1583
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man/man1
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..7924dbc
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+       make CFLAGS="-O2 -g -Wall"
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+       [ ! -f Makefile ] || make clean
+       dh_clean
+
+binary-indep: build
+
+binary-arch: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+       make install DESTDIR=`pwd`/debian/dds2tar
+       install debian/scsi_vendor.bash debian/dds2tar/usr/bin/scsi_vendor
+       dh_installdocs
+       dh_installexamples
+       dh_installmenu
+       dh_installcron
+       dh_installmanpages 
+       dh_undocumented
+       dh_installchangelogs
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_makeshlibs
+       dh_md5sums
+       dh_builddeb
+
+source diff:                                                                  
+       @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
diff --git a/debian/scsi_vendor.1 b/debian/scsi_vendor.1
new file mode 100644 (file)
index 0000000..12571fa
--- /dev/null
@@ -0,0 +1,21 @@
+.TH SCSI_VENDOR 1 
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection\r
+.\" other parms are allowed: see man(7), man(1)\r
+.SH NAME\r
+scsi_vendor \- script displays SCSI vendors
+.SH SYNOPSIS\r
+.B scsi_vendor\r
+.I "[disk|tape|cd] [<num>] "\r
+.SH "DESCRIPTION"\r
+This manual page documents briefly the\r
+.BR scsi_vendor\r
+command.\r
+This manual page was written for the Debian GNU/Linux distribution\r
+(but may be used by others), because the original program does not\r
+have a manual page.\r
+.PP\r
+When run, the script will report the vendors of all or the specified types of
+SCSI devices on the system.
+.SH AUTHOR\r
+This manual page was written by Bdale Garbee
+for the Debian GNU/Linux system.\r
diff --git a/debian/scsi_vendor.bash b/debian/scsi_vendor.bash
new file mode 100644 (file)
index 0000000..4a840b7
--- /dev/null
@@ -0,0 +1,88 @@
+#!/bin/bash
+# 
+# Determine the Vendor of a device
+#
+# csh-Example:
+#
+#      <1>scsi_vendor
+#      Disks: SEAGATE SAMSUNG
+#      Cdroms: TOSHIBA PHILIPS
+#      Tapes: HP
+#      <2>scsi_vendor disk
+#      SEAGATE SAMSUNG
+#      <383>scsi_vendor cd
+#      TOSHIBA PHILIPS
+#      <3>scsi_vendor tape 
+#      HP
+#      <4>scsi_vendor tape 1
+#      HP
+#      <5>scsi_vendor disk 1
+#      <6>scsi_vendor disk 1
+#      SEAGATE
+#      <7>scsi_vendor disk 2
+#      SAMSUNG
+#
+# Ported to bash 01.07.03 <kieren@tigs.org>
+
+s=( )
+c=( )
+d=( )
+o=''
+v=''
+
+SCSIINFO=`grep '^ ' /proc/scsi/scsi | cut -c3-18`
+
+for i in $SCSIINFO
+do
+       if [ "$o" = "Vendor:" ]; then 
+               v=$i 
+       fi
+       if [[ "$o" == 'Type:' && "$i" == 'Sequenti' ]]; then
+               s=( $s $v )
+       fi
+       if [[ "$o" == 'Type:' && "$i" == 'CD-ROM' ]]; then 
+               c=( $c $v )
+       fi
+       if [[ "$o" == 'Type:' && "$i" == 'Direct-A' ]]; then 
+               d=( $d $v )
+       fi
+       o=$i 
+done
+if [ $# == 0 ]; then
+       echo Disks: $d
+       echo Cdroms: $c
+       echo Tapes: $s
+       exit 0 
+fi
+if [ $# == 1 ]; then
+       v='' ;
+       if [ "$1" == "disk" ]; then
+               echo $d
+       fi
+       if [ "$1" == "cd" ]; then
+               echo $c
+       fi
+       if [ "$1" == "tape" ]; then
+               echo $s
+       fi
+       exit 0 
+fi
+if [ $# -eq 2 ]; then
+       v='' 
+       if [[ "$1" == "disk" && ${#d[@]} -ge $2 ]]; then
+               v=$d[$2] 
+       fi
+       if [[ "$1" == "cd" && ${#c[@]} -ge $2 ]]; then 
+               v=$c[$2] 
+       fi
+       if [[ "$1" == "tape" && ${#s[@]} -ge $2 ]]; then 
+               v=${s[$2]} 
+       fi
+       echo $v
+       exit 0 
+fi
+if [ "$v" == "$3" ]; then
+       exit 2 
+fi
+exit 1 
+
index c4fef84cc0376fcadbe83a70451cfe1ae21a0092..8cad0237e343acc41257eb599878ff2f0846c5d6 100644 (file)
@@ -1,4 +1,4 @@
-.TH mt-dds 1L 2.4 \" -*- nroff -*-
+.TH mt-dds 1 2.4 \" -*- nroff -*-
 .\"----------
 .SH NAME
 .\"----------
 .\"----------
 .SH NAME
 .\"----------