1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 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 */
|