Hello community,

here is the log from the commit of package xmp for openSUSE:Factory checked in 
at 2013-04-17 23:18:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmp (Old)
 and      /work/SRC/openSUSE:Factory/.xmp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xmp", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xmp/xmp.changes  2013-03-12 17:19:35.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.xmp.new/xmp.changes     2013-04-17 
23:18:59.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Apr  9 08:53:44 UTC 2013 - [email protected]
+
+- Update to new upstream release 4.0.2
+* Prefer pulse (if available) over ALSA (if available) over OSS
+* Background process handling fixed
+- Remove 0001-xmp-give-ALSA-output-higher-priority-than-OSS.patch,
+  0002-xmp-give-Pulseaudio-higher-priority-than-ALSA.patch
+  (merged upstream)
+
+-------------------------------------------------------------------

Old:
----
  0001-xmp-give-ALSA-output-higher-priority-than-OSS.patch
  0002-xmp-give-Pulseaudio-higher-priority-than-ALSA.patch
  xmp-4.0.1.tar.xz
  xmp-use-decimal.diff

New:
----
  xmp-4.0.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xmp.spec ++++++
--- /var/tmp/diff_new_pack.hHY65J/_old  2013-04-17 23:19:00.000000000 +0200
+++ /var/tmp/diff_new_pack.hHY65J/_new  2013-04-17 23:19:00.000000000 +0200
@@ -20,16 +20,18 @@
 Summary:        Extended Module Player for MOD/S3M/XM/IT/etc.
 License:        GPL-2.0+
 Group:          Productivity/Multimedia/Sound/Players
-Version:        4.0.1
+Version:        4.0.2
 Release:        0
 Url:            http://xmp.sf.net/
 
+#Freecode-URL: http://freecode.com/projects/xmp
 #DL-URL:       http://downloads.sf.net/%name/%name-%version.tar.gz
+#Git-Clone:    git://git.code.sf.net/p/xmp/code
 Source:                %name-%version.tar.xz
-Patch1:         0001-xmp-give-ALSA-output-higher-priority-than-OSS.patch
-Patch2:                0002-xmp-give-Pulseaudio-higher-priority-than-ALSA.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  alsa-devel
+BuildRequires:  autoconf
+BuildRequires:  automake
 BuildRequires:  pkgconfig
 BuildRequires:  xz
 BuildRequires:  pkgconfig(libxmp) >= 4
@@ -43,9 +45,9 @@
 
 %prep
 %setup -q
-%patch -P 1 -P 2 -p3
 
 %build
+autoreconf -fi
 %configure
 make %{?_smp_mflags}
 

++++++ xmp-4.0.1.tar.xz -> xmp-4.0.2.tar.xz ++++++
Files old/xmp-4.0.1/08_sad_song.it and new/xmp-4.0.2/08_sad_song.it differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/CREDITS new/xmp-4.0.2/CREDITS
--- old/xmp-4.0.1/CREDITS       2013-02-16 11:25:03.000000000 +0100
+++ new/xmp-4.0.2/CREDITS       2013-04-06 15:38:02.000000000 +0200
@@ -25,6 +25,10 @@
 - Rune Elvemo <[email protected]>
   * fixes for endianism problems in Linux/PPC
 
+- Jan Engelhardt <[email protected]>
+  * fixes for background process handling
+  * misc source code fixes
+
 - Mike Gorchak <[email protected]>
   * QNX6 portability fix
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/Changelog new/xmp-4.0.2/Changelog
--- old/xmp-4.0.1/Changelog     2013-02-16 13:15:12.000000000 +0100
+++ new/xmp-4.0.2/Changelog     2013-04-08 01:55:05.000000000 +0200
@@ -1,6 +1,15 @@
 Stable versions
 ---------------
 
+4.0.2 (20130407):
+       - Fix data type in coreaudio driver
+
+       Changes by Jan Engelhardt:
+       - give Pulseaudio higher priority than ALSA
+       - give ALSA output higher priority than OSS
+       - fix background process handling
+       - sanitize background/foreground notation
+
 4.0.1 (20130216):
        - fix license issues reported by Jan Engelhardt
        - fix pulseaudio detection (by Emanuel Haupt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/Makefile.in new/xmp-4.0.2/Makefile.in
--- old/xmp-4.0.1/Makefile.in   2013-02-16 12:18:57.000000000 +0100
+++ new/xmp-4.0.2/Makefile.in   2013-04-06 15:38:02.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION        = 4.0.1
+VERSION        = 4.0.2
 
 CC             = @CC@
 CFLAGS         = -c -Wall @CFLAGS@ @DEFS@ @CPPFLAGS@ \
@@ -23,7 +23,7 @@
                  config.sub config.guess install-sh configure.ac Makefile.in \
                  $(MODULES)
 DDIRS          = src
-MODULES                = delicate_oooz!.mod
+MODULES                = 08_sad_song.it
 DRIVERS                = @DRIVERS@
 
 all: binaries
Files old/xmp-4.0.1/delicate_oooz!.mod and new/xmp-4.0.2/delicate_oooz!.mod 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/commands.c new/xmp-4.0.2/src/commands.c
--- old/xmp-4.0.1/src/commands.c        2013-02-16 11:17:40.000000000 +0100
+++ new/xmp-4.0.2/src/commands.c        2013-04-06 15:38:02.000000000 +0200
@@ -32,7 +32,7 @@
  * This makes Cygwin builds work out of the box with no fiddling around,
  * but does impose a neglectible cpu overhead (for Cygwin builds only).
  */
-static int stdin_ready_for_reading()
+static int stdin_ready_for_reading(void)
 {
        fd_set fds;
        struct timeval tv;
@@ -53,7 +53,7 @@
 }
 #endif
 
-static int read_key()
+static int read_key(void)
 {
        char key;
        int ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/common.h new/xmp-4.0.2/src/common.h
--- old/xmp-4.0.1/src/common.h  2013-02-13 00:57:27.000000000 +0100
+++ new/xmp-4.0.2/src/common.h  2013-04-06 15:38:02.000000000 +0200
@@ -15,7 +15,9 @@
        int loop;               /* loop module */
        int random;             /* play in random order */
        int reverse;            /* reverse stereo channels */
-       int flags;              /* player flags */
+       int vblank;             /* vblank flag */
+       int fx9bug;             /* fx9bug flag */
+       int fixloop;            /* fixloop flag */
        int verbose;            /* verbosity level */
        int silent;             /* silent output */
        int info;               /* display information and exit */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/info.c new/xmp-4.0.2/src/info.c
--- old/xmp-4.0.1/src/info.c    2013-02-16 11:17:53.000000000 +0100
+++ new/xmp-4.0.2/src/info.c    2013-04-06 15:38:02.000000000 +0200
@@ -87,7 +87,7 @@
        }
 }
 
-void info_frame_init()
+void info_frame_init(void)
 {
        max_channels = 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/main.c new/xmp-4.0.2/src/main.c
--- old/xmp-4.0.1/src/main.c    2013-02-16 11:17:28.000000000 +0100
+++ new/xmp-4.0.2/src/main.c    2013-04-06 18:31:30.000000000 +0200
@@ -28,7 +28,7 @@
 extern int optind;
 
 static struct sound_driver *sound;
-static int background = 0;
+static unsigned int foreground_in, foreground_out;
 static int refresh_status;
 
 
@@ -78,14 +78,18 @@
 static void sigcont_handler(int sig)
 {
 #ifdef HAVE_TERMIOS_H
-       background = (tcgetpgrp(0) == getppid());
+       unsigned int old_in = foreground_in;
 
-       if (!background) {
+       foreground_in  = tcgetpgrp(STDIN_FILENO)  == getpgrp();
+       foreground_out = tcgetpgrp(STDERR_FILENO) == getpgrp();
+
+       if (old_in != foreground_in)
+               /* Only call if it was not already prepared */
                set_tty();
-       }
 #endif
 
-       refresh_status = 1;
+       if (sig != 0)
+               refresh_status = 1;
 
        signal(SIGCONT, sigcont_handler);
        signal(SIGTSTP, sigtstp_handler);
@@ -165,6 +169,7 @@
 #ifndef WIN32
        struct timeval tv;
        struct timezone tz;
+       int flags;
 
        gettimeofday(&tv, &tz);
        srand(tv.tv_usec);
@@ -261,14 +266,7 @@
 #endif
 #endif
 
-#ifdef HAVE_TERMIOS_H
-       background = (tcgetpgrp (0) == getppid ());
-
-       if (!background) {
-               set_tty();
-       }
-#endif
-
+       sigcont_handler(0);
        xc = xmp_create_context();
 
        skipprev = 0;
@@ -358,10 +356,22 @@
 
                        /* Set player flags */
 
-                       xmp_set_player(xc, XMP_PLAYER_FLAGS, opt.flags);
-                       if (opt.flags & XMP_FLAGS_VBLANK) {
+#define set_flag(x,y,z) do { \
+  if ((y) > 0) (x) |= (z); \
+  else if ((y) < 0) (x) &= ~ (z); \
+} while (0)
+
+                       flags = 0;
+                       set_flag(flags, opt.vblank, XMP_FLAGS_VBLANK);
+                       set_flag(flags, opt.fx9bug, XMP_FLAGS_FX9BUG);
+                       set_flag(flags, opt.fixloop, XMP_FLAGS_FIXLOOP);
+
+                       xmp_set_player(xc, XMP_PLAYER_FLAGS, flags);
+#if XMP_VERCODE < 0x040003
+                       if (flags & XMP_FLAGS_VBLANK) {
                                xmp_scan_module(xc);
                        }
+#endif
 
                        /* Show module data */
 
@@ -386,7 +396,8 @@
                                if (!control.loop && old_loop != fi.loop_count)
                                        break;
 
-                               if (!background && opt.verbose > 0) {
+                               sigcont_handler(0);
+                               if (foreground_out && opt.verbose > 0) {
                                        info_frame(&mi, &fi, &control, 
refresh_status);
                                        refresh_status = 0;
                                }
@@ -395,7 +406,7 @@
 
                                sound->play(fi.buffer, fi.buffer_size);
 
-                               if (!background && !opt.nocmd) {
+                               if (foreground_in && !opt.nocmd) {
                                        read_command(xc, &control);
 
                                        if (control.display) {
@@ -439,9 +450,8 @@
     end:
        xmp_free_context(xc);
 
-       if (!background) {
+       if (foreground_in)
                reset_tty();
-       }
 
        sound->deinit();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/modules.conf 
new/xmp-4.0.2/src/modules.conf
--- old/xmp-4.0.1/src/modules.conf      2013-02-11 02:27:02.000000000 +0100
+++ new/xmp-4.0.2/src/modules.conf      2013-04-07 02:32:44.000000000 +0200
@@ -28,6 +28,6 @@
 [70aa034dfb2f1f73d9fdbafe131bb701]
 vblank = yes
 
-# Klisje paa klisje (added by Kjetil Torgrim Homme)
+# "klisje paa klisje" (added by Kjetil Torgrim Homme)
 [e998012c700eb43af0321711305829b2]
 vblank = yes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/options.c new/xmp-4.0.2/src/options.c
--- old/xmp-4.0.1/src/options.c 2013-02-16 11:18:25.000000000 +0100
+++ new/xmp-4.0.2/src/options.c 2013-04-06 15:38:02.000000000 +0200
@@ -41,7 +41,7 @@
 {
        struct list_head *head;
        struct sound_driver *sd;
-       char **hlp;
+       const char *const *hlp;
 
        printf("Usage: %s [options] [modules]\n", s);
 
@@ -100,7 +100,7 @@
 "   -v --verbose           Verbose mode (incremental)\n");
 }
 
-static struct option lopt[] = {
+static const struct option lopt[] = {
        { "amplify",            1, 0, 'a' },
        { "bits",               1, 0, 'b' },
        { "driver",             1, 0, 'd' },
@@ -171,7 +171,7 @@
                        options->rate = strtoul(optarg, NULL, 0);
                        break;
                case OPT_FIXLOOP:
-                       options->flags |= XMP_FLAGS_FIXLOOP;
+                       options->fixloop = 1;
                        break;
                case 'I':
                        options->ins_path = optarg;
@@ -225,7 +225,7 @@
                        }
                        break;
                case OPT_FX9BUG:
-                       options->flags |= XMP_FLAGS_FX9BUG;
+                       options->fx9bug = 1;
                        break;
                case 'P':
                        options->mix = strtoul(optarg, NULL, 0);
@@ -283,7 +283,7 @@
                        options->format |= XMP_FORMAT_UNSIGNED;
                        break;
                case OPT_VBLANK:
-                       options->flags |= XMP_FLAGS_VBLANK;
+                       options->vblank = 1;
                        break;
                case 'V':
                        puts("Extended Module Player " VERSION);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/read_config.c 
new/xmp-4.0.2/src/read_config.c
--- old/xmp-4.0.1/src/read_config.c     2013-02-16 11:18:36.000000000 +0100
+++ new/xmp-4.0.2/src/read_config.c     2013-04-06 15:38:02.000000000 +0200
@@ -98,6 +98,10 @@
        if (!strcmp(var,x)) { if (get_yesno (val)) w |= (y); \
            else w &= ~(y); continue; } }
 
+#define getval_tristate(x,w) { \
+       if (!strcmp(var,x)) { if (get_yesno (val)) w = 1; \
+           else w = -1; continue; } }
+
 #define getval_no(x,y) { \
        if (!strcmp(var,x)) { y = atoi (val); continue; } }
 
@@ -221,9 +225,10 @@
                getval_yn("reverse", o->reverse, 1);
                getval_no("amplify", o->amplify);
                getval_no("mix", o->mix);
-               getval_yn("fixloop", o->flags, XMP_FLAGS_FIXLOOP);
-               getval_yn("fx9bug", o->flags, XMP_FLAGS_FX9BUG);
-               getval_yn("vblank", o->flags, XMP_FLAGS_VBLANK);
+
+               getval_tristate("fixloop", o->fixloop);
+               getval_tristate("fx9bug", o->fx9bug);
+               getval_tristate("vblank", o->vblank);
 
                if (!strcmp(var, "interpolation")) {
                        if (!strcmp(val, "nearest")) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound.c new/xmp-4.0.2/src/sound.c
--- old/xmp-4.0.1/src/sound.c   2013-02-16 11:18:45.000000000 +0100
+++ new/xmp-4.0.2/src/sound.c   2013-04-06 15:38:02.000000000 +0200
@@ -37,7 +37,7 @@
        list_add_tail(&sd->list, &sound_driver_list);   
 }
 
-void init_sound_drivers()
+void init_sound_drivers(void)
 {
 #ifdef SOUND_AHI
        register_sound_driver(&sound_ahi);
@@ -72,8 +72,8 @@
 #ifdef SOUND_WIN32
        register_sound_driver(&sound_win32);
 #endif
-#ifdef SOUND_OSS
-       register_sound_driver(&sound_oss);
+#ifdef SOUND_PULSEAUDIO
+       register_sound_driver(&sound_pulseaudio);
 #endif
 #ifdef SOUND_ALSA
        register_sound_driver(&sound_alsa);
@@ -81,12 +81,12 @@
 #ifdef SOUND_ALSA05
        register_sound_driver(&sound_alsa05);
 #endif
+#ifdef SOUND_OSS
+       register_sound_driver(&sound_oss);
+#endif
 #ifdef SOUND_QNX
        register_sound_driver(&sound_qnx);
 #endif
-#ifdef SOUND_PULSEAUDIO
-       register_sound_driver(&sound_pulseaudio);
-#endif
        register_sound_driver(&sound_wav);
        register_sound_driver(&sound_file);
        register_sound_driver(&sound_null);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound.h new/xmp-4.0.2/src/sound.h
--- old/xmp-4.0.1/src/sound.h   2012-08-25 23:58:06.000000000 +0200
+++ new/xmp-4.0.2/src/sound.h   2013-04-06 15:38:02.000000000 +0200
@@ -7,9 +7,9 @@
 #include "list.h"
 
 struct sound_driver {
-       char *id;
+       const char *id;
        char *description;
-       char **help;
+       const char *const *help;
        int (*init)(struct options *);
         void (*deinit)(void);
        void (*play)(void *, int);
@@ -35,7 +35,7 @@
 #define chkparm2(x,y,z,w) { if (!strcmp(s, x)) { \
        if (2 > sscanf(token, y, z, w)) parm_error(); } }
 
-static inline int is_big_endian() {
+static inline int is_big_endian(void) {
        unsigned short w = 0x00ff;
        return (*(char *)&w == 0x00);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_ahi.c 
new/xmp-4.0.2/src/sound_ahi.c
--- old/xmp-4.0.1/src/sound_ahi.c       2013-02-16 11:19:44.000000000 +0100
+++ new/xmp-4.0.2/src/sound_ahi.c       2013-04-06 15:38:02.000000000 +0200
@@ -51,25 +51,24 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "buffer=val", "Audio buffer size",
        NULL
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_aix.c 
new/xmp-4.0.2/src/sound_aix.c
--- old/xmp-4.0.1/src/sound_aix.c       2013-02-16 11:19:51.000000000 +0100
+++ new/xmp-4.0.2/src/sound_aix.c       2013-04-06 15:38:02.000000000 +0200
@@ -99,27 +99,26 @@
        };
 }
 
-static void deinit()
+static void deinit(void)
 {
        control.ioctl_request = AUDIO_STOP;
        ioctl(audio_fd, AUDIO_CONTROL, &control);
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "gain=val", "Audio output gain (0 to 255)",
        /* "buffer=val", "Audio buffer size (default is 32768)", */
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_alsa.c 
new/xmp-4.0.2/src/sound_alsa.c
--- old/xmp-4.0.1/src/sound_alsa.c      2013-02-16 11:20:02.000000000 +0100
+++ new/xmp-4.0.2/src/sound_alsa.c      2013-04-06 15:38:02.000000000 +0200
@@ -91,26 +91,25 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        snd_pcm_close(pcm_handle);
 }
 
-static void flush()
+static void flush(void)
 {
        snd_pcm_drain(pcm_handle);
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "buffer=num", "Set the ALSA buffer time in milliseconds",
        "period=num", "Set the ALSA period time in milliseconds",
        "card <name>", "Select sound card to use",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_alsa05.c 
new/xmp-4.0.2/src/sound_alsa05.c
--- old/xmp-4.0.1/src/sound_alsa05.c    2013-02-16 11:20:47.000000000 +0100
+++ new/xmp-4.0.2/src/sound_alsa05.c    2013-04-06 15:38:02.000000000 +0200
@@ -182,20 +182,19 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        snd_pcm_close(pcm_handle);
        free(mybuffer);
 }
 
-static void flush()
+static void flush(void)
 {
        snd_pcm_plugin_flush(pcm_handle, SND_PCM_CHANNEL_PLAYBACK);
        prepare_driver();
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "frag=num,size", "Set the number and size (bytes) of fragments",
        "card <name>", "Select sound card to use",
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_beos.c 
new/xmp-4.0.2/src/sound_beos.c
--- old/xmp-4.0.1/src/sound_beos.c      2013-02-16 11:20:57.000000000 +0100
+++ new/xmp-4.0.2/src/sound_beos.c      2013-04-06 15:38:02.000000000 +0200
@@ -37,18 +37,17 @@
 static int chunk_num;
 /* static int packet_size; */
 
-
-static char *help[] = {
+static const char *const help[] = {
        "buffer=num,size", "set the number and size of buffer fragments",
        NULL
 };
 
 static int init(struct options *options);
-static void deinit();
+static void deinit(void);
 static void play(void *b, int i);
-static void flush();
-static void onpause();
-static void onresume();
+static void flush(void);
+static void onpause(void);
+static void onresume(void);
 
 struct sound_driver sound_beos = {
        "beos",
@@ -65,7 +64,7 @@
 /* return minimum number of free bytes in buffer, value may change between
  * two immediately following calls, and the real number of free bytes
  * might actually be larger!  */
-static int buf_free()
+static int buf_free(void)
 {
        int free = buf_read_pos - buf_write_pos - chunk_size;
        if (free < 0)
@@ -76,7 +75,7 @@
 /* return minimum number of buffered bytes, value may change between
  * two immediately following calls, and the real number of buffered bytes
  * might actually be larger! */
-static int buf_used()
+static int buf_used(void)
 {
        int used = buf_write_pos - buf_read_pos;
        if (used < 0)
@@ -206,22 +205,22 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        player->Stop(); 
        be_app->Lock();
        be_app->Quit();
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_bsd.c 
new/xmp-4.0.2/src/sound_bsd.c
--- old/xmp-4.0.1/src/sound_bsd.c       2013-02-16 11:21:05.000000000 +0100
+++ new/xmp-4.0.2/src/sound_bsd.c       2013-04-06 15:38:02.000000000 +0200
@@ -77,24 +77,24 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-static char *help[] = {
+static const char *const help[] = {
        "gain=val", "Audio output gain (0 to 255)",
        "buffer=val", "Audio buffer size (default is 32768)",
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_coreaudio.c 
new/xmp-4.0.2/src/sound_coreaudio.c
--- old/xmp-4.0.1/src/sound_coreaudio.c 2013-02-16 11:21:10.000000000 +0100
+++ new/xmp-4.0.2/src/sound_coreaudio.c 2013-04-06 15:38:02.000000000 +0200
@@ -21,7 +21,7 @@
  */
 
 static int paused;
-static uint8 *buffer;
+static unsigned char *buffer;
 static int buffer_len;
 static int buf_write_pos;
 static int buf_read_pos;
@@ -33,7 +33,7 @@
 /* return minimum number of free bytes in buffer, value may change between
  * two immediately following calls, and the real number of free bytes
  * might actually be larger!  */
-static int buf_free()
+static int buf_free(void)
 {
        int free = buf_read_pos - buf_write_pos - chunk_size;
        if (free < 0)
@@ -44,7 +44,7 @@
 /* return minimum number of buffered bytes, value may change between
  * two immediately following calls, and the real number of buffered bytes
  * might actually be larger! */
-static int buf_used()
+static int buf_used(void)
 {
        int used = buf_write_pos - buf_read_pos;
        if (used < 0)
@@ -246,7 +246,7 @@
 }
 
 
-static void deinit()
+static void deinit(void)
 {
         AudioOutputUnitStop(au);
        AudioUnitUninitialize(au);
@@ -254,15 +254,15 @@
        free(buffer);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_dart.c 
new/xmp-4.0.2/src/sound_dart.c
--- old/xmp-4.0.1/src/sound_dart.c      2013-02-16 11:21:20.000000000 +0100
+++ new/xmp-4.0.2/src/sound_dart.c      2013-04-06 15:38:02.000000000 +0200
@@ -195,7 +195,7 @@
 
 }
 
-static void deinit()
+static void deinit(void)
 {
        if (MixBuffers[0].pBuffer) {
                mciSendCommand(DeviceID, MCI_BUFFER,
@@ -210,8 +210,7 @@
        }
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "sharing={Y,N}", "Device Sharing    (default is N)",
        "device=val", "OS/2 Audio Device (default is 0 auto-detect)",
        "buffer=val", "Audio buffer size (default is 16)",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_file.c 
new/xmp-4.0.2/src/sound_file.c
--- old/xmp-4.0.1/src/sound_file.c      2013-02-16 11:38:56.000000000 +0100
+++ new/xmp-4.0.2/src/sound_file.c      2013-04-06 15:38:02.000000000 +0200
@@ -73,24 +73,24 @@
        size += len;
 }
 
-static void deinit()
+static void deinit(void)
 {
        free(sound_file.description);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-static char *help[] = {
+static const char *const help[] = {
        "big-endian", "Force big-endian 16-bit samples",
        "little-endian", "Force little-endian 16-bit samples",
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_hpux.c 
new/xmp-4.0.2/src/sound_hpux.c
--- old/xmp-4.0.1/src/sound_hpux.c      2013-02-16 11:39:04.000000000 +0100
+++ new/xmp-4.0.2/src/sound_hpux.c      2013-04-06 15:38:02.000000000 +0200
@@ -19,7 +19,7 @@
 static int audio_fd;
 
 /* Standard sampling rates */
-static int srate[] = {
+static const int srate[] = {
        44100, 32000, 22050, 16000, 11025, 8000, 0
 };
 
@@ -122,25 +122,24 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "gain=val", "Audio output gain (0 to 255)",
        "port={s|h|l}", "Audio port (s[peaker], h[eadphones], l[ineout])",
        "buffer=val", "Audio buffer size",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_netbsd.c 
new/xmp-4.0.2/src/sound_netbsd.c
--- old/xmp-4.0.1/src/sound_netbsd.c    2013-02-16 11:39:12.000000000 +0100
+++ new/xmp-4.0.2/src/sound_netbsd.c    2013-04-06 15:38:02.000000000 +0200
@@ -105,25 +105,24 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "gain=val", "Audio output gain (0 to 255)",
        "buffer=val", "Audio buffer size (default is 32768)",
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_null.c 
new/xmp-4.0.2/src/sound_null.c
--- old/xmp-4.0.1/src/sound_null.c      2013-02-16 11:39:19.000000000 +0100
+++ new/xmp-4.0.2/src/sound_null.c      2013-04-06 15:38:02.000000000 +0200
@@ -18,19 +18,19 @@
 {
 }
 
-static void deinit()
+static void deinit(void)
 {
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_oss.c 
new/xmp-4.0.2/src/sound_oss.c
--- old/xmp-4.0.1/src/sound_oss.c       2013-02-16 11:39:27.000000000 +0100
+++ new/xmp-4.0.2/src/sound_oss.c       2013-04-06 15:38:02.000000000 +0200
@@ -109,7 +109,7 @@
 static int init(struct options *options)
 {
        char **parm = options->driver_parm;
-       char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" };
+       static const char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" };
        audio_buf_info info;
        static char buf[80];
        int i;
@@ -161,17 +161,17 @@
        };
 }
 
-static void deinit()
+static void deinit(void)
 {
        ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 #ifdef SNDCTL_DSP_SETTRIGGER
        int trig = 0;
@@ -184,7 +184,7 @@
                ioctl(audio_fd, SNDCTL_DSP_SYNC, NULL);
 }
 
-static void onresume()
+static void onresume(void)
 {
 #ifdef SNDCTL_DSP_SETTRIGGER
        int trig = PCM_ENABLE_OUTPUT;
@@ -192,7 +192,7 @@
 #endif
 }
 
-static char *help[] = {
+static const char *const help[] = {
        "frag=num,size", "Set the number and size of fragments",
        "dev=<device_name>", "Audio device to use (default /dev/dsp)",
        "nosync", "Don't flush OSS buffers between modules",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_pulseaudio.c 
new/xmp-4.0.2/src/sound_pulseaudio.c
--- old/xmp-4.0.1/src/sound_pulseaudio.c        2013-02-16 11:39:33.000000000 
+0100
+++ new/xmp-4.0.2/src/sound_pulseaudio.c        2013-04-06 15:38:02.000000000 
+0200
@@ -60,12 +60,12 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        pa_simple_free(s);
 }
 
-static void flush()
+static void flush(void)
 {
        int error;
 
@@ -74,11 +74,11 @@
        }
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_qnx.c 
new/xmp-4.0.2/src/sound_qnx.c
--- old/xmp-4.0.1/src/sound_qnx.c       2013-02-16 11:39:40.000000000 +0100
+++ new/xmp-4.0.2/src/sound_qnx.c       2013-04-06 15:38:02.000000000 +0200
@@ -87,26 +87,25 @@
        } while (i);
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(fd_audio);
 }
 
-static void flush()
+static void flush(void)
 {
        ioctl(fd, SNDCTL_DSP_SYNC, NULL);
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "dev=<device_name>", "Audio device name (default is /dev/dsp)",
        "buffer=val", "Audio buffer size (default is 32768)",
        NULL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_sndio.c 
new/xmp-4.0.2/src/sound_sndio.c
--- old/xmp-4.0.1/src/sound_sndio.c     2012-09-09 18:17:45.000000000 +0200
+++ new/xmp-4.0.2/src/sound_sndio.c     2013-04-06 15:38:02.000000000 +0200
@@ -76,7 +76,7 @@
        return -1;
 }
 
-static void deinit()
+static void deinit(void)
 {
        sio_close(hdl);
        hdl = NULL;
@@ -89,15 +89,15 @@
        }
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_solaris.c 
new/xmp-4.0.2/src/sound_solaris.c
--- old/xmp-4.0.1/src/sound_solaris.c   2013-02-16 11:40:12.000000000 +0100
+++ new/xmp-4.0.2/src/sound_solaris.c   2013-04-06 15:38:02.000000000 +0200
@@ -153,25 +153,24 @@
        }
 }
 
-static void deinit()
+static void deinit(void)
 {
        close(audio_fd);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-
-static char *help[] = {
+static const char *const help[] = {
        "gain=val", "Audio output gain (0 to 255)",
        "port={s|h|l}", "Audio port (s[peaker], h[eadphones], l[ineout])",
        "buffer=val", "Audio buffer size (default is 32768)",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_wav.c 
new/xmp-4.0.2/src/sound_wav.c
--- old/xmp-4.0.1/src/sound_wav.c       2013-02-16 11:40:19.000000000 +0100
+++ new/xmp-4.0.2/src/sound_wav.c       2013-04-06 15:38:02.000000000 +0200
@@ -134,7 +134,7 @@
        size += len;
 }
 
-static void deinit()
+static void deinit(void)
 {
        lseek(fd, 40, SEEK_SET);
        write_32l(fd, size);
@@ -149,15 +149,15 @@
        free(sound_wav.description);
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/sound_win32.c 
new/xmp-4.0.2/src/sound_win32.c
--- old/xmp-4.0.1/src/sound_win32.c     2013-02-16 11:40:26.000000000 +0100
+++ new/xmp-4.0.2/src/sound_win32.c     2013-04-06 15:38:02.000000000 +0200
@@ -134,7 +134,7 @@
        nextbuffer %= num_buffers;
 }
 
-static void deinit()
+static void deinit(void)
 {
        int i;
 
@@ -151,19 +151,19 @@
        }
 }
 
-static void flush()
+static void flush(void)
 {
 }
 
-static void onpause()
+static void onpause(void)
 {
 }
 
-static void onresume()
+static void onresume(void)
 {
 }
 
-static char *help[] = {
+static const char *const help[] = {
        "buffers=val", "Number of buffers (default 10)",
        NULL
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/terminal.c new/xmp-4.0.2/src/terminal.c
--- old/xmp-4.0.1/src/terminal.c        2013-02-16 11:40:35.000000000 +0100
+++ new/xmp-4.0.2/src/terminal.c        2013-04-06 15:38:02.000000000 +0200
@@ -12,33 +12,38 @@
 
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
+#include <unistd.h>
 
 static struct termios term;
 #endif
 
-int set_tty()
+int set_tty(void)
 {
 #ifdef HAVE_TERMIOS_H
        struct termios t;
 
-       if (tcgetattr(0, &term) < 0)
+       if (!isatty(STDIN_FILENO))
+               return 0;
+       if (tcgetattr(STDIN_FILENO, &term) < 0)
                return -1;
 
        t = term;
        t.c_lflag &= ~(ECHO | ICANON | TOSTOP);
        t.c_cc[VMIN] = t.c_cc[VTIME] = 0;
 
-       if (tcsetattr(0, TCSAFLUSH, &t) < 0)
+       if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &t) < 0)
                return -1;
 #endif
 
        return 0;
 }
 
-int reset_tty()
+int reset_tty(void)
 {
 #ifdef HAVE_TERMIOS_H
-       if (tcsetattr(0, TCSAFLUSH, &term) < 0) {
+       if (!isatty(STDIN_FILENO))
+               return 0;
+       if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &term) < 0) {
                fprintf(stderr, "can't reset terminal!\n");
                return -1;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmp-4.0.1/src/xmp.1 new/xmp-4.0.2/src/xmp.1
--- old/xmp-4.0.1/src/xmp.1     2013-02-16 12:18:57.000000000 +0100
+++ new/xmp-4.0.2/src/xmp.1     2013-04-06 15:38:02.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "XMP" "1" "Version 4\&.0\&.1" "Feb 2013" "Extended Module Player" 
+.TH "XMP" "1" "Version 4\&.0\&.2" "Apr 2013" "Extended Module Player" 
 .PP 
 .SH "NAME" 
 xmp - Extended Module Player

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to