diff -Nru xmp-4.0.7/Changelog xmp-4.0.8/Changelog --- xmp-4.0.7/Changelog 2014-02-24 23:09:05.914102672 +0000 +++ xmp-4.0.8/Changelog 2014-07-14 23:14:57.033269979 +0000 @@ -1,6 +1,14 @@ Stable versions --------------- +4.0.8 (20140714): + - Add command 'c' to display module comment + - Add command-line option -C to display module comment + - Fix ignored amplify option (by Dennis Lindroos) + - Fix Win64 compatibility (by Ozkan Sezer) + - Fix configuration file location in Windows (by Ozkan Sezer) + - Fix screen corruption with large number of rows + 4.0.7 (20140224): - Fix NetBSD sound driver (by shattered) - Fix Haiku sound driver @@ -9,17 +17,13 @@ - Minor cosmetic fixes 4.0.6 (20130519): + - Fix error when g++ is absent on non-BeOS (by Jan Engelhardt) - Portability fixes to build with Visual C++ - Changes by Jan Engelhardt: - - Do not error out when g++ is absent on non-BeOS - 4.0.5 (20130512): + - Change buildsystem to use automake (by Jan Engelhardt) - Fix loop when skipping to first file and it's not playable - Changes by Jan Engelhardt: - - Change buildsystem to use automake - 4.0.4 (20130428): - Fix executable suffix in MinGW32 - Fix frame info display in Windows (reported by vaseleos0) diff -Nru xmp-4.0.7/configure xmp-4.0.8/configure --- xmp-4.0.7/configure 2014-02-21 23:58:35.561702171 +0000 +++ xmp-4.0.8/configure 2014-07-14 23:28:15.741735026 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xmp 4.0.7. +# Generated by GNU Autoconf 2.69 for xmp 4.0.8. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='xmp' PACKAGE_TARNAME='xmp' -PACKAGE_VERSION='4.0.7' -PACKAGE_STRING='xmp 4.0.7' +PACKAGE_VERSION='4.0.8' +PACKAGE_STRING='xmp 4.0.8' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1335,7 +1335,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xmp 4.0.7 to adapt to many kinds of systems. +\`configure' configures xmp 4.0.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1405,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xmp 4.0.7:";; + short | recursive ) echo "Configuration of xmp 4.0.8:";; esac cat <<\_ACEOF @@ -1515,7 +1515,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xmp configure 4.0.7 +xmp configure 4.0.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1918,7 +1918,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xmp $as_me 4.0.7, which was +It was created by xmp $as_me 4.0.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3993,7 +3993,7 @@ # Define the identity of the package. PACKAGE='xmp' - VERSION='4.0.7' + VERSION='4.0.8' cat >>confdefs.h <<_ACEOF @@ -6595,7 +6595,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xmp $as_me 4.0.7, which was +This file was extended by xmp $as_me 4.0.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6652,7 +6652,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xmp config.status 4.0.7 +xmp config.status 4.0.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru xmp-4.0.7/configure.ac xmp-4.0.8/configure.ac --- xmp-4.0.7/configure.ac 2014-02-21 23:49:00.570206423 +0000 +++ xmp-4.0.8/configure.ac 2014-07-14 23:14:57.038270009 +0000 @@ -1,4 +1,4 @@ -AC_INIT([xmp], [4.0.7]) +AC_INIT([xmp], [4.0.8]) AC_CONFIG_AUX_DIR([build-aux]) 0>confdefs.h diff -Nru xmp-4.0.7/debian/changelog xmp-4.0.8/debian/changelog --- xmp-4.0.7/debian/changelog 2014-03-05 06:53:08.000000000 +0000 +++ xmp-4.0.8/debian/changelog 2014-08-04 21:57:42.000000000 +0000 @@ -1,3 +1,9 @@ +xmp (4.0.8-1) unstable; urgency=medium + + * New upstream version. + + -- Stephen Kitt Mon, 04 Aug 2014 23:57:39 +0200 + xmp (4.0.7-1) unstable; urgency=medium * New upstream version. Binary files /tmp/oBAkx47CZD/xmp-4.0.7/drozerix_-_mecanum_overdrive.xm and /tmp/TRRidudGJa/xmp-4.0.8/drozerix_-_mecanum_overdrive.xm differ diff -Nru xmp-4.0.7/Makefile.am xmp-4.0.8/Makefile.am --- xmp-4.0.7/Makefile.am 2014-02-24 23:08:00.029280556 +0000 +++ xmp-4.0.8/Makefile.am 2014-07-14 23:14:57.033269979 +0000 @@ -2,4 +2,4 @@ SUBDIRS = src -EXTRA_DIST = CREDITS Changelog +EXTRA_DIST = CREDITS Changelog drozerix_-_mecanum_overdrive.xm diff -Nru xmp-4.0.7/Makefile.in xmp-4.0.8/Makefile.in --- xmp-4.0.7/Makefile.in 2014-02-24 23:09:07.379016770 +0000 +++ xmp-4.0.8/Makefile.in 2014-07-14 23:28:15.439733231 +0000 @@ -307,7 +307,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src -EXTRA_DIST = CREDITS Changelog +EXTRA_DIST = CREDITS Changelog drozerix_-_mecanum_overdrive.xm all: all-recursive .SUFFIXES: diff -Nru xmp-4.0.7/README xmp-4.0.8/README --- xmp-4.0.7/README 2014-02-21 23:49:00.570206423 +0000 +++ xmp-4.0.8/README 2014-07-14 23:14:57.033269979 +0000 @@ -42,6 +42,7 @@ i => display combined instrument/sample list I => display instrument list S => display sample list + c => display comment, if any < => jump to previous sequence > => jump to next sequence diff -Nru xmp-4.0.7/src/commands.c xmp-4.0.8/src/commands.c --- xmp-4.0.7/src/commands.c 2014-02-23 13:18:18.466739123 +0000 +++ xmp-4.0.8/src/commands.c 2014-07-14 23:14:57.039270015 +0000 @@ -222,6 +222,9 @@ case 'm': ctl->display = cmd; break; + case 'c': + ctl->display = cmd; + break; case '>': change_sequence(handle, mi, ctl, 1); break; diff -Nru xmp-4.0.7/src/common.h xmp-4.0.8/src/common.h --- xmp-4.0.7/src/common.h 2014-02-21 23:49:00.570206423 +0000 +++ xmp-4.0.8/src/common.h 2014-07-14 23:14:57.039270015 +0000 @@ -41,6 +41,7 @@ int dparm; /* driver parameter index */ int sequence; /* sequence to play */ int explore; /* play all sequences in module */ + int show_comment; /* show module comment text */ char *driver_id; /* sound driver ID */ char *out_file; /* output file name */ char *ins_path; /* instrument path */ @@ -79,6 +80,7 @@ void info_ins_smp(struct xmp_module_info *); void info_instruments(struct xmp_module_info *); void info_samples(struct xmp_module_info *); +void info_comment(struct xmp_module_info *); void info_help(void); /* commands */ diff -Nru xmp-4.0.7/src/info.c xmp-4.0.8/src/info.c --- xmp-4.0.7/src/info.c 2014-02-23 13:13:40.705857298 +0000 +++ xmp-4.0.8/src/info.c 2014-07-14 23:14:57.039270015 +0000 @@ -34,6 +34,7 @@ " i Display combined instrument/sample list\n" " I Display instrument list\n" " S Display sample list\n" +" c Display comment, if any\n" " < Play previous sequence\n" " > Play next sequence\n" ); @@ -117,6 +118,7 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct control *ctl, int reprint) { static int ord = -1, spd = -1, bpm = -1; + char rowstr[3], numrowstr[3]; int time; if (fi->virt_used > max_channels) @@ -155,9 +157,21 @@ spd = fi->speed; } + if (fi->row <= 0xff) { + snprintf(rowstr, 3, "%02X", fi->row); + } else { + strcpy(rowstr, "++"); + } + + if (fi->num_rows <= 0x100) { + snprintf(numrowstr, 3, "%02X", fi->num_rows - 1); + } else { + strcpy(numrowstr, "++"); + } + report("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" - "%02X/%02X] Chn[%02X/%02X] %c%c%c", - fi->row, fi->num_rows - 1, fi->virt_used, max_channels, + "%2.2s/%2.2s] Chn[%02X/%02X] %c%c%c", + rowstr, numrowstr, fi->virt_used, max_channels, ctl->explore ? 'Z' : ' ', ctl->loop ? 'L' : ' ', ctl->loop > 1 ? '*' : ' '); @@ -298,3 +312,23 @@ } } +void info_comment(struct xmp_module_info *mi) +{ + char *c = mi->comment; + + if (mi->comment == NULL) { + report("No comment.\n"); + return; + } + + while (*c != 0) { + report("> "); + do { + if (*c == 0) + break; + report("%c", *c); + } while (*c++ != '\n'); + } + report("\n\n"); +} + diff -Nru xmp-4.0.7/src/list.h xmp-4.0.8/src/list.h --- xmp-4.0.7/src/list.h 2014-02-21 23:49:00.571206431 +0000 +++ xmp-4.0.8/src/list.h 2014-04-11 13:40:15.351148084 +0000 @@ -133,7 +133,7 @@ * @member: the name of the list_struct within the struct. */ #define list_entry(ptr, type, member) \ - ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) + ((type *)((char *)(ptr)-(size_t)(&((type *)0)->member))) /** * list_for_each - iterate over a list diff -Nru xmp-4.0.7/src/main.c xmp-4.0.8/src/main.c --- xmp-4.0.7/src/main.c 2014-02-21 23:49:00.571206431 +0000 +++ xmp-4.0.8/src/main.c 2014-07-14 23:14:57.044270045 +0000 @@ -117,6 +117,9 @@ case 'S': info_samples(mi); break; + case 'c': + info_comment(mi); + break; case 'm': info_mod(mi); break; @@ -384,6 +387,8 @@ played = 1; + xmp_set_player(xc, XMP_PLAYER_AMP, opt.amplify); + if (opt.mix >= 0) { xmp_set_player(xc, XMP_PLAYER_MIX, opt.mix); } @@ -424,6 +429,13 @@ if (opt.verbose > 1) { info_instruments(&mi); } + + if (opt.show_comment) { + if (mi.comment != NULL) { + report("\n"); + info_comment(&mi); + } + } /* Play sequence */ diff -Nru xmp-4.0.7/src/options.c xmp-4.0.8/src/options.c --- xmp-4.0.7/src/options.c 2014-02-21 23:49:00.571206431 +0000 +++ xmp-4.0.8/src/options.c 2014-07-14 23:14:57.044270045 +0000 @@ -95,6 +95,7 @@ "\nEnvironment options:\n" " -I --instrument-path Set pathname to external samples\n" "\nInformation options:\n" +" -C --show-comment Display the module comment text, if any\n" " -h --help Display a summary of the command line options\n" " -L --list-formats List supported module formats\n" " --probe-only Probe audio device and exit\n" @@ -130,6 +131,7 @@ { "quiet", 0, 0, 'q' }, { "random", 0, 0, 'R' }, { "reverse", 0, 0, 'r' }, + { "show-comment", 0, 0, 'C' }, { "solo", 1, 0, 'S' }, { "start", 1, 0, 's' }, { "stdout", 0, 0, 'c' }, @@ -149,7 +151,7 @@ int optidx = 0; int o; -#define OPTIONS "a:b:cD:d:Ff:hI:i:LlM:mNo:P:qRrS:s:T:t:uVvZz:" +#define OPTIONS "a:b:CcD:d:Ff:hI:i:LlM:mNo:P:qRrS:s:T:t:uVvZz:" while ((o = getopt_long(argc, argv, OPTIONS, lopt, &optidx)) != -1) { switch (o) { case 'a': @@ -160,6 +162,9 @@ options->format |= XMP_FORMAT_8BIT; } break; + case 'C': + options->show_comment = 1; + break; case 'c': options->driver_id = "file"; options->out_file = "-"; diff -Nru xmp-4.0.7/src/read_config.c xmp-4.0.8/src/read_config.c --- xmp-4.0.7/src/read_config.c 2014-02-21 23:49:00.571206431 +0000 +++ xmp-4.0.8/src/read_config.c 2014-07-14 23:14:57.044270045 +0000 @@ -59,7 +59,8 @@ if ((rc = fopen(myrc, "r")) == NULL) return -1; #elif defined WIN32 - char *home = getenv("SystemRoot"); + const char *home = getenv("USERPROFILE"); + if (!home) home = "C:"; snprintf(myrc, PATH_MAX, "%s/xmp.conf", home); @@ -261,7 +262,8 @@ parse_modconf(o, "PROGDIR:modules.conf", md5); #elif defined WIN32 char myrc[PATH_MAX]; - char *home = getenv("SystemRoot"); + const char *home = getenv("USERPROFILE"); + if (!home) home = "C:"; snprintf(myrc, PATH_MAX, "%s/modules.conf", home); parse_modconf(o, myrc, md5); diff -Nru xmp-4.0.7/src/sound_win32.c xmp-4.0.8/src/sound_win32.c --- xmp-4.0.7/src/sound_win32.c 2014-02-21 23:49:00.573206446 +0000 +++ xmp-4.0.8/src/sound_win32.c 2014-03-24 19:22:26.037143500 +0000 @@ -14,6 +14,10 @@ #include #include "sound.h" +#if defined(_MSC_VER) && (_MSC_VER < 1300) +typedef DWORD DWORD_PTR; +#endif + #define MAXBUFFERS 32 /* max number of buffers */ #define BUFFERSIZE 120 /* buffer size in ms */ @@ -58,8 +62,8 @@ fprintf(stderr, "Error: %s", msg); } -static void CALLBACK wave_callback(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, - DWORD dwParam1, DWORD dwParam2) +static void CALLBACK wave_callback(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, + DWORD_PTR dwParam1, DWORD_PTR dwParam2) { if (uMsg == WOM_DONE) { freebuffer++; @@ -94,7 +98,7 @@ wfe.wBitsPerSample / 8; wfe.nBlockAlign = wfe.nChannels * wfe.wBitsPerSample / 8; - res = waveOutOpen(&hwaveout, WAVE_MAPPER, &wfe, (DWORD) wave_callback, + res = waveOutOpen(&hwaveout, WAVE_MAPPER, &wfe, (DWORD_PTR) wave_callback, 0, CALLBACK_FUNCTION); if (res != MMSYSERR_NOERROR) { diff -Nru xmp-4.0.7/src/xmp.1 xmp-4.0.8/src/xmp.1 --- xmp-4.0.7/src/xmp.1 2014-02-21 23:49:00.573206446 +0000 +++ xmp-4.0.8/src/xmp.1 2014-07-14 23:14:57.044270045 +0000 @@ -1,4 +1,4 @@ -.TH "XMP" "1" "Version 4\&.0\&.7" "Jan 2014" "Extended Module Player" +.TH "XMP" "1" "Version 4\&.0\&.8" "Jul 2014" "Extended Module Player" .PP .SH "NAME" xmp - Extended Module Player @@ -7,6 +7,7 @@ \fBxmp\fP [\fB\-a, \-\-amplify\fP \fIfactor\fP] [\fB\-b, \-\-bits\fP \fIbits\fP] +[\fB\-C, \-\-show\-comments\fP] [\fB\-c, \-\-stdout\fP] [\fB\-D\fP \fIdevice-specific parameters\fP] [\fB\-d, \-\-driver\fP \fIdriver\fP] @@ -55,6 +56,8 @@ .IP "\fB\-b, \-\-bits\fP \fIbits\fP" Set the software mixer resolution (8 or 16 bits)\&. If ommited, The audio device will be opened at the highest resolution available\&. +.IP "\fB\-C, \-\-show\-comments\fP" +Display module comment text, if any\&. .IP "\fB\-c, \-\-stdout\fP" Mix the module to stdout\&. .IP "\fB\-D\fP \fIdevice-specific parameter\fP" @@ -217,6 +220,8 @@ Display instrument list\&. .IP "\fBS\fP" Display sample list\&. +.IP "\fBc\fP" +Display comment\&, if any\&. .IP "\fB<\fP" Change to previous sequence (subsong)\&. .IP "\fB>\fP"