From 4b29b513ccfe4656d03e72dba7c17d5b6eb25ba4 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Thu, 5 Jun 2014 10:32:24 -0300 Subject: [PATCH] Change song comment command to c Signed-off-by: Claudio Matsuoka --- Changelog | 2 +- README | 1 + src/commands.c | 6 +++++- src/info.c | 4 +--- src/main.c | 2 +- src/xmp.1 | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Changelog b/Changelog index b3f512e..cbb420a 100644 --- a/Changelog +++ b/Changelog @@ -2,7 +2,7 @@ Stable versions --------------- 4.0.8 (): - - Add command M to display song message + - Add command c to display song comment - Fix ignored amplify option (by Dennis Lindroos) - Fix Win64 compatibility (by Ozkan Sezer) - Fix screen corruption with large number of rows diff --git a/README b/README index 98fe07a..c62243b 100644 --- a/README +++ b/README @@ -42,6 +42,7 @@ The following single key commands can be used during the playback: 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 --git a/src/commands.c b/src/commands.c index 6708303..511bf51 100644 --- a/src/commands.c +++ b/src/commands.c @@ -219,10 +219,14 @@ 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; + case 'c': + if (mi->comment != NULL) { + ctl->display = cmd; + } + break; case '>': change_sequence(handle, mi, ctl, 1); break; diff --git a/src/info.c b/src/info.c index 909f704..693b5ce 100644 --- a/src/info.c +++ b/src/info.c @@ -30,11 +30,11 @@ 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" " S Display sample list\n" +" c Display comment, if any\n" " < Play previous sequence\n" " > Play next sequence\n" ); @@ -326,8 +326,6 @@ void info_comment(struct xmp_module_info *mi) } while (*c++ != '\n'); } report("\n\n"); - } else { - report("\n\n"); } } diff --git a/src/main.c b/src/main.c index 614509d..7c08cf5 100644 --- a/src/main.c +++ b/src/main.c @@ -117,7 +117,7 @@ static void show_info(int what, struct xmp_module_info *mi) case 'S': info_samples(mi); break; - case 'M': + case 'c': info_comment(mi); break; case 'm': diff --git a/src/xmp.1 b/src/xmp.1 index 42c17fe..4a1192d 100644 --- a/src/xmp.1 +++ b/src/xmp.1 @@ -209,8 +209,6 @@ 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" @@ -219,6 +217,8 @@ Display combined instrument/sample list\&. 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"