[Pkg-wmaker-commits] [wmcdplay] 60/79: debian/patches: Remove directory; patches applied upstream.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 11:04:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmcdplay.
commit be43dcbc9d53075bea547c4ed9ed77ff79689915
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Thu Dec 18 17:02:12 2014 -0600
debian/patches: Remove directory; patches applied upstream.
---
debian/patches/add_debugging_comments.patch | 28 --
debian/patches/add_interval_option.patch | 48 ---
debian/patches/add_parentheses.patch | 21 --
debian/patches/build_without_manpage.patch | 19 --
debian/patches/change_artwork_dir.patch | 19 --
debian/patches/fix_hurd_ftbfs.patch | 28 --
debian/patches/install_art_scripts.patch | 57 ----
debian/patches/kfreebsd_port.patch | 491 ----------------------------
debian/patches/remove_extra_arg.patch | 20 --
debian/patches/series | 10 -
debian/patches/set_remain_to_zero.patch | 21 --
11 files changed, 762 deletions(-)
diff --git a/debian/patches/add_debugging_comments.patch b/debian/patches/add_debugging_comments.patch
deleted file mode 100644
index e337075..0000000
--- a/debian/patches/add_debugging_comments.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: Add debugging comments to cdctl.h.
- Patch created for some version between 1.0beta1-5 and and 1.0beta1-8.
- Converted to quilt for 1.0beta-12.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/cdctl.h
-+++ b/cdctl.h
-@@ -213,9 +213,19 @@
- start = cd_trklist[status_track].track_start;
- stop = start + cd_trklist[status_track].track_len - _CDCTL_SENSITIVITY;
- now = ((sc.cdsc_absaddr.msf.minute) * 60 + sc.cdsc_absaddr.msf.second) * 75 + sc.cdsc_absaddr.msf.frame - CD_MSF_OFFSET;
-+/*
-+cout << "=============" << endl;
-+cout << "start:" << start << endl;
-+cout << "stop:" << stop << endl;
-+cout << "now:" << now << endl;
-+*/
- if(now>0 && (now<start || now>=stop)){
- status_state=ssPlaying;
- selecttrack();
-+/*
-+cout << "Play track " << status_track << endl;
-+cout << "=============" << endl;
-+*/
- doStatus();
- return;
- }
diff --git a/debian/patches/add_interval_option.patch b/debian/patches/add_interval_option.patch
deleted file mode 100644
index b7fde79..0000000
--- a/debian/patches/add_interval_option.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Description: Add -i option so users can specify cd polling interval.
- Patch created for 1.0beta1-2. Converted to quilt for 1.0beta-12.
-Bug-Debian: http://bugs.debian.org/25121
-Author: Marcelo E. Magallon <mmagallo at debian.org>
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/wmcdplay.cc
-+++ b/wmcdplay.cc
-@@ -81,6 +81,7 @@
- char artwrkf[256]="";
- int tsel=1;
- int vol=-1; // -1 means don't set volume
-+int uinterval_e=UINTERVAL_E;
-
- // X-Windows basics - standard
- Atom _XA_GNUSTEP_WM_FUNC;
-@@ -226,7 +227,7 @@
- }
- }
- ucount++;
-- if(ucount>=((mode==ssNoCD || mode==ssTrayOpen) ? UINTERVAL_E : UINTERVAL_N))
-+ if(ucount>=((mode==ssNoCD || mode==ssTrayOpen) ? uinterval_e : UINTERVAL_N))
- checkStatus(false);
- XFlush(d_display);
- usleep(50000);
-@@ -364,6 +365,7 @@
- fprintf(stderr, " -f artwork_file load the specified artwork file\n");
- fprintf(stderr, " -t track_selection set track selection (between 0 and 4)\n");
- fprintf(stderr, " -v volume set the cdrom volume (between 0 and 255)\n");
-+ fprintf(stderr, " -i interval interval in 1/20 seconds between cd polls when empty\n");
- fprintf(stderr, " -l led_color use the specified color for led displays\n");
- fprintf(stderr, " -b back_color use the specified color for backgrounds\n");
- fprintf(stderr, " -d cd_device use specified device (rather than /dev/cdrom)\n");
-@@ -391,6 +393,13 @@
- }
- continue;
- }
-+ if(strcmp(argv[i], "-i")==0){
-+ if(i<argc-1){
-+ i++;
-+ sscanf(argv[i], "%i", &uinterval_e);
-+ }
-+ continue;
-+ }
- if(strcmp(argv[i], "-f")==0){
- artwrk=true;
- if(i<argc-1){
diff --git a/debian/patches/add_parentheses.patch b/debian/patches/add_parentheses.patch
deleted file mode 100644
index 7e736ba..0000000
--- a/debian/patches/add_parentheses.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: Add parentheses in cdctl.h.
- This avoids the following warning during build:
- "warning: suggest parentheses around assignment used as truth value
- [-Wparentheses]"
- .
- Patch created for some version between 1.0beta1-5 and and 1.0beta1-8.
- Converted to quilt for 1.0beta-12.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/cdctl.h
-+++ b/cdctl.h
-@@ -85,7 +85,7 @@
- tracksel=tsRandom;
- tskOurPlay=false;
-
-- if(cdfdopen=(cdfd=open(device,O_RDONLY | O_NONBLOCK))!=-1){
-+ if((cdfdopen = (cdfd = open(device,O_RDONLY | O_NONBLOCK))) != -1) {
- status_state=ssNoCD;
- status_track=0;
- status_pos=0;
diff --git a/debian/patches/build_without_manpage.patch b/debian/patches/build_without_manpage.patch
deleted file mode 100644
index 7df52f1..0000000
--- a/debian/patches/build_without_manpage.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Build without manpage.
- Switch from using ComplexProgramTarget() to ComplexProgramTargetNoMan() in
- IMakefile. Otherwise, build fails with:
- "*** No rule to make target `wmcdplay.man', needed by `wmcdplay._man'."
- .
- Patch created for 1.0beta1-8. Converted to quilt for 1.0beta-12.
-Bug-Debian: http://bugs.debian.org/123732
-Author: Anthony Wong <ypwong at debian.org>
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/Imakefile
-+++ b/Imakefile
-@@ -5,4 +5,4 @@
- SRCS = wmcdplay.cc
- OBJS = wmcdplay.o
-
--ComplexProgramTarget(wmcdplay)
-+ComplexProgramTargetNoMan(wmcdplay)
diff --git a/debian/patches/change_artwork_dir.patch b/debian/patches/change_artwork_dir.patch
deleted file mode 100644
index 52a8c0d..0000000
--- a/debian/patches/change_artwork_dir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Change artwork installation directory.
- Move artwork files to /usr/share/wmcdplay to conform to FHS.
- .
- Patch created for 1.0beta1-2. Converted to quilt for 1.0beta-12.
-Author: Marcelo E. Magallon <mmagallo at debian.org>
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/wmcdplay.cc
-+++ b/wmcdplay.cc
-@@ -20,7 +20,7 @@
- #define CLASS "WMCDPlay"
-
- // User defines - custom
--#define SYSARTDIR "/usr/X11R6/lib/X11/wmcdplay/"
-+#define SYSARTDIR "/usr/share/wmcdplay/"
- #define CDDEV "/dev/cdrom"
- #define BACKCOLOR "#282828"
- #define LEDCOLOR "green"
diff --git a/debian/patches/fix_hurd_ftbfs.patch b/debian/patches/fix_hurd_ftbfs.patch
deleted file mode 100644
index 8894671..0000000
--- a/debian/patches/fix_hurd_ftbfs.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: wmcdplay: FTBFS on hurd-i386
- Hello,
- .
- wmcdplay currently FTBFS on hurd-i386, due to inclusion of a linux-specific
- header <linux/cdrom.h>. The attached patch fixes it by including
- <sys/cdrom.h> instead, could you please apply it?
- .
- Thanks,
- Samuel
-Author: Samuel Thibault <sthibault at debian.org>
-Bug-Debian: http://bugs.debian.org/647964
-Last-Update: 2014-07-29
-
---- a/cdctl.h
-+++ b/cdctl.h
-@@ -30,7 +30,12 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifdef __linux__
- #include <linux/cdrom.h>
-+#endif
-+#ifdef __GNU__
-+#include <sys/cdrom.h>
-+#endif
-
- // CD status values
- #define ssData 0
diff --git a/debian/patches/install_art_scripts.patch b/debian/patches/install_art_scripts.patch
deleted file mode 100644
index eea7996..0000000
--- a/debian/patches/install_art_scripts.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Description: Install scripts for creating artwork.
- There are two scripts for creating artwork files included in the wmcdplay
- source. Previously, they were not included in the Debian package.
- .
- Beginning in version 1.0beta1-13, they are installed in /usr/lib/wmcdplay.
- This patch updates the makeall script to reflect this location and updates
- the ARTWORK documentation file accordingly.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-08-01
-
---- a/XPM/makeall
-+++ b/XPM/makeall
-@@ -1,3 +1,3 @@
- #!/bin/sh
- echo "Making all artwork files"
--find ./* -type d -exec ./makeart {} \;
-+find ./* -type d -exec /usr/lib/wmcdplay/makeart {} \;
---- a/ARTWORK
-+++ b/ARTWORK
-@@ -247,10 +247,29 @@
- ARTWORK FILES
- =============
-
--All the above files should be placed in an appropriately named directory in wmcdplay/XPM/
--and the script wmcdplay/XPM/makeall should be executed.
--You should end up with a new .art file in wmcdplay/XPM/
--You should be able to load wmcdplay with this artwork using the "-f artwork_file" command
--line argument
--You should also be able to make your new artwork the compile-time default by changing the
--symbolic link wmcdplay/XPM/standard.art point to it, and recompiling
-\ No newline at end of file
-+ Suppose you have created the files as outlined above in the directory
-+ ~/wmcdplay/foo. Then you can run
-+
-+ cd ~/wmcdplay
-+ /usr/lib/wmcdplay/makeart foo
-+
-+ You can then use your new artwork file by running
-+
-+ wmcdplay -f ~/wmcdplay/foo.art
-+
-+ Additionally, you can run
-+
-+ sudo mv ~/wmcdplay/foo.art /usr/share/wmcdplay
-+
-+ And then you only need to run
-+
-+ wmcdplay -f foo.art
-+
-+ If you have created multiple artwork files in separate subdirectories of
-+ ~/wmcdplay, you can convert them to .art files all at once using
-+
-+ cd ~/wmcdplay
-+ /usr/lib/wmcdplay/makeall
-+
-+ Finally, if you compile wmcdplay from source, you can replace the default
-+ artwork file with another by pointing the symlink XPM/standard.art at it.
diff --git a/debian/patches/kfreebsd_port.patch b/debian/patches/kfreebsd_port.patch
deleted file mode 100644
index 3fb5cd1..0000000
--- a/debian/patches/kfreebsd_port.patch
+++ /dev/null
@@ -1,491 +0,0 @@
-Description: Port wmcdplay to Debian GNU/kFreeBSD
- As is, wmcdplay does not build on FreeBSD systems. Although it has since
- been deleted, a port of wmcdplay for FreeBSD was available. It consisted
- primarily of the following patch to cdctl.h:
- https://svnweb.freebsd.org/ports/head/audio/wmcdplay/files/
- patch-aa?revision=56594&view=co&pathrev=56594
- .
- This patch includes this patched version when building kfreebsd binaries.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-08-02
-
-Index: wmcdplay/wmcdplay.cc
-===================================================================
---- wmcdplay.orig/wmcdplay.cc 2014-08-02 05:07:18.000000000 -0600
-+++ wmcdplay/wmcdplay.cc 2014-08-02 05:07:18.000000000 -0600
-@@ -35,7 +35,11 @@
- #include <unistd.h>
-
- // Includes - custom
-+#ifdef __FreeBSD_kernel__
-+#include "cdctl_freebsd.h"
-+#else
- #include "cdctl.h"
-+#endif
-
- // X-Windows includes - standard
- #include <X11/X.h>
-Index: wmcdplay/cdctl_freebsd.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ wmcdplay/cdctl_freebsd.h 2014-08-02 05:15:13.000000000 -0600
-@@ -0,0 +1,459 @@
-+// cdctl.h - CDCtl class provides easy control of cd audio functions
-+// 05/09/98 Release 1.0 Beta1
-+// Copyright (C) 1998 Sam Hawker <shawkie at geocities.com>
-+// This software comes with ABSOLUTELY NO WARRANTY
-+// This software is free software, and you are welcome to redistribute it
-+// under certain conditions
-+// See the README file for a more complete notice.
-+
-+// Although cdctl.h is an integral part of wmcdplay, it may also be distributed seperately.
-+
-+// Change this define to alter the size of forward and backward skips (in frames)
-+// Yes, I know this should really be a method of CDCtl
-+#define _CDCTL_SKIP_SIZE 1125
-+
-+// Try defining some of these. They may improve performance or reliability
-+// (or just plain make it work)
-+// #define _CDCTL_STOP_BEFORE_PLAY
-+// #define _CDCTL_START_BEFORE_PLAY
-+// #define _CDCTL_SOFT_STOP
-+
-+// Define this if it stops after each track
-+#define _CDCTL_SENSITIVE_EOT
-+// If it still stops for a while between tracks, increase this (0-75 is a sensible range)
-+#define _CDCTL_SENSITIVITY 0
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <sys/ioctl.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <sys/cdio.h>
-+#include <arpa/inet.h>
-+#define CD_MSF_OFFSET 150
-+
-+// CD status values
-+#define ssData 0
-+#define ssStopped 1
-+#define ssPlaying 2
-+#define ssPaused 3
-+#define ssNoCD 4
-+#define ssTrayOpen 5
-+
-+// Audio command values
-+#define acStop 0
-+#define acPlay 1
-+#define acPause 2
-+#define acResume 3
-+#define acPrev 4
-+#define acNext 5
-+#define acRewd 6
-+#define acFFwd 7
-+#define acEject 8
-+#define acClose 9
-+
-+// Track selection values (what to do when I've played the requested track)
-+// Note: Track selection is not perfect - so use tsNone if you want to avoid trouble.
-+// Basically, if we receive a CDROM_AUDIO_COMPLETED status, then we have to decide what to do.
-+// If we think the last play command was ours (Next/Prev/FFwd/Rewd don't count), then we do something,
-+// depending on the current track selection mode.
-+// Failures: Sometimes we may think we sent the last play command when we did not (if we didn't see play stop in
-+// in between).
-+// If another application is polling the status, it may receive the CDROM_AUDIO_COMPLETED we are looking
-+// for, and we will not, so will think play was stopped manually.
-+// Similarly, we may read the CDROM_AUDIO_COMPLETED status when we don't want it, such that the other
-+// application never sees it.
-+// Verdict: Linux audio cdrom handling is broken.
-+// Update: New define _CDCTL_SENSITIVE_EOT may help in cases where CDROM_AUDIO_COMPLETED is not being returned
-+// correctly. It may, however, interfere with other running cd players.
-+
-+// Update: I think this works like a dream now. Even with many cd players sharing a cdrom. Let me know if not!!
-+
-+#define tsNone 0 // Just stop
-+#define tsRepeat 1 // Play it again
-+#define tsNext 2 // Play next track (stop at end of CD)
-+#define tsRepeatCD 3 // Play next track (start from first track if end is reached)
-+#define tsRandom 4 // Play a track at random
-+
-+class CDCtl
-+{
-+public:
-+ CDCtl(char *dname){
-+ device=(char *)malloc(sizeof(char)*(strlen(dname)+1));
-+ strcpy(device,dname);
-+ srand(getpid());
-+ tracksel=tsRandom;
-+ tskOurPlay=false;
-+
-+ if(cdfdopen=(cdfd=open(device,O_RDONLY | O_NONBLOCK))!=-1){
-+ status_state=ssNoCD;
-+ status_track=0;
-+ status_pos=0;
-+ cd_trklist=NULL;
-+ doStatus();
-+ readVolume();
-+ }
-+ }
-+ ~CDCtl(){
-+ if(cdfdopen){
-+ close(cdfd);
-+ if(device!=NULL)
-+ free(device);
-+ if(cd_trklist!=NULL)
-+ free(cd_trklist);
-+ }
-+ }
-+ bool openOK(){
-+ return cdfdopen;
-+ }
-+ void doAudioCommand(int cmd){
-+ if(cdfdopen){
-+ int newtrk=status_track;
-+ switch(cmd){
-+ case acStop:
-+
-+ #ifdef _CDCTL_SOFT_STOP
-+ ioctl(cdfd,CDIOCSTART);
-+ #endif
-+ #ifndef _CDCTL_SOFT_STOP
-+ ioctl(cdfd,CDIOCSTOP);
-+ #endif
-+ tskOurPlay=false;
-+
-+ break;
-+ case acPlay:
-+ status_state=ssPlaying;
-+ select(status_track);
-+ tskOurPlay=true;
-+ break;
-+ case acPause:
-+ ioctl(cdfd,CDIOCPAUSE);
-+ break;
-+ case acResume:
-+ ioctl(cdfd,CDIOCRESUME);
-+ break;
-+ case acPrev:
-+ newtrk--;
-+ if(newtrk<0)
-+ newtrk=cd_tracks-1;
-+ select(newtrk);
-+ break;
-+ case acNext:
-+ newtrk++;
-+ if(newtrk>cd_tracks-1)
-+ newtrk=0;
-+ select(newtrk);
-+ break;
-+ case acRewd:
-+ if(status_pos>cd_trklist[status_track].track_start+_CDCTL_SKIP_SIZE){
-+ status_pos-=_CDCTL_SKIP_SIZE;
-+ play();
-+ }
-+ break;
-+ case acFFwd:
-+ if(status_pos<cd_trklist[status_track].track_start+cd_trklist[status_track].track_len-_CDCTL_SKIP_SIZE){
-+ status_pos+=_CDCTL_SKIP_SIZE;
-+ play();
-+ }
-+ break;
-+ case acEject:
-+ if(ioctl(cdfd,CDIOCEJECT))
-+ status_state=ssNoCD;
-+ else
-+ status_state=ssTrayOpen;
-+ break;
-+ case acClose:
-+ ioctl(cdfd,CDIOCCLOSE);
-+ status_state=ssNoCD;
-+ break;
-+ }
-+ doStatus();
-+ }
-+ }
-+ void doStatus(){
-+ if(cdfdopen){
-+ struct ioc_read_subchannel sc;
-+ struct cd_sub_channel_info csci;
-+ sc.address_format=CD_MSF_FORMAT;
-+ sc.track = 0;
-+ sc.data=&csci;
-+ sc.data_len=sizeof(csci);
-+ sc.data_format=CD_CURRENT_POSITION;
-+ if(ioctl(cdfd, CDIOCREADSUBCHANNEL, &sc)){
-+ if(status_state!=ssNoCD)
-+ status_state=ssTrayOpen;
-+ status_track=0;
-+ status_pos=0;
-+ tskOurPlay=false;
-+ }
-+ else{
-+ if(status_state==ssNoCD || status_state==ssTrayOpen)
-+ readTOC();
-+ int start,now,stop;
-+ switch(csci.header.audio_status){
-+ case CD_AS_PLAY_IN_PROGRESS:
-+ if(status_state==ssStopped)
-+ tskOurPlay=false;
-+ status_state=ssPlaying;
-+ break;
-+ case CD_AS_PLAY_PAUSED:
-+ if(status_state==ssStopped)
-+ tskOurPlay=false;
-+ status_state=ssPaused;
-+ break;
-+ case CD_AS_PLAY_COMPLETED:
-+ if(tskOurPlay){
-+ status_state=ssPlaying;
-+ selecttrack();
-+ doStatus();
-+ return;
-+ }
-+ else
-+ status_state=ssStopped;
-+ break;
-+ default:
-+
-+ #ifdef _CDCTL_SENSITIVE_EOT
-+ if(tskOurPlay){
-+ start = cd_trklist[status_track].track_start;
-+ stop = start + cd_trklist[status_track].track_len - _CDCTL_SENSITIVITY;
-+ now = ((csci.what.position.absaddr.msf.minute) * 60 + csci.what.position.absaddr.msf.second) * 75 + csci.what.position.absaddr.msf.frame - CD_MSF_OFFSET;
-+ if(now>0 && (now<start || now>=stop)){
-+ status_state=ssPlaying;
-+ selecttrack();
-+ doStatus();
-+ return;
-+ }
-+ else
-+ status_state=ssStopped;
-+ }
-+ else
-+ #endif
-+
-+ status_state=ssStopped;
-+ }
-+ trackinfo(&csci);
-+ if(cd_trklist[status_track].track_data)
-+ status_state=ssData;
-+ }
-+ }
-+ }
-+ void setVolume(int l, int r){
-+ if(cdfdopen){
-+ struct ioc_vol vol;
-+ vol.vol[0]=l;
-+ vol.vol[1]=r;
-+ vol.vol[2]=0;
-+ vol.vol[3]=0;
-+ ioctl(cdfd,CDIOCSETVOL,&vol);
-+ readVolume();
-+ }
-+ }
-+ void readVolume(){
-+ if(cdfdopen){
-+ struct ioc_vol vol;
-+ ioctl(cdfd,CDIOCGETVOL,&vol);
-+ status_volumel=vol.vol[0];
-+ status_volumer=vol.vol[1];
-+ }
-+ }
-+ int getVolumeL(){
-+ return status_volumel;
-+ }
-+ int getVolumeR(){
-+ return status_volumer;
-+ }
-+ void setTrackSelection(int ts){
-+ tracksel=ts;
-+ }
-+ int getTrackSelection(){
-+ return tracksel;
-+ }
-+ char *getDevName(){
-+ return device;
-+ }
-+ int getCDTracks(){
-+ return cd_tracks;
-+ }
-+ int getCDLen(){
-+ return cd_len;
-+ }
-+ int getTrackStart(int trk){
-+ return cd_trklist[trk-1].track_start;
-+ }
-+ int getTrackLen(int trk){
-+ return cd_trklist[trk-1].track_len;
-+ }
-+ bool getTrackData(int trk){
-+ return cd_trklist[trk-1].track_data;
-+ }
-+ int getStatusState(){
-+ return status_state;
-+ }
-+ int getStatusTrack(){
-+ return status_track+1;
-+ }
-+ int getStatusPosAbs(){
-+ return status_pos-cd_trklist[0].track_start;
-+ }
-+ int getStatusPosRel(){
-+ return status_pos-cd_trklist[status_track].track_start;
-+ }
-+private:
-+ void readTOC(){
-+ if(cd_trklist!=NULL)
-+ free(cd_trklist);
-+ struct ioc_toc_header hdr;
-+ ioctl(cdfd, CDIOREADTOCHEADER, &hdr);
-+ cd_tracks=hdr.ending_track;
-+ cd_trklist=(struct CDTrack *)malloc(cd_tracks*sizeof(struct CDTrack));
-+#ifdef __FreeBSD_kernel__
-+ struct ioc_read_toc_entry te;
-+
-+ te.data_len = (cd_tracks + 1) * sizeof(struct cd_toc_entry);
-+ te.data = (struct cd_toc_entry *)malloc(te.data_len);
-+ te.address_format = CD_LBA_FORMAT;
-+ te.starting_track = 0;
-+ ioctl(cdfd, CDIOREADTOCENTRYS, &te);
-+ for(int i = 0; i < cd_tracks; i++) {
-+ cd_trklist[i].track_data = te.data[i].control & 4 ? true : false;
-+ cd_trklist[i].track_start = ntohl(te.data[i].addr.lba);
-+ cd_trklist[i].track_len = ntohl(te.data[i + 1].addr.lba)
-+ - cd_trklist[i].track_start;
-+ }
-+ cd_len = ntohl(te.data[cd_tracks].addr.lba);
-+ free(te.data);
-+#else
-+ struct cdrom_tocentry te;
-+ int prev_addr=0;
-+
-+ for(int i=0;i<=cd_tracks;i++){
-+ if(i==cd_tracks)
-+ te.cdte_track=CDROM_LEADOUT;
-+ else
-+ te.cdte_track=i+1;
-+ te.cdte_format=CDROM_MSF; // I think it is ok to read this as LBA, but for a quiet life...
-+ ioctl(cdfd, CDROMREADTOCENTRY, &te);
-+ int this_addr=((te.cdte_addr.msf.minute * 60) + te.cdte_addr.msf.second) * 75 + te.cdte_addr.msf.frame - CD_MSF_OFFSET;
-+ if(i>0)
-+ cd_trklist[i-1].track_len = this_addr - prev_addr - 1;
-+ prev_addr=this_addr;
-+ if(i<cd_tracks){
-+ cd_trklist[i].track_data = te.cdte_ctrl & CDROM_DATA_TRACK ? true : false;
-+ cd_trklist[i].track_start = this_addr;
-+ }
-+ else
-+ cd_len = this_addr;
-+ }
-+#endif
-+ }
-+ void trackinfo(struct cd_sub_channel_info *subchnl){
-+ int currenttrack = status_track;
-+
-+ if(status_state==ssPlaying || status_state==ssPaused){
-+ status_pos=((subchnl->what.position.absaddr.msf.minute) * 60 + subchnl->what.position.absaddr.msf.second) * 75 + subchnl->what.position.absaddr.msf.frame - CD_MSF_OFFSET;
-+ for(status_track=0;status_track<cd_tracks;status_track++){
-+ if(status_pos<cd_trklist[status_track].track_start+cd_trklist[status_track].track_len) {
-+ if (status_track != currenttrack) {
-+ status_track = currenttrack;
-+ }
-+ break;
-+ }
-+ }
-+ }
-+ }
-+ void play(){
-+ struct ioc_play_msf pmsf;
-+ int abs0=status_pos + CD_MSF_OFFSET;
-+ int abs1=cd_trklist[status_track].track_start + cd_trklist[status_track].track_len - 1 + CD_MSF_OFFSET;
-+ pmsf.start_m=abs0/(75*60);
-+ pmsf.end_m=abs1/(75*60);
-+ pmsf.start_s=(abs0%(75*60))/75;
-+ pmsf.end_s=(abs1%(75*60))/75;
-+ pmsf.start_f=abs0%75;
-+ pmsf.end_f=abs1%75;
-+
-+ #ifdef _CDCTL_STOP_BEFORE_PLAY
-+ ioctl(cdfd,CDIOCSTOP);
-+ #endif
-+ #ifdef _CDCTL_START_BEFORE_PLAY
-+ ioctl(cdfd,CDIOCSTART);
-+ #endif
-+
-+ ioctl(cdfd,CDIOCPLAYMSF,&pmsf);
-+ }
-+ void select(int trk){
-+ status_track=trk;
-+ status_pos=cd_trklist[status_track].track_start;
-+ if(status_state==ssPlaying){
-+ if(cd_trklist[status_track].track_data){
-+
-+ #ifdef _CDCTL_HARD_STOP
-+ ioctl(cdfd,CDIOCSTOP);
-+ #endif
-+ #ifndef _CDCTL_HARD_STOP
-+ ioctl(cdfd,CDIOCSTART);
-+ #endif
-+ tskOurPlay=false;
-+
-+ }
-+ else
-+ play();
-+ }
-+ }
-+ void selecttrack(){
-+ int newtrk=status_track;
-+ do{
-+ switch(tracksel){
-+ case tsNone:
-+ tskOurPlay=false;
-+ return;
-+ break;
-+ case tsRepeat:
-+ // do nothing
-+ break;
-+ case tsNext:
-+ newtrk++;
-+ if(newtrk>=cd_tracks){
-+ tskOurPlay=false;
-+ return;
-+ }
-+ break;
-+ case tsRepeatCD:
-+ newtrk++;
-+ if(newtrk>=cd_tracks)
-+ newtrk=0;
-+ break;
-+ case tsRandom:
-+ newtrk+=(int)((cd_tracks-1)*(float)rand()/RAND_MAX+1);
-+ if(newtrk>=cd_tracks)
-+ newtrk-=cd_tracks;
-+ break;
-+ }
-+ } while(cd_trklist[newtrk].track_data);
-+ select(newtrk);
-+ play();
-+ }
-+ int cdfd;
-+ int cdfdopen;
-+ char *device;
-+ int tracksel;
-+ bool tskOurPlay;
-+
-+ struct CDTrack{
-+ int track_start;
-+ int track_len;
-+ bool track_data;
-+ };
-+
-+ int cd_tracks;
-+ int cd_len;
-+ struct CDTrack *cd_trklist;
-+ int status_state;
-+ int status_track;
-+ int status_pos;
-+ int status_volumel;
-+ int status_volumer;
-+};
diff --git a/debian/patches/remove_extra_arg.patch b/debian/patches/remove_extra_arg.patch
deleted file mode 100644
index abd507a..0000000
--- a/debian/patches/remove_extra_arg.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: Remove extra argument to format in fprintf.
- This avoids the following warning during build:
- "warning: too many arguments for format [-Wformat-extra-args]"
- .
- Patch created for some version between 1.0beta1-5 and and 1.0beta1-8.
- Converted to quilt for 1.0beta-12.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/wmcdplay.cc
-+++ b/wmcdplay.cc
-@@ -632,7 +632,7 @@
- sprintf(artfilenbuf, "%s%s", SYSARTDIR, artfilen);
- artfile=fopen(artfilenbuf, "r");
- if(artfile==NULL){
-- fprintf(stderr,"%s : Tried to find artwork file, but failed.\n", NAME, artfilen);
-+ fprintf(stderr,"%s : Tried to find artwork file, but failed.\n", NAME);
- return false;
- }
- }
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 7d91e67..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,10 +0,0 @@
-change_artwork_dir.patch
-add_interval_option.patch
-build_without_manpage.patch
-set_remain_to_zero.patch
-remove_extra_arg.patch
-add_parentheses.patch
-add_debugging_comments.patch
-fix_hurd_ftbfs.patch
-install_art_scripts.patch
-kfreebsd_port.patch
diff --git a/debian/patches/set_remain_to_zero.patch b/debian/patches/set_remain_to_zero.patch
deleted file mode 100644
index c46b189..0000000
--- a/debian/patches/set_remain_to_zero.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: Set remain variable to zero.
- This avoids an possible undeclared variable error five lines later if remain
- is never set:
- "if(remain<2250)"
- .
- Patch created for some version between 1.0beta1-5 and and 1.0beta1-8.
- Converted to quilt for 1.0beta-12.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-07-29
-
---- a/wmcdplay.cc
-+++ b/wmcdplay.cc
-@@ -485,7 +485,7 @@
- drawText(art_ledpos[1][0], art_ledpos[1][1], trackstr);
- }
- if(mode==ssPlaying || mode==ssPaused || mode==ssStopped){
-- int remain;
-+ int remain = 0;
- if(tdisplay==0)
- remain=cdctl->getTrackLen(cdctl->getStatusTrack())-pos;
- if(tdisplay==1)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcdplay.git
More information about the Pkg-wmaker-commits
mailing list