Add command M to display song message

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 12 years ago
parent 099afe6f01
commit 150842c600
  1. 1
      Changelog
  2. 1
      src/commands.c
  3. 1
      src/common.h
  4. 20
      src/info.c
  5. 3
      src/main.c
  6. 4
      src/xmp.1

@ -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

@ -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;

@ -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 */

@ -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("<no message>\n\n");
}
}

@ -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;

@ -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"

Loading…
Cancel
Save