pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/xcdplayer Rearrange position of some static func...
details: https://anonhg.NetBSD.org/pkgsrc/rev/481cddb6b509
branches: trunk
changeset: 517491:481cddb6b509
user: darcy <darcy%pkgsrc.org@localhost>
date: Sat Aug 12 14:51:39 2006 +0000
description:
Rearrange position of some static functions to allow them to self-define
and compile under GCC-4.
Bump PKGREVISION.
diffstat:
audio/xcdplayer/Makefile | 4 +-
audio/xcdplayer/distinfo | 6 +-
audio/xcdplayer/patches/patch-ah | 398 ++++++++++++++++++++++++++++++++++++--
audio/xcdplayer/patches/patch-aj | 72 +++++-
4 files changed, 433 insertions(+), 47 deletions(-)
diffs (truncated from 617 to 300 lines):
diff -r 2228d8862585 -r 481cddb6b509 audio/xcdplayer/Makefile
--- a/audio/xcdplayer/Makefile Sat Aug 12 08:56:22 2006 +0000
+++ b/audio/xcdplayer/Makefile Sat Aug 12 14:51:39 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2006/03/04 21:28:59 jlam Exp $
+# $NetBSD: Makefile,v 1.18 2006/08/12 14:51:39 darcy Exp $
DISTNAME= xcdplayer-2.2
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= audio
MASTER_SITES= ftp://ftp.x.org/R5contrib/ \
ftp://ftp.cdrom.com/pub/X11/R5contrib/
diff -r 2228d8862585 -r 481cddb6b509 audio/xcdplayer/distinfo
--- a/audio/xcdplayer/distinfo Sat Aug 12 08:56:22 2006 +0000
+++ b/audio/xcdplayer/distinfo Sat Aug 12 14:51:39 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2005/12/11 20:48:46 joerg Exp $
+$NetBSD: distinfo,v 1.6 2006/08/12 14:51:39 darcy Exp $
SHA1 (xcdplayer-2.2.tar.Z) = e518f2df9fcc5e21e1123fe6f5b1193f232b76ef
RMD160 (xcdplayer-2.2.tar.Z) = ba34fe8092aa96d6370320b20fa46b0b0d043176
@@ -10,9 +10,9 @@
SHA1 (patch-ae) = 19d0222e673f41efe2733277062e56991960a9ed
SHA1 (patch-af) = 54c96ac87764c222e48e0dcf4267a93cdd966843
SHA1 (patch-ag) = cb787b19c00d8bda99367eb71dc5e234857a4539
-SHA1 (patch-ah) = c4730c846a787544cd636c9f5a08089c9b733c51
+SHA1 (patch-ah) = 1cb1b6cbe95a0b921cd4dc0ac62dadd5d17e0735
SHA1 (patch-ai) = 1bf094380473d4a88c61378ff6172a90df510541
-SHA1 (patch-aj) = 74e92d2096e5d6ffd6f24dbf2501ed349e9c834f
+SHA1 (patch-aj) = 9e463da2b79dee2ff7d52d519da85800dc6ac0bc
SHA1 (patch-ak) = 25ee2b3ce20201ee586c414302685654cbc334e4
SHA1 (patch-al) = 3a39ae09e981650e9d271d8db8caaf3fe41f016e
SHA1 (patch-am) = 16347fa0157de6ecca0c8c6c946cbb3a1c406ecb
diff -r 2228d8862585 -r 481cddb6b509 audio/xcdplayer/patches/patch-ah
--- a/audio/xcdplayer/patches/patch-ah Sat Aug 12 08:56:22 2006 +0000
+++ b/audio/xcdplayer/patches/patch-ah Sat Aug 12 14:51:39 2006 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $
+$NetBSD: patch-ah,v 1.5 2006/08/12 14:51:39 darcy Exp $
--- internals.c.orig Tue Jan 12 19:59:45 1993
-+++ internals.c Mon Sep 6 18:37:05 1999
++++ internals.c
@@ -22,6 +22,9 @@
# include "debug.h"
@@ -28,7 +28,187 @@
int
cdrom_get_curtime() {
-@@ -170,7 +174,6 @@
+@@ -76,6 +80,170 @@ cdrom_get_curtime() {
+ }
+ }
+
++/*
++ * called by update_track when the cd has hit
++ * the end of the track or the disc.
++ */
++static void
++cdrom_atend() {
++ cdrom_timer_off();
++ leds_stop();
++ debug_printf(1, "cdrom_atend: at end\n");
++
++#ifdef sgi
++ /* Force a stop to kill the child (if any).
++ * This is due to some sort of weirdness when the SGI runs off the
++ * disc during a CDreadda().
++ */
++ if (cdi.scsi_audio) {
++ cdrom_stop();
++ }
++#endif
++ if (cdi.state & CDROM_STATE_SHUFFLE) {
++
++ if (cdi.currand == cdi.ntracks) {
++ if ((cdi.state & CDROM_STATE_CYCLE) == 0) {
++ debug_printf(1, "cdrom_atend: shuffle done\n");
++
++ cdrom_reset();
++ return;
++ }
++
++ debug_printf(1, "cdrom_atend: shuffle cycling\n");
++ shuffle_setup();
++ }
++
++ cdi.curtrack = shuffle_next_track();
++ }
++ else if (cdi.state & CDROM_STATE_PROGRAM) {
++ if ((cdi.curtrack = program_goto_next_track()) == 0)
++ {
++ if (cdi.state & CDROM_STATE_CYCLE)
++ {
++ debug_printf(1, "cdrom_atend: cycling program\n");
++ cdi.curtrack = program_resume();
++ timer_fsecs = 0;
++ cdi.duration = 0;
++ timer_button_update();
++
++ (void) cdrom_play();
++ }
++ else
++ {
++ debug_printf(1, "cdrom_atend: all done\n");
++ cdrom_reset();
++ }
++ return;
++ }
++ }
++
++ else if ((cdi.curtrack < cdi.maxtrack) && (cdi.curtrack != 0)) {
++ debug_printf(1, "cdrom_atend: continuing\n");
++ cdi.curtrack++;
++ }
++ else if (cdi.state & CDROM_STATE_CYCLE) {
++ debug_printf(1, "cdrom_atend: cycling\n");
++ cdi.curtrack = cdi.mintrack;
++ }
++ else {
++ debug_printf(1, "cdrom_atend: all done\n");
++ buttons_reset();
++ cdrom_reset();
++ return;
++ }
++
++ timer_fsecs = 0;
++ cdi.duration = 0;
++ timer_button_update();
++
++ (void) cdrom_play();
++}
++
++/*
++ * update_track is called when the timeout fires; it updates curtrack and
++ * calls the label update routine.
++ */
++/*ARGSUSED*/
++static void
++update_track(data, id)
++ XtPointer *data;
++ XtIntervalId *id;
++{
++ unsigned int curtrack;
++ Arg args[1];
++ Boolean state;
++
++ extern Widget rew_button_widget;
++ extern Widget ff_button_widget;
++#ifdef sgi
++
++ int vol;
++#endif
++
++ if ((curtrack = cdrom_get_curtrack()) != cdi.curtrack) {
++ if (curtrack == 0) {
++ cdrom_atend();
++
++ return;
++ }
++
++ timer_fsecs = 0;
++ cdi.duration = 0;
++ timer_button_update();
++
++ cdi.curtrack = curtrack;
++ track_button_update();
++ }
++
++#ifdef sgi
++ /* Update the volume control */
++ if ((vol = cdrom_get_volume()) != 0) {
++ set_volume(vol);
++ }
++#endif
++
++ XtSetArg(args[0], XtNstate, &state);
++ XtGetValues(rew_button_widget, args, 1);
++ if (state == True)
++ {
++ cdrom_rewind();
++ leds_update(BACKWARDS);
++ if (cdi.state & CDROM_STATE_PAUSE) {
++ if (cdrom_pause() != -1)
++ cdi.state &= ~CDROM_STATE_STOP;
++ }
++ ivid = XtAppAddTimeOut(appc,
++ (int)(app_data.scanPauseInterval * 1000.0),
++ update_track, NULL);
++ }
++ else
++ {
++ leds_update(FORWARDS);
++ XtSetArg(args[0], XtNstate, &state);
++ XtGetValues(ff_button_widget, args, 1);
++ if (state == True)
++ {
++ cdrom_ff();
++ if (cdi.state & CDROM_STATE_PAUSE) {
++ if (cdrom_pause() != -1)
++ cdi.state &= ~CDROM_STATE_STOP;
++ }
++
++ ivid = XtAppAddTimeOut(appc,
++ (int)(app_data.scanPauseInterval * 1000.0),
++ update_track, NULL);
++ }
++ else
++ {
++ if ((timer_fsecs++ % timer_mod) == 0) {
++ timer_button_update();
++ }
++ ivid = XtAppAddTimeOut(appc, TIMER_PERIOD,
++ update_track, NULL);
++ }
++ }
++}
++
+
+ /*
+ * we poll the cd-rom drive every TIMER_PERIOD milliseconds to see where
+@@ -83,8 +251,6 @@ cdrom_get_curtime() {
+ */
+ void
+ cdrom_timer_on() {
+- static void update_track();
+-
+ if (cdi.state & CDROM_STATE_PLAY)
+ ivid = XtAppAddTimeOut(appc, TIMER_PERIOD, update_track, NULL);
+ }
+@@ -170,7 +336,6 @@ cdrom_rewind () {
struct msf track_start;
struct msf start_addr, end_addr;
int curtrack;
@@ -36,7 +216,7 @@
if (cdrom_get_curmsf(&start_addr) == -1) {
debug_printf(1, "rew: error reading location\n");
-@@ -196,11 +199,11 @@
+@@ -196,11 +361,11 @@ cdrom_rewind () {
if (((cdi.state & CDROM_STATE_PLAY) &&
((track_start.minute * 60) + track_start.second) >=
((start_addr.minute * 60) + start_addr.second -
@@ -50,7 +230,7 @@
{
start_addr = track_start;
start_addr.second++; /* guarantee we never back up too far */
-@@ -208,9 +211,9 @@
+@@ -208,9 +373,9 @@ cdrom_rewind () {
else
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -62,7 +242,7 @@
}
if ((char) start_addr.second < 0)
{
-@@ -223,9 +226,9 @@
+@@ -223,9 +388,9 @@ cdrom_rewind () {
else /* normal case */
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -74,7 +254,7 @@
}
if ((char) start_addr.second < 0)
{
-@@ -274,7 +277,7 @@
+@@ -274,7 +439,7 @@ cdrom_rewind () {
{
if (scanivid == -1)
scanivid = XtAppAddTimeOut(appc,
@@ -83,7 +263,7 @@
scan_update, NULL);
cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */
-@@ -304,7 +307,6 @@
+@@ -304,7 +469,6 @@ cdrom_ff () {
struct msf start_addr, end_addr, next_start;
char t;
int curtrack;
@@ -91,7 +271,7 @@
if (cdrom_get_curmsf(&start_addr) == -1) {
debug_printf(1, "ff: error reading location\n");
-@@ -332,11 +334,11 @@
+@@ -332,11 +496,11 @@ cdrom_ff () {
if (((cdi.state & CDROM_STATE_PLAY) &&
((next_start.minute * 60) + next_start.second) <=
((start_addr.minute * 60) + start_addr.second +
@@ -105,7 +285,7 @@
{
/* start at end of current track */
-@@ -346,9 +348,9 @@
+@@ -346,9 +510,9 @@ cdrom_ff () {
else
{
if (cdi.state & CDROM_STATE_PAUSE) {
@@ -117,7 +297,7 @@
Home |
Main Index |
Thread Index |
Old Index