aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2003-08-25 08:05:26 +0800
committernaddy <naddy@FreeBSD.org>2003-08-25 08:05:26 +0800
commitf0a1537de1939747e8c8a9660cca9965fe80006a (patch)
treef99323697ecd6adb3e22f71d4a8e341ad4a4db7d /audio
parent8758f02e34ccf52ec31a69dad5ce3575e44c9dd9 (diff)
downloadfreebsd-ports-gnome-f0a1537de1939747e8c8a9660cca9965fe80006a.tar.gz
freebsd-ports-gnome-f0a1537de1939747e8c8a9660cca9965fe80006a.tar.zst
freebsd-ports-gnome-f0a1537de1939747e8c8a9660cca9965fe80006a.zip
* Bring us into the 64-bit world.
Obtained from: NetBSD * Use CDROM devices also available on 5.x.
Diffstat (limited to 'audio')
-rw-r--r--audio/xcdplayer/Makefile4
-rw-r--r--audio/xcdplayer/files/app.h30
-rw-r--r--audio/xcdplayer/files/cdrom_freebsd.c22
-rw-r--r--audio/xcdplayer/files/cdrom_freebsd.h1
-rw-r--r--audio/xcdplayer/files/patch-Imakefile23
-rw-r--r--audio/xcdplayer/files/patch-XCdplayer.ad92
-rw-r--r--audio/xcdplayer/files/patch-aa171
-rw-r--r--audio/xcdplayer/files/patch-ab266
-rw-r--r--audio/xcdplayer/files/patch-button__setup.c65
-rw-r--r--audio/xcdplayer/files/patch-cdrom-freebsd13
-rw-r--r--audio/xcdplayer/files/patch-cdrom__callb.c33
-rw-r--r--audio/xcdplayer/files/patch-cdrom__globs.h30
-rw-r--r--audio/xcdplayer/files/patch-debug.c25
-rw-r--r--audio/xcdplayer/files/patch-internals.c177
-rw-r--r--audio/xcdplayer/files/patch-logo__setup.c104
-rw-r--r--audio/xcdplayer/files/patch-main.c25
-rw-r--r--audio/xcdplayer/files/patch-program.c52
-rw-r--r--audio/xcdplayer/files/patch-shuffle.c33
-rw-r--r--audio/xcdplayer/files/patch-top__setup.c119
-rw-r--r--audio/xcdplayer/pkg-descr4
-rw-r--r--audio/xcdplayer/pkg-plist1
21 files changed, 826 insertions, 464 deletions
diff --git a/audio/xcdplayer/Makefile b/audio/xcdplayer/Makefile
index d06372e590d6..c79a590706bd 100644
--- a/audio/xcdplayer/Makefile
+++ b/audio/xcdplayer/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xcdplayer
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= ftp://ftp.x.org/R5contrib/
EXTRACT_SUFX= .tar.Z
@@ -18,8 +19,7 @@ USE_IMAKE= yes
MAN1= xcdplayer.1
post-extract:
- ${CP} ${FILESDIR}/cdrom_freebsd.c ${WRKSRC}
- ${CP} ${FILESDIR}/cdrom_freebsd.h ${WRKSRC}
+ ${CP} ${FILESDIR}/cdrom_freebsd.[ch] ${FILESDIR}/app.h ${WRKSRC}
${CP} ${WRKSRC}/xcdplayer.1 ${WRKSRC}/xcdplayer.man
.include <bsd.port.mk>
diff --git a/audio/xcdplayer/files/app.h b/audio/xcdplayer/files/app.h
new file mode 100644
index 000000000000..78b5b0882f87
--- /dev/null
+++ b/audio/xcdplayer/files/app.h
@@ -0,0 +1,30 @@
+/* $FreeBSD$ */
+/*
+ * Copyright (C) 1990 Regents of the University of California.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of the University of
+ * California not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission. the University of California makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ */
+
+typedef struct {
+ char *file;
+ char *device;
+ Boolean debug;
+ Boolean display_timer;
+ float volbase;
+ float volpcent;
+ int replayThreshold;
+ int pauseSkipInterval;
+ int scanSkipInterval;
+ float scanPauseInterval;
+ float pausePauseInterval;
+ char *cdInfoDir;
+} AppData;
diff --git a/audio/xcdplayer/files/cdrom_freebsd.c b/audio/xcdplayer/files/cdrom_freebsd.c
index 6d164612a4d5..f7cfa87a9409 100644
--- a/audio/xcdplayer/files/cdrom_freebsd.c
+++ b/audio/xcdplayer/files/cdrom_freebsd.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (C) 1990 Regents of the University of California.
*
@@ -21,6 +22,9 @@ static int c;
# include <sys/param.h>
# include <sys/stat.h>
# include <string.h>
+# if __FreeBSD_version >= 500003
+# include <sys/bio.h>
+# endif
# include <sys/buf.h>
# include <sys/time.h>
@@ -30,10 +34,10 @@ static int c;
# include "debug.h"
# include "cdrom_freebsd.h"
+# include "app.h"
-extern char *device;
-static char cdrom[] = "/dev/rcd0c";
-static char cdrom1[] = "/dev/rmcd0c";
+static char cdrom[] = "/dev/cd0c";
+static char cdrom1[] = "/dev/mcd0c";
cdrom_info cdi;
char info_filename[256];
@@ -41,6 +45,8 @@ FILE *disc_info = NULL;
static int cdrom_fd = -1;
+extern AppData app_data;
+
get_stored_info()
{
int i,n;
@@ -60,8 +66,8 @@ get_stored_info()
n = n / cdi.maxtrack;
disc_title = NULL;
- if (cdInfoDir != NULL)
- sprintf(info_filename, "%s/cd.%d", cdInfoDir, n);
+ if (app_data.cdInfoDir != NULL)
+ sprintf(info_filename, "%s/cd.%d", app_data.cdInfoDir, n);
else
sprintf(info_filename, "cd.%d", n);
@@ -94,9 +100,9 @@ cdrom_open() {
if (cdrom_fd != -1)
return(cdi.curtrack);
- if (device != NULL) {
- if ((cdrom_fd = open(device, O_RDONLY)) == -1) {
- perror(device);
+ if (app_data.device != NULL) {
+ if ((cdrom_fd = open(app_data.device, O_RDONLY)) == -1) {
+ perror(app_data.device);
return(-1);
}
} else {
diff --git a/audio/xcdplayer/files/cdrom_freebsd.h b/audio/xcdplayer/files/cdrom_freebsd.h
index f65872bcf536..6569bad675a4 100644
--- a/audio/xcdplayer/files/cdrom_freebsd.h
+++ b/audio/xcdplayer/files/cdrom_freebsd.h
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (C) 1990 Regents of the University of California.
*
diff --git a/audio/xcdplayer/files/patch-Imakefile b/audio/xcdplayer/files/patch-Imakefile
new file mode 100644
index 000000000000..5952121fa3e0
--- /dev/null
+++ b/audio/xcdplayer/files/patch-Imakefile
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- Imakefile.orig Tue Jan 12 19:59:29 1993
++++ Imakefile Mon Aug 25 00:47:20 2003
+@@ -15,6 +15,11 @@
+
+ LOCAL_LIBRARIES = XawClientLibs
+ LINTLIBS = -lXaw -lXt -lX11
++ SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
++ cdrom_freebsd.c internals.c shuffle.c program.c leds.c debug.c
++
++ OBJS = main.o top_setup.o logo_setup.o button_setup.o cdrom_callb.o\
++ cdrom_freebsd.o internals.o shuffle.o program.o leds.o debug.o
+ #ifdef SunArchitecture
+ SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
+ cdrom_sun.c internals.c shuffle.c program.c leds.c debug.c
+@@ -38,5 +43,4 @@
+ ComplexProgramTarget(xcdplayer)
+ NormalProgramTarget(cdinfo, cdinfo.o,,,)
+ NormalProgramTarget(cdgrab, cdgrab.o,,,)
+-NormalLintTarget(${SRCS})
+ InstallAppDefaults(XCdplayer)
diff --git a/audio/xcdplayer/files/patch-XCdplayer.ad b/audio/xcdplayer/files/patch-XCdplayer.ad
new file mode 100644
index 000000000000..1f06d06d542c
--- /dev/null
+++ b/audio/xcdplayer/files/patch-XCdplayer.ad
@@ -0,0 +1,92 @@
+
+$FreeBSD$
+
+--- XCdplayer.ad.orig Tue Jan 12 19:59:41 1993
++++ XCdplayer.ad Mon Aug 25 00:38:35 2003
+@@ -19,11 +19,10 @@
+
+ XCdplayer*logoLabel.foreground: Gold
+ XCdplayer*logoLabel.background: Black
+-XCdplayer*icon*foreground: Gold
+
+ XCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
+ XCdplayer*versionLabel.foreground: Black
+-XCdplayer*versionLabel.width: 130
++XCdplayer*versionLabel.width: 110
+ XCdplayer*versionLabel.fromHoriz: logoLabel
+
+ ! replayThreshold is the number of seconds that must be played before the
+@@ -33,16 +32,16 @@
+
+ ! scanSkipInterval is the number of seconds skipped at each fast-forward or
+ ! reverse.
+-XCdplayer*scanSkipInterval: 3
++XCdplayer*scanSkipInterval: 5
+ ! pauseSkipInterval is the number of seconds skipped at each fast-forward or
+ ! reverse if the CD is paused.
+-XCdplayer*pauseSkipInterval: 15
++XCdplayer*pauseSkipInterval: 20
+
+ ! scanPauseInterval is the number of seconds between each fast_forward or
+ ! reverse while holding down the buttons. (Sun CDs have a dreadfully long
+ ! start-up time for the audio to actually become audible, so "hearing the
+ ! track" while scanning isn't very feasible.)
+-XCdplayer*scanPauseInterval: 0.062
++XCdplayer*scanPauseInterval: 0.25
+ ! pausePauseInterval does the same thing when the disc is paused.
+ XCdplayer*pausePauseInterval: 0.5
+
+@@ -56,7 +55,7 @@
+ XCdplayer*Viewport.allowHoriz: True
+ XCdplayer*Viewport.useBottom: True
+ XCdplayer*Viewport.forceBars: False
+-XCdplayer*Viewport.width: 188
++XCdplayer*Viewport.width: 160
+ XCdplayer*Viewport.height: 30
+ XCdplayer*Viewport*thickness: 8
+ XCdplayer*Viewport.resizable: False
+@@ -88,11 +87,11 @@
+ XCdplayer*Toggle.right: ChainLeft
+ XCdplayer*Toggle.background: Ivory
+
+-XCdplayer*ledsLabel.horizDistance: 20
++XCdplayer*ledsLabel.horizDistance: 4
+ XCdplayer*ledsLabel.fromVert: versionLabel
+ XCdplayer*ledsLabel.fromHoriz: logoLabel
+
+-XCdplayer*trackButton.horizDistance: 8
++XCdplayer*trackButton.horizDistance: 4
+ XCdplayer*trackButton.fromVert: versionLabel
+ XCdplayer*trackButton.fromHoriz: ledsLabel
+ XCdplayer*trackButton.borderWidth: 2
+@@ -108,27 +107,22 @@
+ XCdplayer*timerButton.left: ChainRight
+ XCdplayer*timerButton.right: ChainRight
+
+-XCdplayer*volumeScrollbar.horizDistance:8
++XCdplayer*volumeScrollbar.horizDistance:4
+ XCdplayer*volumeScrollbar.fromHoriz: logoLabel
+ XCdplayer*volumeScrollbar.fromVert: trackButton
+ XCdplayer*volumeScrollbar.orientation: horizontal
+-XCdplayer*volumeScrollbar.length: 120
++XCdplayer*volumeScrollbar.length: 93
+ XCdplayer*volumeScrollbar.right: ChainRight
+ XCdplayer*volumeScrollbar.left: ChainRight
+ XCdplayer*volumeScrollbar.background: green
+ XCdplayer*volumeScrollbar.foreground: white
+-XCdplayer*volumeScrollbar.thumb: black
++XCdplayer*volumeScrollbar.thumb: black
+
+ XCdplayer*titleBarViewport.fromVert: volumeScrollbar
+-XCdplayer*titleBarViewport.forceBars: true
+ XCdplayer*titleBar.borderwidth: 0
+ XCdplayer*titleBar.highlightThickness: 1
+ XCdplayer*titleBar.foreground: Red
+ XCdplayer*titleBar.background: Ivory
+-
+-XCdplayer*titleDialog.Text.translations:#override\
+- <Key>Return: done()
+-
+ XCdplayer*buttonsForm.fromVert: logoForm
+ XCdplayer*buttonsForm.borderWidth: 1
+
diff --git a/audio/xcdplayer/files/patch-aa b/audio/xcdplayer/files/patch-aa
deleted file mode 100644
index dd840196aee8..000000000000
--- a/audio/xcdplayer/files/patch-aa
+++ /dev/null
@@ -1,171 +0,0 @@
-*** XCdplayer.ad Tue Jan 12 10:59:41 1993
---- /users/swallace/work/xcdplayer/XCdplayer.ad Wed Feb 23 07:36:31 1994
-***************
-*** 19,29 ****
-
- XCdplayer*logoLabel.foreground: Gold
- XCdplayer*logoLabel.background: Black
-- XCdplayer*icon*foreground: Gold
-
- XCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
- XCdplayer*versionLabel.foreground: Black
-! XCdplayer*versionLabel.width: 130
- XCdplayer*versionLabel.fromHoriz: logoLabel
-
- ! replayThreshold is the number of seconds that must be played before the
---- 19,28 ----
-
- XCdplayer*logoLabel.foreground: Gold
- XCdplayer*logoLabel.background: Black
-
- XCdplayer*versionLabel.Font: -misc-fixed-medium-r-normal--8-*
- XCdplayer*versionLabel.foreground: Black
-! XCdplayer*versionLabel.width: 110
- XCdplayer*versionLabel.fromHoriz: logoLabel
-
- ! replayThreshold is the number of seconds that must be played before the
-***************
-*** 33,48 ****
-
- ! scanSkipInterval is the number of seconds skipped at each fast-forward or
- ! reverse.
-! XCdplayer*scanSkipInterval: 3
- ! pauseSkipInterval is the number of seconds skipped at each fast-forward or
- ! reverse if the CD is paused.
-! XCdplayer*pauseSkipInterval: 15
-
- ! scanPauseInterval is the number of seconds between each fast_forward or
- ! reverse while holding down the buttons. (Sun CDs have a dreadfully long
- ! start-up time for the audio to actually become audible, so "hearing the
- ! track" while scanning isn't very feasible.)
-! XCdplayer*scanPauseInterval: 0.062
- ! pausePauseInterval does the same thing when the disc is paused.
- XCdplayer*pausePauseInterval: 0.5
-
---- 32,47 ----
-
- ! scanSkipInterval is the number of seconds skipped at each fast-forward or
- ! reverse.
-! XCdplayer*scanSkipInterval: 5
- ! pauseSkipInterval is the number of seconds skipped at each fast-forward or
- ! reverse if the CD is paused.
-! XCdplayer*pauseSkipInterval: 20
-
- ! scanPauseInterval is the number of seconds between each fast_forward or
- ! reverse while holding down the buttons. (Sun CDs have a dreadfully long
- ! start-up time for the audio to actually become audible, so "hearing the
- ! track" while scanning isn't very feasible.)
-! XCdplayer*scanPauseInterval: 0.25
- ! pausePauseInterval does the same thing when the disc is paused.
- XCdplayer*pausePauseInterval: 0.5
-
-***************
-*** 56,62 ****
- XCdplayer*Viewport.allowHoriz: True
- XCdplayer*Viewport.useBottom: True
- XCdplayer*Viewport.forceBars: False
-! XCdplayer*Viewport.width: 188
- XCdplayer*Viewport.height: 30
- XCdplayer*Viewport*thickness: 8
- XCdplayer*Viewport.resizable: False
---- 55,61 ----
- XCdplayer*Viewport.allowHoriz: True
- XCdplayer*Viewport.useBottom: True
- XCdplayer*Viewport.forceBars: False
-! XCdplayer*Viewport.width: 160
- XCdplayer*Viewport.height: 30
- XCdplayer*Viewport*thickness: 8
- XCdplayer*Viewport.resizable: False
-***************
-*** 88,98 ****
- XCdplayer*Toggle.right: ChainLeft
- XCdplayer*Toggle.background: Ivory
-
-! XCdplayer*ledsLabel.horizDistance: 20
- XCdplayer*ledsLabel.fromVert: versionLabel
- XCdplayer*ledsLabel.fromHoriz: logoLabel
-
-! XCdplayer*trackButton.horizDistance: 8
- XCdplayer*trackButton.fromVert: versionLabel
- XCdplayer*trackButton.fromHoriz: ledsLabel
- XCdplayer*trackButton.borderWidth: 2
---- 87,97 ----
- XCdplayer*Toggle.right: ChainLeft
- XCdplayer*Toggle.background: Ivory
-
-! XCdplayer*ledsLabel.horizDistance: 4
- XCdplayer*ledsLabel.fromVert: versionLabel
- XCdplayer*ledsLabel.fromHoriz: logoLabel
-
-! XCdplayer*trackButton.horizDistance: 4
- XCdplayer*trackButton.fromVert: versionLabel
- XCdplayer*trackButton.fromHoriz: ledsLabel
- XCdplayer*trackButton.borderWidth: 2
-***************
-*** 108,134 ****
- XCdplayer*timerButton.left: ChainRight
- XCdplayer*timerButton.right: ChainRight
-
-! XCdplayer*volumeScrollbar.horizDistance:8
- XCdplayer*volumeScrollbar.fromHoriz: logoLabel
- XCdplayer*volumeScrollbar.fromVert: trackButton
- XCdplayer*volumeScrollbar.orientation: horizontal
-! XCdplayer*volumeScrollbar.length: 120
- XCdplayer*volumeScrollbar.right: ChainRight
- XCdplayer*volumeScrollbar.left: ChainRight
- XCdplayer*volumeScrollbar.background: green
- XCdplayer*volumeScrollbar.foreground: white
-! XCdplayer*volumeScrollbar.thumb: black
-
- XCdplayer*titleBarViewport.fromVert: volumeScrollbar
-- XCdplayer*titleBarViewport.forceBars: true
- XCdplayer*titleBar.borderwidth: 0
- XCdplayer*titleBar.highlightThickness: 1
- XCdplayer*titleBar.foreground: Red
- XCdplayer*titleBar.background: Ivory
--
-- XCdplayer*titleDialog.Text.translations:#override\
-- <Key>Return: done()
--
- XCdplayer*buttonsForm.fromVert: logoForm
- XCdplayer*buttonsForm.borderWidth: 1
-
---- 107,128 ----
- XCdplayer*timerButton.left: ChainRight
- XCdplayer*timerButton.right: ChainRight
-
-! XCdplayer*volumeScrollbar.horizDistance:4
- XCdplayer*volumeScrollbar.fromHoriz: logoLabel
- XCdplayer*volumeScrollbar.fromVert: trackButton
- XCdplayer*volumeScrollbar.orientation: horizontal
-! XCdplayer*volumeScrollbar.length: 93
- XCdplayer*volumeScrollbar.right: ChainRight
- XCdplayer*volumeScrollbar.left: ChainRight
- XCdplayer*volumeScrollbar.background: green
- XCdplayer*volumeScrollbar.foreground: white
-! XCdplayer*volumeScrollbar.thumb: black
-
- XCdplayer*titleBarViewport.fromVert: volumeScrollbar
- XCdplayer*titleBar.borderwidth: 0
- XCdplayer*titleBar.highlightThickness: 1
- XCdplayer*titleBar.foreground: Red
- XCdplayer*titleBar.background: Ivory
- XCdplayer*buttonsForm.fromVert: logoForm
- XCdplayer*buttonsForm.borderWidth: 1
-
-*** Imakefile Tue Jan 12 10:59:29 1993
---- /users/swallace/work/xcdplayer/Imakefile Fri Sep 30 17:09:19 1994
-***************
-*** 15,20 ****
---- 15,25 ----
-
- LOCAL_LIBRARIES = XawClientLibs
- LINTLIBS = -lXaw -lXt -lX11
-+ SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
-+ cdrom_freebsd.c internals.c shuffle.c program.c leds.c debug.c
-+
-+ OBJS = main.o top_setup.o logo_setup.o button_setup.o cdrom_callb.o\
-+ cdrom_freebsd.o internals.o shuffle.o program.o leds.o debug.o
- #ifdef SunArchitecture
- SRCS = main.c top_setup.c logo_setup.c button_setup.c cdrom_callb.c\
- cdrom_sun.c internals.c shuffle.c program.c leds.c debug.c
diff --git a/audio/xcdplayer/files/patch-ab b/audio/xcdplayer/files/patch-ab
deleted file mode 100644
index ed31ad630079..000000000000
--- a/audio/xcdplayer/files/patch-ab
+++ /dev/null
@@ -1,266 +0,0 @@
-*** button_setup.c Tue Jan 12 10:59:47 1993
---- /users/swallace/work/xcdplayer/button_setup.c Wed Feb 23 07:36:36 1994
-***************
-*** 20,25 ****
---- 20,28 ----
- # include <X11/Xaw/Toggle.h>
-
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
-***************
-*** 44,49 ****
---- 47,69 ----
- # include "ff.xbm"
- # include "pgm.xbm"
-
-+ void title_dialog_setup();
-+ static void play_button_setup();
-+ static void stop_button_setup();
-+ static void pause_button_setup();
-+ static void prev_button_setup();
-+ static void next_button_setup();
-+ static void eject_button_setup();
-+ #ifdef sgi
-+ void audio_button_setup();
-+ #endif
-+ static void quit_button_setup();
-+ static void cycle_button_setup();
-+ static void shuffle_button_setup();
-+ static void rew_button_setup();
-+ static void ff_button_setup();
-+ static void pgm_button_setup();
-+ void buttons_reset();
-
- static Widget buttons_form_widget;
- static Widget play_button_widget;
-***************
-*** 71,95 ****
- Widget parent_widget;
- {
- Arg args[1];
--
-- extern void title_dialog_setup();
-- extern void play_button_setup();
-- extern void stop_button_setup();
-- extern void pause_button_setup();
-- extern void prev_button_setup();
-- extern void next_button_setup();
-- extern void eject_button_setup();
-- #ifdef sgi
-- extern void audio_button_setup();
-- #endif
-- extern void quit_button_setup();
-- extern void cycle_button_setup();
-- extern void shuffle_button_setup();
-- extern void rew_button_setup();
-- extern void ff_button_setup();
-- extern void pgm_button_setup();
-- extern void buttons_reset();
--
-
- buttons_form_widget = XtCreateManagedWidget("buttonsForm",
- formWidgetClass,
---- 91,96 ----
-*** cdrom_callb.c Tue Jan 12 10:59:48 1993
---- /users/swallace/work/xcdplayer/cdrom_callb.c Wed Feb 23 07:36:41 1994
-***************
-*** 22,27 ****
---- 22,30 ----
-
- # include "debug.h"
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
-*** internals.c Tue Jan 12 10:59:45 1993
---- /users/swallace/work/xcdplayer/internals.c Wed Feb 23 07:36:47 1994
-***************
-*** 22,27 ****
---- 22,30 ----
-
- # include "debug.h"
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
-***************
-*** 29,35 ****
- # include "cdrom_sgi.h"
- #endif
-
-!
- static XtIntervalId ivid = -1;
- static XtIntervalId scanivid = -1;
- static XtIntervalId stativid = -1;
---- 32,38 ----
- # include "cdrom_sgi.h"
- #endif
-
-! static void scan_update();
- static XtIntervalId ivid = -1;
- static XtIntervalId scanivid = -1;
- static XtIntervalId stativid = -1;
-***************
-*** 170,176 ****
- struct msf track_start;
- struct msf start_addr, end_addr;
- int curtrack;
-- extern void scan_update();
-
- if (cdrom_get_curmsf(&start_addr) == -1) {
- debug_printf(1, "rew: error reading location\n");
---- 173,178 ----
-***************
-*** 304,310 ****
- struct msf start_addr, end_addr, next_start;
- char t;
- int curtrack;
-- extern void scan_update();
-
- if (cdrom_get_curmsf(&start_addr) == -1) {
- debug_printf(1, "ff: error reading location\n");
---- 306,311 ----
-*** logo_setup.c Tue Jan 12 10:59:46 1993
---- /users/swallace/work/xcdplayer/logo_setup.c Wed Feb 23 07:36:52 1994
-***************
-*** 28,33 ****
---- 28,36 ----
- # include <stdio.h>
-
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
-***************
-*** 55,73 ****
- Widget title_done_widget;
-
- static int vol;
-
- void
- logo_setup(parent_widget)
- Widget parent_widget;
- {
-- extern void leds_label_setup();
-- extern void cb_track_button();
-- extern void cb_timer_button();
-- extern void volume_jump_proc();
-- extern void volume_scroll_proc();
-- extern void popup_title_dialog();
-- extern void popdown_title_dialog();
--
- Widget version_label_widget;
- char version_string[80];
-
---- 58,76 ----
- Widget title_done_widget;
-
- static int vol;
-+ extern void leds_label_setup();
-+ static void cb_track_button();
-+ static void cb_timer_button();
-+ static void volume_jump_proc();
-+ static void volume_scroll_proc();
-+ static void popup_title_dialog();
-+ static void popdown_title_dialog();
-+
-
- void
- logo_setup(parent_widget)
- Widget parent_widget;
- {
- Widget version_label_widget;
- char version_string[80];
-
-*** program.c Tue Jan 12 10:59:49 1993
---- /users/swallace/work/xcdplayer/program.c Wed Feb 23 07:36:55 1994
-***************
-*** 27,36 ****
-
- # include <stdio.h>
- # include <string.h>
-! # include <malloc.h>
-
- # include "debug.h"
- # include "cdrom_globs.h"
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
---- 27,39 ----
-
- # include <stdio.h>
- # include <string.h>
-! # include <sys/malloc.h>
-
- # include "debug.h"
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
-***************
-*** 52,57 ****
---- 55,69 ----
- static Boolean adding_to_new_track = False;
- static struct prognode *current_node = NULL;
-
-+ static void cb_move_program_ptr();
-+ static void cb_clear_program();
-+ static void cb_cancel_program();
-+ static void cb_save_program();
-+ static void cb_trackbuttons();
-+ static void cb_add_10();
-+ static void cb_new_track();
-+ static void cb_program_all();
-+
- void
- program_form_setup (parent_widget)
- Widget parent_widget;
-***************
-*** 66,80 ****
- Widget cancel_button;
- Widget save_button;
- Widget all_button;
--
-- extern void cb_move_program_ptr();
-- extern void cb_clear_program();
-- extern void cb_cancel_program();
-- extern void cb_save_program();
-- extern void cb_trackbuttons();
-- extern void cb_add_10();
-- extern void cb_new_track();
-- extern void cb_program_all();
-
- /*
- * create program form as a non-managed widget, because this
---- 78,83 ----
-*** shuffle.c Tue Jan 12 10:59:38 1993
---- /users/swallace/work/xcdplayer/shuffle.c Wed Feb 23 07:36:59 1994
-***************
-*** 18,23 ****
---- 18,26 ----
-
- # include "debug.h"
- # include "cdrom_globs.h"
-+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ # include "cdrom_freebsd.h"
-+ #endif
- #ifdef sun
- # include "cdrom_sun.h"
- #endif
diff --git a/audio/xcdplayer/files/patch-button__setup.c b/audio/xcdplayer/files/patch-button__setup.c
new file mode 100644
index 000000000000..b00d12201e3d
--- /dev/null
+++ b/audio/xcdplayer/files/patch-button__setup.c
@@ -0,0 +1,65 @@
+
+$FreeBSD$
+
+--- button_setup.c.orig Tue Jan 12 19:59:47 1993
++++ button_setup.c Mon Aug 25 00:38:35 2003
+@@ -20,6 +20,9 @@
+ # include <X11/Xaw/Toggle.h>
+
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -44,6 +47,23 @@
+ # include "ff.xbm"
+ # include "pgm.xbm"
+
++void title_dialog_setup();
++static void play_button_setup();
++static void stop_button_setup();
++static void pause_button_setup();
++static void prev_button_setup();
++static void next_button_setup();
++static void eject_button_setup();
++#ifdef sgi
++void audio_button_setup();
++#endif
++static void quit_button_setup();
++static void cycle_button_setup();
++static void shuffle_button_setup();
++static void rew_button_setup();
++static void ff_button_setup();
++static void pgm_button_setup();
++void buttons_reset();
+
+ static Widget buttons_form_widget;
+ static Widget play_button_widget;
+@@ -71,25 +91,6 @@
+ Widget parent_widget;
+ {
+ Arg args[1];
+-
+- extern void title_dialog_setup();
+- extern void play_button_setup();
+- extern void stop_button_setup();
+- extern void pause_button_setup();
+- extern void prev_button_setup();
+- extern void next_button_setup();
+- extern void eject_button_setup();
+-#ifdef sgi
+- extern void audio_button_setup();
+-#endif
+- extern void quit_button_setup();
+- extern void cycle_button_setup();
+- extern void shuffle_button_setup();
+- extern void rew_button_setup();
+- extern void ff_button_setup();
+- extern void pgm_button_setup();
+- extern void buttons_reset();
+-
+
+ buttons_form_widget = XtCreateManagedWidget("buttonsForm",
+ formWidgetClass,
diff --git a/audio/xcdplayer/files/patch-cdrom-freebsd b/audio/xcdplayer/files/patch-cdrom-freebsd
deleted file mode 100644
index 9cac18c8f330..000000000000
--- a/audio/xcdplayer/files/patch-cdrom-freebsd
+++ /dev/null
@@ -1,13 +0,0 @@
---- cdrom_freebsd.c.old Tue Jun 27 12:19:04 2000
-+++ cdrom_freebsd.c Tue Jun 27 12:20:40 2000
-@@ -21,6 +21,10 @@
- # include <sys/param.h>
- # include <sys/stat.h>
- # include <string.h>
-+#include <osreldate.h>
-+#if __FreeBSD_version >= 500003
-+#include <sys/bio.h>
-+#endif
- # include <sys/buf.h>
- # include <sys/time.h>
-
diff --git a/audio/xcdplayer/files/patch-cdrom__callb.c b/audio/xcdplayer/files/patch-cdrom__callb.c
new file mode 100644
index 000000000000..7ccfe9477416
--- /dev/null
+++ b/audio/xcdplayer/files/patch-cdrom__callb.c
@@ -0,0 +1,33 @@
+
+$FreeBSD$
+
+--- cdrom_callb.c.orig Tue Jan 12 19:59:48 1993
++++ cdrom_callb.c Mon Aug 25 00:38:35 2003
+@@ -22,6 +22,9 @@
+
+ # include "debug.h"
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -29,6 +32,8 @@
+ # include "cdrom_sgi.h"
+ #endif
+
++extern AppData app_data;
++
+ void cdrom_new_disc();
+
+ /*
+@@ -287,7 +292,7 @@
+ * if playing less than replayThreshold seconds, back up to
+ * previous track; otherwise start at beginning of current track:
+ */
+- if (cdi.duration < replayThreshold)
++ if (cdi.duration < app_data.replayThreshold)
+ {
+ if ((cdi.program != NULL) &&
+ (cdi.state & CDROM_STATE_PLAY) &&
diff --git a/audio/xcdplayer/files/patch-cdrom__globs.h b/audio/xcdplayer/files/patch-cdrom__globs.h
new file mode 100644
index 000000000000..5c13aa9101e1
--- /dev/null
+++ b/audio/xcdplayer/files/patch-cdrom__globs.h
@@ -0,0 +1,30 @@
+
+$FreeBSD$
+
+--- cdrom_globs.h.orig Tue Jan 12 19:59:31 1993
++++ cdrom_globs.h Mon Aug 25 00:38:35 2003
+@@ -99,22 +99,10 @@
+ extern int cdrom_open();
+ extern int cdrom_init();
+
+-
+-extern Boolean display_timer;
+-
+ extern XtAppContext appc;
+
+-extern char *file;
+-extern char *device;
++#include "app.h"
++
+ extern char info_filename[];
+ extern char *disc_title;
+ extern unsigned int timer_fsecs;
+-
+-
+-extern float volbase;
+-extern float volpcent;
+-extern int replayThreshold;
+-extern float scanPauseInterval;
+-extern int scanSkipInterval;
+-extern float pausePauseInterval;
+-extern int pauseSkipInterval;
diff --git a/audio/xcdplayer/files/patch-debug.c b/audio/xcdplayer/files/patch-debug.c
new file mode 100644
index 000000000000..1fd4576b765b
--- /dev/null
+++ b/audio/xcdplayer/files/patch-debug.c
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- debug.c.orig Tue Jan 12 19:59:35 1993
++++ debug.c Mon Aug 25 00:38:35 2003
+@@ -20,6 +20,10 @@
+
+ # include "debug.h"
+
++#include "app.h"
++
++extern AppData app_data;
++
+ /* VARARGS */
+ void
+ debug_printf(va_alist)
+@@ -33,7 +37,7 @@
+ /*
+ * first arg is whether or not to print.
+ */
+- if ((va_arg(args, int) == 0) || (debug == False))
++ if ((va_arg(args, int) == 0) || (app_data.debug == False))
+ return;
+
+ fmt = va_arg(args, char *);
diff --git a/audio/xcdplayer/files/patch-internals.c b/audio/xcdplayer/files/patch-internals.c
new file mode 100644
index 000000000000..39be5c703b93
--- /dev/null
+++ b/audio/xcdplayer/files/patch-internals.c
@@ -0,0 +1,177 @@
+
+$FreeBSD$
+
+--- internals.c.orig Tue Jan 12 19:59:45 1993
++++ internals.c Mon Aug 25 00:38:35 2003
+@@ -22,6 +22,9 @@
+
+ # include "debug.h"
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -29,13 +32,14 @@
+ # include "cdrom_sgi.h"
+ #endif
+
+-
++static void scan_update();
+ static XtIntervalId ivid = -1;
+ static XtIntervalId scanivid = -1;
+ static XtIntervalId stativid = -1;
+ static unsigned int timer_mod = 1000 / TIMER_PERIOD;
+ unsigned int timer_fsecs;
+
++extern AppData app_data;
+
+ int
+ cdrom_get_curtime() {
+@@ -170,7 +174,6 @@
+ struct msf track_start;
+ struct msf start_addr, end_addr;
+ int curtrack;
+- extern void scan_update();
+
+ if (cdrom_get_curmsf(&start_addr) == -1) {
+ debug_printf(1, "rew: error reading location\n");
+@@ -196,11 +199,11 @@
+ if (((cdi.state & CDROM_STATE_PLAY) &&
+ ((track_start.minute * 60) + track_start.second) >=
+ ((start_addr.minute * 60) + start_addr.second -
+- scanSkipInterval)) ||
++ app_data.scanSkipInterval)) ||
+ ((cdi.state & CDROM_STATE_PAUSE) &&
+ ((track_start.minute * 60) + track_start.second) >=
+ ((start_addr.minute * 60) + start_addr.second -
+- pauseSkipInterval)))
++ app_data.pauseSkipInterval)))
+ {
+ start_addr = track_start;
+ start_addr.second++; /* guarantee we never back up too far */
+@@ -208,9 +211,9 @@
+ else
+ {
+ if (cdi.state & CDROM_STATE_PAUSE) {
+- start_addr.second -= pauseSkipInterval;
++ start_addr.second -= app_data.pauseSkipInterval;
+ } else if (cdi.state & CDROM_STATE_PLAY) {
+- start_addr.second -= scanSkipInterval;
++ start_addr.second -= app_data.scanSkipInterval;
+ }
+ if ((char) start_addr.second < 0)
+ {
+@@ -223,9 +226,9 @@
+ else /* normal case */
+ {
+ if (cdi.state & CDROM_STATE_PAUSE) {
+- start_addr.second -= pauseSkipInterval;
++ start_addr.second -= app_data.pauseSkipInterval;
+ } else if (cdi.state & CDROM_STATE_PLAY) {
+- start_addr.second -= scanSkipInterval;
++ start_addr.second -= app_data.scanSkipInterval;
+ }
+ if ((char) start_addr.second < 0)
+ {
+@@ -274,7 +277,7 @@
+ {
+ if (scanivid == -1)
+ scanivid = XtAppAddTimeOut(appc,
+- (int)(pausePauseInterval * 1000.0),
++ (int)(app_data.pausePauseInterval * 1000.0),
+ scan_update, NULL);
+
+ cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */
+@@ -304,7 +307,6 @@
+ struct msf start_addr, end_addr, next_start;
+ char t;
+ int curtrack;
+- extern void scan_update();
+
+ if (cdrom_get_curmsf(&start_addr) == -1) {
+ debug_printf(1, "ff: error reading location\n");
+@@ -332,11 +334,11 @@
+ if (((cdi.state & CDROM_STATE_PLAY) &&
+ ((next_start.minute * 60) + next_start.second) <=
+ ((start_addr.minute * 60) + start_addr.second +
+- scanSkipInterval)) ||
++ app_data.scanSkipInterval)) ||
+ ((cdi.state & CDROM_STATE_PAUSE) &&
+ ((next_start.minute * 60) + next_start.second) <=
+ ((start_addr.minute * 60) + start_addr.second +
+- pauseSkipInterval)))
++ app_data.pauseSkipInterval)))
+ {
+
+ /* start at end of current track */
+@@ -346,9 +348,9 @@
+ else
+ {
+ if (cdi.state & CDROM_STATE_PAUSE) {
+- start_addr.second += pauseSkipInterval;
++ start_addr.second += app_data.pauseSkipInterval;
+ } else if (cdi.state & CDROM_STATE_PLAY) {
+- start_addr.second += scanSkipInterval;
++ start_addr.second += app_data.scanSkipInterval;
+ }
+ if (start_addr.second >= 60)
+ {
+@@ -360,9 +362,9 @@
+ else
+ {
+ if (cdi.state & CDROM_STATE_PAUSE) {
+- start_addr.second += pauseSkipInterval;
++ start_addr.second += app_data.pauseSkipInterval;
+ } else if (cdi.state & CDROM_STATE_PLAY) {
+- start_addr.second += scanSkipInterval;
++ start_addr.second += app_data.scanSkipInterval;
+ }
+ if (start_addr.second >= 60)
+ {
+@@ -413,7 +415,7 @@
+ {
+ if (scanivid == -1)
+ scanivid = XtAppAddTimeOut(appc,
+- (int)(pausePauseInterval * 1000.0),
++ (int)(app_data.pausePauseInterval * 1000.0),
+ scan_update, NULL);
+
+ cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */
+@@ -557,7 +559,7 @@
+ cdi.state &= ~CDROM_STATE_STOP;
+ }
+ ivid = XtAppAddTimeOut(appc,
+- (int)(scanPauseInterval * 1000.0),
++ (int)(app_data.scanPauseInterval * 1000.0),
+ scan_update, NULL);
+ }
+ else
+@@ -574,7 +576,7 @@
+ }
+
+ ivid = XtAppAddTimeOut(appc,
+- (int)(scanPauseInterval * 1000.0),
++ (int)(app_data.scanPauseInterval * 1000.0),
+ scan_update, NULL);
+ }
+ else if (scanivid != -1) {
+@@ -662,7 +664,7 @@
+ cdi.state &= ~CDROM_STATE_STOP;
+ }
+ ivid = XtAppAddTimeOut(appc,
+- (int)(scanPauseInterval * 1000.0),
++ (int)(app_data.scanPauseInterval * 1000.0),
+ update_track, NULL);
+ }
+ else
+@@ -679,7 +681,7 @@
+ }
+
+ ivid = XtAppAddTimeOut(appc,
+- (int)(scanPauseInterval * 1000.0),
++ (int)(app_data.scanPauseInterval * 1000.0),
+ update_track, NULL);
+ }
+ else
diff --git a/audio/xcdplayer/files/patch-logo__setup.c b/audio/xcdplayer/files/patch-logo__setup.c
new file mode 100644
index 000000000000..5231b0c79852
--- /dev/null
+++ b/audio/xcdplayer/files/patch-logo__setup.c
@@ -0,0 +1,104 @@
+
+$FreeBSD$
+
+--- logo_setup.c.orig Tue Jan 12 19:59:46 1993
++++ logo_setup.c Mon Aug 25 00:38:35 2003
+@@ -28,6 +28,9 @@
+ # include <stdio.h>
+
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -43,6 +46,8 @@
+
+ void Done();
+
++extern AppData app_data;
++
+ static Widget track_button_widget;
+ static Widget timer_button_widget;
+ static Widget volume_scroll_widget;
+@@ -55,19 +60,19 @@
+ Widget title_done_widget;
+
+ static int vol;
++extern void leds_label_setup();
++static void cb_track_button();
++static void cb_timer_button();
++static void volume_jump_proc();
++static void volume_scroll_proc();
++static void popup_title_dialog();
++static void popdown_title_dialog();
++
+
+ void
+ logo_setup(parent_widget)
+ Widget parent_widget;
+ {
+- extern void leds_label_setup();
+- extern void cb_track_button();
+- extern void cb_timer_button();
+- extern void volume_jump_proc();
+- extern void volume_scroll_proc();
+- extern void popup_title_dialog();
+- extern void popdown_title_dialog();
+-
+ Widget version_label_widget;
+ char version_string[80];
+
+@@ -126,15 +131,16 @@
+
+ track_button_update();
+
+- if (display_timer == True)
++ if (app_data.display_timer == True) {
+ timer_button_widget = XtCreateManagedWidget("timerButton",
+ toggleWidgetClass,
+ logo_form_widget,
+ (ArgList) NULL, 0);
+
+- XtAddCallback(timer_button_widget, XtNcallback, cb_timer_button, 0);
+-
+- timer_button_update();
++ XtAddCallback(timer_button_widget, XtNcallback,
++ cb_timer_button, 0);
++ timer_button_update();
++ }
+ thumb_pixmap = XCreateBitmapFromData(XtDisplay(logo_form_widget),
+ rootwin(logo_form_widget),
+ thumb_bits,
+@@ -171,10 +177,10 @@
+
+ #ifdef sgi
+ if ((vol = cdrom_get_volume()) == 0) {
+- vol = (int) ((MAXVOL - volbase) * 0.75) + volbase;
++ vol = (int) ((MAXVOL - app_data.volbase) * 0.75) + app_data.volbase;
+ }
+ #else
+- vol = (int) ((MAXVOL - volbase) * 0.75) + volbase;
++ vol = (int) ((MAXVOL - app_data.volbase) * 0.75) + app_data.volbase;
+ #endif
+ cdrom_volume(vol, vol);
+ #ifdef sgi
+@@ -356,7 +362,7 @@
+ Arg args[1];
+ Boolean state;
+
+- if (display_timer == False)
++ if (app_data.display_timer == False)
+ return;
+
+ if ((cdi.state & CDROM_STATE_PAUSE) == 0)
+@@ -413,7 +419,7 @@
+ vol = PCT2VAL(*(float *)percent);
+ #else
+ vol = (*(float *) percent) * MAXVOL;
+- vol = (vol * volpcent) + volbase;
++ vol = (vol * app_data.volpcent) + app_data.volbase;
+ #endif
+
+ if (vol > MAXVOL)
diff --git a/audio/xcdplayer/files/patch-main.c b/audio/xcdplayer/files/patch-main.c
new file mode 100644
index 000000000000..07d4facdacaf
--- /dev/null
+++ b/audio/xcdplayer/files/patch-main.c
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- main.c.orig Tue Jan 12 19:59:36 1993
++++ main.c Mon Aug 25 00:38:35 2003
+@@ -23,7 +23,9 @@
+
+ Widget top_form;
+
+-void
++extern AppData app_data;
++
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -66,7 +68,7 @@
+ /* ugly hack */
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-debug") == 0) {
+- debug = True;
++ app_data.debug = True;
+ break;
+ }
+ }
diff --git a/audio/xcdplayer/files/patch-program.c b/audio/xcdplayer/files/patch-program.c
new file mode 100644
index 000000000000..bbe12975818d
--- /dev/null
+++ b/audio/xcdplayer/files/patch-program.c
@@ -0,0 +1,52 @@
+
+$FreeBSD$
+
+--- program.c.orig Tue Jan 12 19:59:49 1993
++++ program.c Mon Aug 25 00:38:35 2003
+@@ -27,10 +27,13 @@
+
+ # include <stdio.h>
+ # include <string.h>
+-# include <malloc.h>
++# include <stdlib.h>
+
+ # include "debug.h"
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -52,6 +55,15 @@
+ static Boolean adding_to_new_track = False;
+ static struct prognode *current_node = NULL;
+
++static void cb_move_program_ptr();
++static void cb_clear_program();
++static void cb_cancel_program();
++static void cb_save_program();
++static void cb_trackbuttons();
++static void cb_add_10();
++static void cb_new_track();
++static void cb_program_all();
++
+ void
+ program_form_setup (parent_widget)
+ Widget parent_widget;
+@@ -66,15 +78,6 @@
+ Widget cancel_button;
+ Widget save_button;
+ Widget all_button;
+-
+- extern void cb_move_program_ptr();
+- extern void cb_clear_program();
+- extern void cb_cancel_program();
+- extern void cb_save_program();
+- extern void cb_trackbuttons();
+- extern void cb_add_10();
+- extern void cb_new_track();
+- extern void cb_program_all();
+
+ /*
+ * create program form as a non-managed widget, because this
diff --git a/audio/xcdplayer/files/patch-shuffle.c b/audio/xcdplayer/files/patch-shuffle.c
new file mode 100644
index 000000000000..eea01d2c4361
--- /dev/null
+++ b/audio/xcdplayer/files/patch-shuffle.c
@@ -0,0 +1,33 @@
+
+$FreeBSD$
+
+--- shuffle.c.orig Tue Jan 12 19:59:38 1993
++++ shuffle.c Mon Aug 25 00:38:35 2003
+@@ -18,6 +18,9 @@
+
+ # include "debug.h"
+ # include "cdrom_globs.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include "cdrom_freebsd.h"
++#endif
+ #ifdef sun
+ # include "cdrom_sun.h"
+ #endif
+@@ -29,6 +32,8 @@
+
+ static unsigned char *random_tracks;
+
++extern AppData app_data;
++
+ void
+ shuffle_setup() {
+ extern char *malloc();
+@@ -97,7 +102,7 @@
+ random_tracks[i] = try;
+ }
+
+- if (debug == True) {
++ if (app_data.debug == True) {
+ debug_printf(1, "shuffle_setup: ");
+ for (i = 0; i < cdi.ntracks; i++)
+ debug_printf(1, "%d ", random_tracks[i]);
diff --git a/audio/xcdplayer/files/patch-top__setup.c b/audio/xcdplayer/files/patch-top__setup.c
new file mode 100644
index 000000000000..74ffb7a49d38
--- /dev/null
+++ b/audio/xcdplayer/files/patch-top__setup.c
@@ -0,0 +1,119 @@
+
+$FreeBSD$
+
+--- top_setup.c.orig Tue Jan 12 19:59:40 1993
++++ top_setup.c Mon Aug 25 00:38:35 2003
+@@ -26,18 +26,8 @@
+ # include "logo.xbm"
+
+ XtAppContext appc;
+-char *file;
+-char *device;
+-Boolean debug = False;
+-Boolean display_timer = True;
+-float volbase = 187.0;
+-float volpcent = .267;
+-int replayThreshold = 4;
+-int pauseSkipInterval = 15;
+-int scanSkipInterval = 1;
+-float scanPauseInterval = .062;
+-float pausePauseInterval = .500;
+-char *cdInfoDir = NULL;
++
++AppData app_data;
+
+ extern char *getenv();
+
+@@ -55,36 +45,36 @@
+ };
+
+ static XtResource resources[] = {
+- { "file", "File", XtRString, sizeof(String), (Cardinal) &file,
++ { "file", "File", XtRString, sizeof(String), XtOffsetOf(AppData,file),
+ XtRString, (caddr_t) NULL },
+- { "device", "Device", XtRString, sizeof(String), (Cardinal) &device,
++ { "device", "Device", XtRString, sizeof(String), XtOffsetOf(AppData,device),
+ XtRString, (caddr_t) NULL },
+- { "debug", "Debug", XtRBoolean, sizeof(Boolean), (Cardinal) &debug,
+- XtRBoolean, (caddr_t) &debug },
++ { "debug", "Debug", XtRBoolean, sizeof(Boolean), XtOffsetOf(AppData,debug),
++ XtRBoolean, &app_data.debug },
+ { "displayTimer", "DisplayTimer", XtRBoolean, sizeof(Boolean),
+- (Cardinal) &display_timer, XtRBoolean,
+- (caddr_t) &display_timer },
++ XtOffsetOf(AppData,display_timer), XtRBoolean,
++ &app_data.display_timer },
+ { "volBase", "VolBase", XtRFloat, sizeof(float),
+- (Cardinal) &volbase, XtRFloat, (caddr_t) &volbase },
++ XtOffsetOf(AppData,volbase), XtRFloat, &app_data.volbase },
+ { "volPcent", "VolPcent", XtRFloat, sizeof(float),
+- (Cardinal) &volpcent, XtRFloat, (caddr_t) &volpcent },
++ XtOffsetOf(AppData,volpcent), XtRFloat, &app_data.volpcent },
+ { "replayThreshold", "replayThreshold", XtRInt, sizeof(int),
+- (Cardinal) &replayThreshold, XtRInt,
+- (caddr_t) &replayThreshold },
++ XtOffsetOf(AppData,replayThreshold), XtRInt,
++ &app_data.replayThreshold },
+ { "scanSkipInterval", "scanSkipInterval", XtRInt, sizeof(int),
+- (Cardinal) &scanSkipInterval, XtRInt,
+- (caddr_t) &scanSkipInterval },
++ XtOffsetOf(AppData,scanSkipInterval), XtRInt,
++ &app_data.scanSkipInterval },
+ { "scanPauseInterval", "scanPauseInterval", XtRFloat, sizeof(float),
+- (Cardinal) &scanPauseInterval, XtRFloat,
+- (caddr_t) &scanPauseInterval },
++ XtOffsetOf(AppData,scanPauseInterval), XtRFloat,
++ &app_data.scanPauseInterval },
+ { "pauseSkipInterval", "pauseSkipInterval", XtRInt, sizeof(int),
+- (Cardinal) &pauseSkipInterval, XtRInt,
+- (caddr_t) &pauseSkipInterval },
++ XtOffsetOf(AppData,pauseSkipInterval), XtRInt,
++ &app_data.pauseSkipInterval },
+ { "pausePauseInterval", "pausePauseInterval", XtRFloat, sizeof(float),
+- (Cardinal) &pausePauseInterval, XtRFloat,
+- (caddr_t) &pausePauseInterval },
++ XtOffsetOf(AppData,pausePauseInterval), XtRFloat,
++ &app_data.scanPauseInterval },
+ { "cdInfoDir", "cdInfoDir", XtRString, sizeof(String),
+- (Cardinal) &cdInfoDir, XtRString, (caddr_t) NULL },
++ XtOffsetOf(AppData,cdInfoDir), XtRString, (caddr_t) NULL },
+ };
+
+ Widget
+@@ -98,6 +88,20 @@
+ Arg arg;
+ char *s;
+
++ /*
++ * set default values
++ */
++
++ app_data.debug = False;
++ app_data.display_timer = True;
++ app_data.volbase = 187.0;
++ app_data.volpcent = 0.267;
++ app_data.replayThreshold = 4;
++ app_data.pauseSkipInterval = 15;
++ app_data.scanSkipInterval = 1;
++ app_data.scanPauseInterval = 0.062;
++ app_data.pausePauseInterval = 0.500;
++
+ XtToolkitInitialize();
+
+ appc = XtCreateApplicationContext();
+@@ -123,12 +127,12 @@
+ XtSetValues(top_shell, &arg, 1);
+
+
+- (void) XtGetApplicationResources(top_shell, (caddr_t) NULL,
++ (void) XtGetApplicationResources(top_shell, (caddr_t) &app_data,
+ resources, XtNumber(resources),
+ (ArgList) NULL, 0);
+
+- if ((cdInfoDir == NULL) && ((s=getenv("XCDINFODIR")) != NULL))
+- cdInfoDir = strdup(s);
++ if ((app_data.cdInfoDir == NULL) && ((s=getenv("XCDINFODIR")) != NULL))
++ app_data.cdInfoDir = strdup(s);
+
+ top_form_widget = XtCreateWidget("mainForm", formWidgetClass,
+ top_shell,
diff --git a/audio/xcdplayer/pkg-descr b/audio/xcdplayer/pkg-descr
index c2dc089d5cf4..b08b3138c0b4 100644
--- a/audio/xcdplayer/pkg-descr
+++ b/audio/xcdplayer/pkg-descr
@@ -1,8 +1,4 @@
-XCdplayer 2.2
-
XCdplayer is a graphical user interface for controlling the CD-ROM
drive under the X Window System. It provides visual feedback and
gives the user facilities for mode selection, device control,
scanning, and programming.
-
-Ported to FreeBSD by Steven Wallace, swallace@ece.uci.edu
diff --git a/audio/xcdplayer/pkg-plist b/audio/xcdplayer/pkg-plist
index 913e9d985f21..dc2cf435449a 100644
--- a/audio/xcdplayer/pkg-plist
+++ b/audio/xcdplayer/pkg-plist
@@ -1,2 +1,3 @@
+@comment $FreeBSD$
bin/xcdplayer
lib/X11/app-defaults/XCdplayer