debian/0000755000000000000000000000000012222344234007164 5ustar debian/changelog0000644000000000000000000000473712222343767011063 0ustar wmxmms2 (0.6+repack-1) unstable; urgency=low * Repack the original upstream source to replace symlinks to /usr/share/automake-1.9 directory with their contents (additionally remove autom4te.cache dir). This fixes lintian's `source-contains-unsafe-symlink' errors and allows us to drop build dependency on automake 1.9 (closes: #724446). * Add 05-Fix-program-version.patch to fix version number reported by wmxmms2 (closes: #512643). * Standards-Version: 3.9.4 (no changes). -- Robert Luberda Mon, 30 Sep 2013 20:49:11 +0200 wmxmms2 (0.6-6) unstable; urgency=low * Use `3.0 (quilt)' source format. Remove build-dependency on quilt and debian/README.source file. * Switch to debhelper v9 and tiny rules format. * debian/rules: remove .pc/.dpkg-source-unapply file in rules. This fixes broken behaviour of dpkg-buildpackage (see Bug#649521) * Rename and refresh patches with gbp-pq import/export. * debian/control: + Standards-Version: 3.9.2 (no changes); + add VCS fields; + sort the file with wrap-and-sort command. -- Robert Luberda Sun, 19 Feb 2012 17:04:12 +0100 wmxmms2 (0.6-5) unstable; urgency=low * Fix double free error in 03_drmattdestruction.patch. -- Robert Luberda Sun, 21 Mar 2010 16:59:09 +0100 wmxmms2 (0.6-4) unstable; urgency=low * 04_drno.patch: New, to make wxmms2 compile with the latest xmmsclient library. * Standards-Version: 3.8.4 (no changes). -- Robert Luberda Sat, 27 Feb 2010 08:55:58 +0100 wmxmms2 (0.6-3) unstable; urgency=low * 03_drmattdestruction.patch: Make wxmms2 compile & work with the latest libxmmsclient-dev (closes: #533930, #534196). * Standards-Version: 3.8.2 (no changes). * copyright: fix lintian's `copyright-with-old-dh-make-debian-copyright'. -- Robert Luberda Sat, 27 Jun 2009 20:59:51 +0200 wmxmms2 (0.6-2) unstable; urgency=low * Build depend on libxext-dev (closes: #486953). * Standards-Version: 3.8.0. * Add a simple debian/README.source file. -- Robert Luberda Fri, 20 Jun 2008 06:27:36 +0200 wmxmms2 (0.6-1) unstable; urgency=low * Initial release (Closes: #473299). * 01_gcc_warnings.patch: fix gcc warnings. * 02_bogus_errmsg.patch: don't flood stderr with messages about xmms2d connection failures. * debian/wmxmms2.1: provide a simple man page. -- Robert Luberda Sat, 29 Mar 2008 20:33:01 +0100 debian/compat0000644000000000000000000000000212222343767010374 0ustar 9 debian/control0000644000000000000000000000136412222343767010605 0ustar Source: wmxmms2 Section: sound Priority: optional Maintainer: Robert Luberda Build-Depends: debhelper (>= 9), libxext-dev, libxmmsclient-dev (>= 0.7DrNo), libxpm-dev, pkg-config, x11proto-xext-dev Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/users/robert/wmxmms2.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/robert/wmxmms2.git Homepage: http://reboli.nl/ Package: wmxmms2 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: remote-control dockapp for XMMS2 wmxmms2 is a dockapp for WindowMaker and other window managers that support dockable applets. It acts as a remote control for the XMMS2 media player. debian/copyright0000644000000000000000000000116312222343767011132 0ustar This package was debianized by Robert Luberda on Sat, 29 Mar 2008 20:33:01 +0100. It was downloaded from Upstream Author: Remy Bosch Copyright: Copyright (C) 2005 Remy Bosch License: wmxmms2 is released under the terms of the GNU General Public License, Version 2. On Debian GNU/Linux systems you can find a copy of the license in the file `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright (C) 2008 Robert Luberda and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. debian/dirs0000644000000000000000000000001012222343767010051 0ustar usr/bin debian/docs0000644000000000000000000000002112222343767010042 0ustar NEWS README TODO debian/manpages0000644000000000000000000000001312222343767010706 0ustar debian/*.1 debian/patches/0000755000000000000000000000000012222343767010625 5ustar debian/patches/01-gcc-warnings.patch0000644000000000000000000000161012222343767014444 0ustar From: Robert Luberda Date: Sat, 29 Mar 2008 23:34:00 +0100 Subject: 01 gcc warnings. Fix gcc warnings. --- src/wmgeneral.c | 2 +- src/xmms2cif.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wmgeneral.c b/src/wmgeneral.c index ee119e0..fd132d4 100644 --- a/src/wmgeneral.c +++ b/src/wmgeneral.c @@ -445,7 +445,7 @@ void scroller(char *s, int x, int y){ static char S_HOLD [100]; static unsigned int s_offset; static int start_offset; - if(s==NULL || s=="" || s=="\0" || strlen(s)==0 ){ + if(s==NULL || *s=='\0' ){ s=" "; s_offset=0; strcpy(S_HOLD,s); diff --git a/src/xmms2cif.h b/src/xmms2cif.h index 3e38efc..502fc40 100644 --- a/src/xmms2cif.h +++ b/src/xmms2cif.h @@ -19,7 +19,7 @@ volatile unsigned int STATE; #define S_ERROR 99 struct numberinfo { - uint length; + int32_t length; uint played; char title_info[100]; }; debian/patches/02-Bogus-errmsg.patch0000644000000000000000000000152512222343767014444 0ustar From: Robert Luberda Date: Sat, 29 Mar 2008 23:34:00 +0100 Subject: 02 Bogus errmsg. Ignore subsequent "Connection failed" messages --- src/xmms2cif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xmms2cif.c b/src/xmms2cif.c index 84e5527..b092675 100644 --- a/src/xmms2cif.c +++ b/src/xmms2cif.c @@ -18,13 +18,16 @@ uint songlength; * Initiate client for use */ void xmms2connect(void){ + static unsigned int errmsg_shown = 0; srvr = xmmsc_init ("WMxmms2-dev"); if (!srvr || !xmmsc_connect (srvr, varoptions.ip_address)) { - fprintf (stderr, "Connection failed, error: %s\n", xmmsc_get_last_error (srvr)); + if (!errmsg_shown++) + fprintf (stderr, "Connection failed, error: %s\n", xmmsc_get_last_error (srvr)); STATE=S_DOWN; }else{ STATE=S_IDLE; + errmsg_shown = 0; } } debian/patches/03-DrMattDestruction.patch0000644000000000000000000002153212222343767015510 0ustar From: Robert Luberda Date: Sat, 27 Jun 2009 20:51:00 +0200 Subject: 03 DrMattDestruction. Make wxmms2 compile & work with xmmsclient 0.6DrMattDestruction (closes: #533930, #534196) --- src/xmms2cif.c | 172 +++++++++++++++++++++++++++++++++++---------------------- src/xmms2cif.h | 2 +- 2 files changed, 108 insertions(+), 66 deletions(-) diff --git a/src/xmms2cif.c b/src/xmms2cif.c index b092675..ca94d7e 100644 --- a/src/xmms2cif.c +++ b/src/xmms2cif.c @@ -10,10 +10,43 @@ #include "xmms2cif.h" #include /* Needed by basename(char *uri)*/ #include "options.h" -static int res_has_keyword(xmmsc_result_t *res, const char *key); +#include +#include "malloc.h" static uint have_songname; uint songlength; +/* note: in case of error, res is freed */ +static int is_error_getval(xmmsc_result_t *res, const char * msg, xmmsv_t **value) +{ + const char* errbuf; + *value = xmmsc_result_get_value (res); + + if (!*value) { + fprintf (stderr, "xmmsc_result_get_value returned null value\n"); + xmmsc_result_unref(res); + return 2; + } + + + + if (xmmsv_is_error (*value) && + xmmsv_get_error (*value, &errbuf)) { + fprintf (stderr, "%s: %s\n", msg, errbuf); + + xmmsc_result_unref(res); + return 1; + } + return 0; +} + + +static int is_error(xmmsc_result_t *res, const char * msg) +{ + xmmsv_t *value; + return is_error_getval(res, msg, &value); +} + + /** * Initiate client for use */ @@ -38,10 +71,9 @@ void play_cmd(void){ xmmsc_result_t *res; res = xmmsc_playback_start (srvr); xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't start playback: %s\n", - xmmsc_result_get_error (res)); + if (is_error(res, "Couldn't start playback")) { STATE=S_ERROR; + return; }else STATE=S_PLAY; xmmsc_result_unref (res); @@ -54,10 +86,9 @@ void stop_cmd(void){ xmmsc_result_t *res; res = xmmsc_playback_stop (srvr); xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't stop playback: %s\n", - xmmsc_result_get_error (res)); + if (is_error(res, "Couldn't stop playback")) { STATE=S_ERROR; + return; }else STATE=S_IDLE; xmmsc_result_unref (res); @@ -70,10 +101,9 @@ void randomize_cmd(void){ xmmsc_result_t *res; res = xmmsc_playlist_shuffle (srvr, NULL); xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't randomize playlist: %s\n", - xmmsc_result_get_error (res)); + if (is_error (res,"Couldn't randomize playlist" )) { STATE=S_ERROR; + return; } xmmsc_result_unref (res); } @@ -85,10 +115,9 @@ void pause_cmd(void){ xmmsc_result_t *res; res = xmmsc_playback_pause(srvr); xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't pause playback: %s\n", - xmmsc_result_get_error (res)); + if (is_error (res,"Couldn't pause playback" )) { STATE=S_ERROR; + return; }else STATE=S_PAUSE; xmmsc_result_unref (res); @@ -101,23 +130,18 @@ void jmp_cmd(int places){ xmmsc_result_t *res; res = xmmsc_playlist_set_next_rel(srvr, places); xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't go to other file: %s\n", - xmmsc_result_get_error (res)); - xmmsc_result_unref (res); + if (is_error (res,"Couldn't go to other file")) { STATE=S_ERROR; return; } xmmsc_result_unref (res); res = xmmsc_playback_tickle (srvr); - if (xmmsc_result_iserror (res)) { - fprintf (stderr, "Couldn't tickle playback: %s\n", - xmmsc_result_get_error (res)); - xmmsc_result_unref (res); + xmmsc_result_wait (res); + if (is_error (res, "Couldn't tickle playback" )) { STATE=S_ERROR; + return; }else STATE=S_PLAY; - xmmsc_result_wait (res); xmmsc_result_unref (res); } @@ -136,13 +160,6 @@ void next_cmd(void){ } /** - * Determine if a keyword is available - */ -static int res_has_keyword(xmmsc_result_t *res, const char *key){ - return xmmsc_result_get_dict_entry_type (res, key) != XMMSC_RESULT_VALUE_TYPE_NONE; -} - -/** * */ void get_songdata(void){ @@ -155,9 +172,14 @@ void get_songdata(void){ */ void playtime(void){ xmmsc_result_t *res; + xmmsv_t * value; res = xmmsc_playback_playtime(srvr); xmmsc_result_wait (res); - if (!xmmsc_result_get_uint (res, &(numinfo.played))) { + if (is_error_getval(res, "Server error", &value)){ + return; + } + + if (!xmmsv_get_int (value, &(numinfo.played))) { printf ("No time data\n"); } xmmsc_result_unref (res); @@ -168,41 +190,61 @@ void playtime(void){ * Or the filename. */ void title_info(void){ - static uint id_hold=0; - uint id; + static int id_hold=0; + int id; xmmsc_result_t *res; + xmmsv_t *value; + xmmsv_t *dict_entry; + xmmsv_t *infos; + const char *title, *artist, *url; res = xmmsc_playback_current_id(srvr); xmmsc_result_wait (res); have_songname=0; - if(xmmsc_result_iserror (res) || - !xmmsc_result_get_uint (res, &id)){ + if (is_error_getval(res, "Server error", &value)){ + return; + } + if (!xmmsv_get_int (value, &id)) { printf( "Damn no id!\n"); xmmsc_result_unref (res); return; } if (id!=0 && id!=id_hold){ + xmmsc_result_unref (res); res = xmmsc_medialib_get_info (srvr, id); xmmsc_result_wait (res); - xmmsc_result_get_dict_entry_int (res,"duration",&(numinfo.length)); - if (res_has_keyword(res, "title") && - res_has_keyword (res, "artist") ) { - xmmsc_entry_format (numinfo.title_info, - sizeof (numinfo.title_info), - "${artist} - ${title}", res); - } else if (res_has_keyword(res, "title")) { - xmmsc_entry_format (numinfo.title_info, - sizeof (numinfo.title_info), - "${title}",res); - } else if (res_has_keyword(res, "url")) { - char *url, *filename; - xmmsc_result_get_dict_entry_string (res, "url", &url); + + if (is_error_getval(res, "medialib get info returns error", &value)) { + return; + } + + infos = xmmsv_propdict_to_dict (value, NULL); + if (!xmmsv_dict_get (infos, "duration", &dict_entry) || + !xmmsv_get_int (dict_entry, &(numinfo.length))) { + numinfo.length = 0; + } + + *numinfo.title_info = 0; + if (xmmsv_dict_get (infos, "artist", &dict_entry) && + xmmsv_get_string (dict_entry, &artist)) { + strncpy(numinfo.title_info, artist, sizeof(numinfo.title_info)); + } + if (xmmsv_dict_get (infos, "title", &dict_entry) && + xmmsv_get_string (dict_entry, &title)) { + size_t len = strlen(numinfo.title_info); + if (len) { strncpy(numinfo.title_info + len, " - ", sizeof(numinfo.title_info) - len); len+=3;} + strncpy(numinfo.title_info + len, title, sizeof(numinfo.title_info) - len); + } + if (!*numinfo.title_info && xmmsv_dict_get (infos, "url", &dict_entry) && + xmmsv_get_string (dict_entry, &url)) { + char * filename; /* Taking a risk at segfault here ;-) */ - if ((filename=basename(url))!=NULL) { + if ((filename=basename((char*)url))!=NULL) { strncpy(numinfo.title_info,filename, - sizeof(numinfo.title_info)-1); + sizeof(numinfo.title_info)); } } - if (strlen(numinfo.title_info)>0) + + if(*numinfo.title_info) have_songname=1; id_hold=id; } @@ -221,16 +263,17 @@ void check_status(void){ return; } xmmsc_result_t *res; - unsigned int state; + int state; res = xmmsc_playback_status(srvr); xmmsc_result_wait(res); - if(xmmsc_result_iserror(res)) { - printf( "Could not get playback status: %s\n", xmmsc_result_get_error(res) ); - state = S_ERROR; - } - else { - xmmsc_result_get_uint(res, &state); + + xmmsv_t * value; + int ret; + if ((ret = is_error_getval(res, "Server error", &value))) { + if (ret > 1) STATE = S_DOWN; + return; } + xmmsv_get_int(value, &state); xmmsc_result_unref(res); STATE=state; } @@ -253,17 +296,17 @@ void rwnd_cmd(void){ * Jump in time... Just say how far */ void timelaps(int delta){ - uint id; xmmsc_result_t *res; - res = xmmsc_playback_current_id (srvr); + xmmsv_t *value; + res = xmmsc_playlist_current_active (srvr); xmmsc_result_wait (res); - if (!xmmsc_result_get_uint (res, &id)) - printf("No Id!\n"); - xmmsc_result_unref (res); + if (is_error_getval(res, "Server error", &value)) + return; + res = xmmsc_playback_playtime (srvr); xmmsc_result_wait (res); if (numinfo.length == 0 && - !xmmsc_result_get_uint (res, &(numinfo.played))){ + !xmmsv_get_int (value, &(numinfo.played))){ printf("No Timeinfo!\n"); xmmsc_result_unref (res); return; @@ -280,8 +323,7 @@ void timelaps(int delta){ numinfo.played+delta); } xmmsc_result_wait (res); - if (xmmsc_result_iserror (res)) - fprintf (stderr, "Couldn't seek \n%s\n", xmmsc_result_get_error (res)); + is_error(res, "Couldn't seek"); xmmsc_result_unref (res); } } diff --git a/src/xmms2cif.h b/src/xmms2cif.h index 502fc40..e6d8569 100644 --- a/src/xmms2cif.h +++ b/src/xmms2cif.h @@ -20,7 +20,7 @@ volatile unsigned int STATE; struct numberinfo { int32_t length; - uint played; + int played; char title_info[100]; }; typedef struct numberinfo numberinfo; debian/patches/04-DrNo.patch0000644000000000000000000000142112222343767012727 0ustar From: Robert Luberda Date: Sat, 27 Feb 2010 08:56:00 +0100 Subject: 04 DrNo. Make wxmms2 compile & work with xmmsclient 0.7DrNo --- src/xmms2cif.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xmms2cif.c b/src/xmms2cif.c index ca94d7e..66804af 100644 --- a/src/xmms2cif.c +++ b/src/xmms2cif.c @@ -317,10 +317,12 @@ void timelaps(int delta){ jmp_cmd(1); }else { if(((int)(numinfo.played+delta))<0){ - res = xmmsc_playback_seek_ms (srvr, 0); + res = xmmsc_playback_seek_ms (srvr, 0, XMMS_PLAYBACK_SEEK_CUR); }else{ res = xmmsc_playback_seek_ms (srvr, - numinfo.played+delta); + numinfo.played+delta, + XMMS_PLAYBACK_SEEK_CUR +) ; } xmmsc_result_wait (res); is_error(res, "Couldn't seek"); debian/patches/05-Fix-program-version.patch0000644000000000000000000000142312222343767015746 0ustar From: Robert Luberda Date: Mon, 30 Sep 2013 20:34:56 +0200 Subject: 05 Fix program version Update wmxmms2 version number in configure.in and configure (closes: #512643). --- configure | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6906e03..f802cd2 100755 --- a/configure +++ b/configure @@ -1583,7 +1583,7 @@ fi # Define the identity of the package. PACKAGE=wmxmms2 - VERSION=0.5 + VERSION=0.6 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index 31b1c9b..08c91f3 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(src/wmxmms2.c) -AM_INIT_AUTOMAKE(wmxmms2,0.5) +AM_INIT_AUTOMAKE(wmxmms2,0.6) dnl find and test the C compiler AC_PROG_CC debian/patches/series0000644000000000000000000000016212222343767012041 0ustar 01-gcc-warnings.patch 02-Bogus-errmsg.patch 03-DrMattDestruction.patch 04-DrNo.patch 05-Fix-program-version.patch debian/rules0000755000000000000000000000114012222343767010252 0ustar #!/usr/bin/make -f BUILDDIR := DEB-BUILD DH_AUTO_OPTIONS := -v -B$(BUILDDIR) --parallel DESTDIR := $(CURDIR)/debian/$(shell dh_listpackages) export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall -Wextra export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,--as-needed %: dh "$@" override_dh_auto_configure: rm -f .pc/.*unapply # see bug#649521 dh_auto_configure $(DH_AUTO_OPTIONS) override_dh_auto_build: dh_auto_build $(DH_AUTO_OPTIONS) override_dh_auto_clean: dh_auto_clean $(DH_AUTO_OPTIONS) override_dh_auto_install: dh_auto_install $(DH_AUTO_OPTIONS) debian/source/0000755000000000000000000000000012222343767010476 5ustar debian/source/format0000644000000000000000000000001412222343767011704 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000010312222343767010221 0ustar version=3 http://reboli.nl/ programs/wmxmms2-(.*)\.tar\.(?:gz|bz2) debian/wmxmms2.10000644000000000000000000000220412222343767010670 0ustar .TH WMXMMS2 1 "March 29, 2008" Debian .SH NAME wmxmms2 \- A dockable XMMS2 client. .SH SYNOPSIS .B wmxmms2 .RB [ \-s | \-\-speed ] .RB [ \-c | \-\-colour ] .RB [ \-u | \-\-url ] .br .BR "wmxmms2 \-\-h" | \-\-help .br .BR "wmxmms2 \-\-v" | \-\-version .SH DESCRIPTION .B wmxmms2 is a dockable application for use with WindowMarker or other window managers that support dockable applets. .SH OPTIONS This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. .TP .BR \-s , \-\-speed Scrollspeed for text in ms/char ( gets divided by ten :P ). .TP .BR \-c , \-\-colour Sets colour for text. Default is white. .TP .BR \-u , \-\-url Address of server. .TP .BR \-h , \-\-help Show summary of options. .TP .BR \-v , \-\-version Show version of program. .SH SEE ALSO .BR xmms2d (8). .SH AUTHOR wmxmms2 was written by Remy Bosch. .PP This manual page was written by Robert Luberda, with the aid of .BR help2man (1), for the Debian project (but may be used by others). .SH COPYRIGHT Copyright \(co 2005 Remy Bosch. .br .B wmxmms2 is released under the terms of the GPL v2.