I am uploading a NMU to DELAYED/10 in order to fix this.
Please find the debdiff attached.
diff -Nru ascdc-0.3/ascdc.c ascdc-0.3/ascdc.c
--- ascdc-0.3/ascdc.c   2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/ascdc.c   1997-06-14 16:40:32.000000000 +0200
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <linux/cdrom.h>
+#include <linux/ucdrom.h>
 /* #include <linux/fs.h>   */                         
 
 #include <sys/mount.h>
@@ -78,7 +79,7 @@
 char   *Geometry = 0;
 char    device[128]=DEFAULTDEVICE;
 
-char   cdplayer[128]="/usr/X11R6/bin/xmcd";
+char   cdplayer[128]="/usr/local/bin/xmcd";
 int    autoplay=FALSE
 
 char    mountdir[128]="";
@@ -128,12 +129,7 @@
         }                       
 
        /* load */
-
-       if (ioctl (fd, CDROM_CHANGER_NSLOTS) < 0)
-         status += ioctl (fd, CDROM_SELECT_DISC, slot);
-       else
-         status += ioctl (fd, CDROM_SELECT_DISC, slot) < 0;
-
+        status += ioctl (fd, CDROM_SELECT_DISC, slot);
         if (status != 0) {
                 fprintf (stderr,
                          "%s: CDROM_SELECT_DISC ioctl failed for ascdc: %s\n",
@@ -333,19 +329,19 @@
                                continue;
 
                         case 'm' :
-                               if(++i >= argc) Help();
+                               if(i++ >= argc) Help();
                                strcpy(mountdir, argv[i]);
                                mounton=TRUE;
                                continue;
                         case 'c' :
-                               if(++i >=argc) Help();
+                               if(i++ >=argc) Help();
                                strcpy(cdplayer, argv[i]);
                                strcat(cdplayer, " &");
                                fprintf(stdout, "cdplayer: %s\n,", cdplayer);
                                autoplay=TRUE;
                                continue;
                         case 'n' :
-                               if(++i >=argc) Help();
+                               if(i++ >=argc) Help();
                                swapcd(atoi(argv[i]));
                                continue;
                        case 'h':  /* Help */
diff -Nru ascdc-0.3/ascdc.man ascdc-0.3/ascdc.man
--- ascdc-0.3/ascdc.man 2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/ascdc.man 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-.TH ASCDC "1" "February 2006" "ascdc 0.3" "User Commands"
-.SH NAME
-ascdc \- AfterStep CD changer
-.SH SYNOPSIS
-.B ascdc
-[\fI-options \fR...]
-.SH DESCRIPTION
-`ascdc' is an AfterStep CD changer.
-.TP
-\fB\-g\fR
-Geometry. Standard X Location
-.TP
-\fB\-d\fR
-Device. default value is /dev/hdd. IDE Device of the Changer
-.TP
-\fB\-c\fR
-cdplayer. Location of program to launch for audio CDs.
-.TP
-\fB\-n\fR
-Number to set now. If set, switches to slot 0 on launch.
-.TP
-\fB\-m\fR
-Mount/Umount Directory. If desired umounts & mounts, eg /cdrom or /mnt
-.TP
-\fB\-w\fR
-Withdrawn. Starts window in Withdrawn State (for WindowMaker)
-.SH AUTHOR
-Rob Malda \- ma...@cs.hope.edu
diff -Nru ascdc-0.3/debian/ascdc.man ascdc-0.3/debian/ascdc.man
--- ascdc-0.3/debian/ascdc.man  1970-01-01 01:00:00.000000000 +0100
+++ ascdc-0.3/debian/ascdc.man  2023-10-02 23:00:14.000000000 +0200
@@ -0,0 +1,28 @@
+.TH ASCDC "1" "February 2006" "ascdc 0.3" "User Commands"
+.SH NAME
+ascdc \- AfterStep CD changer
+.SH SYNOPSIS
+.B ascdc
+[\fI-options \fR...]
+.SH DESCRIPTION
+`ascdc' is an AfterStep CD changer.
+.TP
+\fB\-g\fR
+Geometry. Standard X Location
+.TP
+\fB\-d\fR
+Device. default value is /dev/hdd. IDE Device of the Changer
+.TP
+\fB\-c\fR
+cdplayer. Location of program to launch for audio CDs.
+.TP
+\fB\-n\fR
+Number to set now. If set, switches to slot 0 on launch.
+.TP
+\fB\-m\fR
+Mount/Umount Directory. If desired umounts & mounts, eg /cdrom or /mnt
+.TP
+\fB\-w\fR
+Withdrawn. Starts window in Withdrawn State (for WindowMaker)
+.SH AUTHOR
+Rob Malda \- ma...@cs.hope.edu
diff -Nru ascdc-0.3/debian/changelog ascdc-0.3/debian/changelog
--- ascdc-0.3/debian/changelog  2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/debian/changelog  2023-10-02 23:00:14.000000000 +0200
@@ -1,3 +1,10 @@
+ascdc (0.3-15.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Convert to source format 3.0 (closes: #1007332)
+
+ -- Bastian Germann <b...@debian.org>  Mon, 02 Oct 2023 23:00:14 +0200
+
 ascdc (0.3-15) unstable; urgency=low
 
   * Fixed bad argument handling causing crash in some cases (closes: #715649)
diff -Nru ascdc-0.3/debian/patches/debian.patch 
ascdc-0.3/debian/patches/debian.patch
--- ascdc-0.3/debian/patches/debian.patch       1970-01-01 01:00:00.000000000 
+0100
+++ ascdc-0.3/debian/patches/debian.patch       2023-10-02 23:00:14.000000000 
+0200
@@ -0,0 +1,82 @@
+--- ascdc-0.3.orig/Imakefile
++++ ascdc-0.3/Imakefile
+@@ -1,5 +1,5 @@
+ 
+-XPMLIB = -L/usr/lib/X11 -lXpm   
++XPMLIB = -L/usr/X11R6/lib -lXpm   
+ DEPLIBS = $(DEPXLIB) 
+ 
+ LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)  
+@@ -9,4 +9,4 @@ LINTLIBS = $(LINTXLIB)
+ SRCS = ascdc.cpp
+ OBJS = ascdc.o
+ 
+-ComplexProgramTarget(ascdc)
++ComplexProgramTargetNoMan(ascdc)
+--- ascdc-0.3.orig/README
++++ ascdc-0.3/README
+@@ -27,7 +27,7 @@ run ascdc as root, or setuid it:
+       chmod a+s ascdc
+ 
+ I suggest putting ascdc in your Wharf-
+-*Wharf - - Swallow "ascdc" /usr/local/bin/ascdc -d /dev/hdd &
++*Wharf - - Swallow "ascdc" ascdc -d /dev/cdrom &
+ 
+ 
+ 
+--- ascdc-0.3.orig/ascdc.c
++++ ascdc-0.3/ascdc.c
+@@ -27,7 +27,6 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <linux/cdrom.h>
+-#include <linux/ucdrom.h>
+ /* #include <linux/fs.h>   */                         
+ 
+ #include <sys/mount.h>
+@@ -79,7 +78,7 @@ Window       Win;
+ char  *Geometry = 0;
+ char    device[128]=DEFAULTDEVICE;
+ 
+-char  cdplayer[128]="/usr/local/bin/xmcd";
++char  cdplayer[128]="/usr/X11R6/bin/xmcd";
+ int   autoplay=FALSE
+ 
+ char    mountdir[128]="";
+@@ -129,7 +128,12 @@ void swapcd(int newslot)
+         }                       
+ 
+        /* load */
+-        status += ioctl (fd, CDROM_SELECT_DISC, slot);
++
++      if (ioctl (fd, CDROM_CHANGER_NSLOTS) < 0)
++        status += ioctl (fd, CDROM_SELECT_DISC, slot);
++      else
++        status += ioctl (fd, CDROM_SELECT_DISC, slot) < 0;
++
+         if (status != 0) {
+                 fprintf (stderr,
+                          "%s: CDROM_SELECT_DISC ioctl failed for ascdc: %s\n",
+@@ -329,19 +333,19 @@ void ParseCmdLine(int argc, char *argv[]
+                               continue;
+ 
+                        case 'm' :
+-                              if(i++ >= argc) Help();
++                              if(++i >= argc) Help();
+                               strcpy(mountdir, argv[i]);
+                               mounton=TRUE;
+                               continue;
+                        case 'c' :
+-                              if(i++ >=argc) Help();
++                              if(++i >=argc) Help();
+                               strcpy(cdplayer, argv[i]);
+                               strcat(cdplayer, " &");
+                               fprintf(stdout, "cdplayer: %s\n,", cdplayer);
+                               autoplay=TRUE;
+                               continue;
+                        case 'n' :
+-                              if(i++ >=argc) Help();
++                              if(++i >=argc) Help();
+                               swapcd(atoi(argv[i]));
+                               continue;
+                       case 'h':  /* Help */
diff -Nru ascdc-0.3/debian/patches/series ascdc-0.3/debian/patches/series
--- ascdc-0.3/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
+++ ascdc-0.3/debian/patches/series     2023-10-02 23:00:14.000000000 +0200
@@ -0,0 +1 @@
+debian.patch
diff -Nru ascdc-0.3/debian/rules ascdc-0.3/debian/rules
--- ascdc-0.3/debian/rules      2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/debian/rules      2023-10-02 23:00:14.000000000 +0200
@@ -43,7 +43,7 @@
        dh_testroot
        dh_installdocs README
        dh_installchangelogs
-       dh_installman ascdc.man
+       dh_installman debian/ascdc.man
        dh_strip
        dh_compress
        dh_fixperms
diff -Nru ascdc-0.3/debian/source/format ascdc-0.3/debian/source/format
--- ascdc-0.3/debian/source/format      1970-01-01 01:00:00.000000000 +0100
+++ ascdc-0.3/debian/source/format      2023-10-02 23:00:14.000000000 +0200
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru ascdc-0.3/Imakefile ascdc-0.3/Imakefile
--- ascdc-0.3/Imakefile 2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/Imakefile 1997-03-01 01:48:45.000000000 +0100
@@ -1,5 +1,5 @@
 
-XPMLIB = -L/usr/X11R6/lib -lXpm   
+XPMLIB = -L/usr/lib/X11 -lXpm   
 DEPLIBS = $(DEPXLIB) 
 
 LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)  
@@ -9,4 +9,4 @@
 SRCS = ascdc.cpp
 OBJS = ascdc.o
 
-ComplexProgramTargetNoMan(ascdc)
+ComplexProgramTarget(ascdc)
diff -Nru ascdc-0.3/README ascdc-0.3/README
--- ascdc-0.3/README    2023-10-02 23:05:09.000000000 +0200
+++ ascdc-0.3/README    1997-06-14 16:33:40.000000000 +0200
@@ -27,7 +27,7 @@
        chmod a+s ascdc
 
 I suggest putting ascdc in your Wharf-
-*Wharf - - Swallow "ascdc" ascdc -d /dev/cdrom &
+*Wharf - - Swallow "ascdc" /usr/local/bin/ascdc -d /dev/hdd &
 
 
 

Reply via email to