diff options
author | darcy <darcy> | 2006-08-12 14:51:39 +0000 |
---|---|---|
committer | darcy <darcy> | 2006-08-12 14:51:39 +0000 |
commit | 946216a6c1c16124a468c0801db6a67e0abec39d (patch) | |
tree | 79921529173faf53c99bf1fe579b30e6efc0ccc0 /audio | |
parent | cdfe72b197eac1320407a58e97823a63c6f0c2b7 (diff) | |
download | pkgsrc-946216a6c1c16124a468c0801db6a67e0abec39d.tar.gz |
Rearrange position of some static functions to allow them to self-define
and compile under GCC-4.
Bump PKGREVISION.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/xcdplayer/Makefile | 4 | ||||
-rw-r--r-- | audio/xcdplayer/distinfo | 6 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-ah | 398 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-aj | 72 |
4 files changed, 433 insertions, 47 deletions
diff --git a/audio/xcdplayer/Makefile b/audio/xcdplayer/Makefile index 2abc24c099c..8a7e41d3cf7 100644 --- a/audio/xcdplayer/Makefile +++ b/audio/xcdplayer/Makefile @@ -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 --git a/audio/xcdplayer/distinfo b/audio/xcdplayer/distinfo index e5fb1fcbd06..0b95a162b77 100644 --- a/audio/xcdplayer/distinfo +++ b/audio/xcdplayer/distinfo @@ -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-ad) = 7a8956993438fe592aa36f6452222b6aa29ca911 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 --git a/audio/xcdplayer/patches/patch-ah b/audio/xcdplayer/patches/patch-ah index 33e9f351454..5bbbe22f79f 100644 --- a/audio/xcdplayer/patches/patch-ah +++ b/audio/xcdplayer/patches/patch-ah @@ -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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ { 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ } 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ } 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ { /* 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 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ } if (start_addr.second >= 60) { -@@ -360,9 +362,9 @@ +@@ -360,9 +524,9 @@ cdrom_ff () { else { if (cdi.state & CDROM_STATE_PAUSE) { @@ -129,7 +309,7 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ } if (start_addr.second >= 60) { -@@ -413,7 +415,7 @@ +@@ -413,7 +577,7 @@ cdrom_ff () { { if (scanivid == -1) scanivid = XtAppAddTimeOut(appc, @@ -138,7 +318,93 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ scan_update, NULL); cdi.state &= ~CDROM_STATE_PAUSE; /* allow timer to change */ -@@ -557,7 +559,7 @@ +@@ -435,85 +599,6 @@ cdrom_ff () { + + + /* +- * 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(); +-} +- +-/* + * scan_update is called when the scan timeout fires; it updates the timer + * and calls the label update routine. + */ +@@ -557,7 +642,7 @@ scan_update(data, id) cdi.state &= ~CDROM_STATE_STOP; } ivid = XtAppAddTimeOut(appc, @@ -147,7 +413,7 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ scan_update, NULL); } else -@@ -574,7 +576,7 @@ +@@ -574,7 +659,7 @@ scan_update(data, id) } ivid = XtAppAddTimeOut(appc, @@ -156,21 +422,93 @@ $NetBSD: patch-ah,v 1.4 2005/12/11 20:48:46 joerg Exp $ scan_update, NULL); } else if (scanivid != -1) { -@@ -662,7 +664,7 @@ - cdi.state &= ~CDROM_STATE_STOP; - } - ivid = XtAppAddTimeOut(appc, +@@ -607,89 +692,3 @@ update_status(data, id) + /* Reset timer */ + stativid = XtAppAddTimeOut(appc, 1000, update_status, NULL); + } +- +-/* +- * 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)(scanPauseInterval * 1000.0), -+ (int)(app_data.scanPauseInterval * 1000.0), - update_track, NULL); - } - else -@@ -679,7 +681,7 @@ - } - - ivid = XtAppAddTimeOut(appc, +- 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)(scanPauseInterval * 1000.0), -+ (int)(app_data.scanPauseInterval * 1000.0), - update_track, NULL); - } - else +- update_track, NULL); +- } +- else +- { +- if ((timer_fsecs++ % timer_mod) == 0) { +- timer_button_update(); +- } +- ivid = XtAppAddTimeOut(appc, TIMER_PERIOD, +- update_track, NULL); +- } +- } +-} +- diff --git a/audio/xcdplayer/patches/patch-aj b/audio/xcdplayer/patches/patch-aj index 3a8d3b74956..88268226210 100644 --- a/audio/xcdplayer/patches/patch-aj +++ b/audio/xcdplayer/patches/patch-aj @@ -1,22 +1,70 @@ -$NetBSD: patch-aj,v 1.3 1999/09/06 16:37:43 tron Exp $ +$NetBSD: patch-aj,v 1.4 2006/08/12 14:51:39 darcy Exp $ ---- main.c.orig Tue Jan 12 19:59:36 1993 -+++ main.c Mon Sep 6 18:37:05 1999 -@@ -23,6 +23,8 @@ +--- main.c.orig Tue Jan 12 19:59:36 1993 ++++ main.c +@@ -23,13 +23,36 @@ Widget top_form; +extern AppData app_data; + ++static void ++chk_debug(argc, argv) ++ int argc; ++ char **argv; ++{ ++ int i; ++ ++ /* ugly hack */ ++ for (i = 1; i < argc; i++) { ++ if (strcmp(argv[i], "-debug") == 0) { ++ app_data.debug = True; ++ break; ++ } ++ } ++} ++ ++void ++usage() { ++ (void) fprintf(stderr, "usage: xcdplayer [-debug]\n"); ++ ++ exit(1); ++} ++ void main(argc, argv) int argc; -@@ -66,7 +68,7 @@ - /* ugly hack */ - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-debug") == 0) { + char **argv; + { +- static void chk_debug(); +- + chk_debug(argc, argv); + + /* gets resources, & creates main form */ +@@ -55,26 +78,3 @@ main(argc, argv) + + exit(0); + } +- +-static void +-chk_debug(argc, argv) +- int argc; +- char **argv; +-{ +- int i; +- +- /* ugly hack */ +- for (i = 1; i < argc; i++) { +- if (strcmp(argv[i], "-debug") == 0) { - debug = True; -+ app_data.debug = True; - break; - } - } +- break; +- } +- } +-} +- +-void +-usage() { +- (void) fprintf(stderr, "usage: xcdplayer [-debug]\n"); +- +- exit(1); +-} |