diff --git a/Changelog b/Changelog index 4616c47..b3f512e 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Stable versions --------------- 4.0.8 (): + - Add command M to display song message - Fix ignored amplify option (by Dennis Lindroos) - Fix Win64 compatibility (by Ozkan Sezer) - Fix screen corruption with large number of rows diff --git a/src/commands.c b/src/commands.c index cf3aa26..6708303 100644 --- a/src/commands.c +++ b/src/commands.c @@ -219,6 +219,7 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control case 'i': case 'I': case 'S': + case 'M': case 'm': ctl->display = cmd; break; diff --git a/src/common.h b/src/common.h index 79c8632..27a2304 100644 --- a/src/common.h +++ b/src/common.h @@ -79,6 +79,7 @@ void info_frame(struct xmp_module_info *, struct xmp_frame_info *, struct contro 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 --git a/src/info.c b/src/info.c index 7b3a6f2..909f704 100644 --- a/src/info.c +++ b/src/info.c @@ -30,6 +30,7 @@ void info_help(void) " Z Display current sequence\n" " z Toggle subsong explorer mode\n" " l Toggle loop mode\n" +" M Display message (if any)\n" " m Display module information\n" " i Display combined instrument/sample list\n" " I Display instrument list\n" @@ -311,3 +312,22 @@ void info_samples(struct xmp_module_info *mi) } } +void info_comment(struct xmp_module_info *mi) +{ + if (mi->comment != NULL) { + char *c = mi->comment; + + while (*c != 0) { + report("> "); + do { + if (*c == 0) + break; + report("%c", *c); + } while (*c++ != '\n'); + } + report("\n\n"); + } else { + report("\n\n"); + } +} + diff --git a/src/main.c b/src/main.c index 3e8a1ef..614509d 100644 --- a/src/main.c +++ b/src/main.c @@ -117,6 +117,9 @@ static void show_info(int what, struct xmp_module_info *mi) case 'S': info_samples(mi); break; + case 'M': + info_comment(mi); + break; case 'm': info_mod(mi); break; diff --git a/src/xmp.1 b/src/xmp.1 index 98b4ddb..42c17fe 100644 --- a/src/xmp.1 +++ b/src/xmp.1 @@ -1,4 +1,4 @@ -.TH "XMP" "1" "Version 4\&.0\&.7" "Jan 2014" "Extended Module Player" +.TH "XMP" "1" "Version 4\&.0\&.8" "Jun 2014" "Extended Module Player" .PP .SH "NAME" xmp - Extended Module Player @@ -209,6 +209,8 @@ Display current sequence\&. Toggle subsong explorer mode\&. .IP "\fBl\fP" Toggle module/sequence looping\&. +.IP "\fBM\fP" +Display message\&, if any\&. .IP "\fBm\fP" Display module information\&. .IP "\fBi\fP"