--- 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 */
