Discussion:
[PATCH] modplug: read 'comment' tag
Johannes Weißl
2011-05-04 03:36:11 UTC
Permalink
---
modplug.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/modplug.c b/modplug.c
index 5f499b2..bcebdde 100644
--- a/modplug.c
+++ b/modplug.c
@@ -132,16 +132,19 @@ static int mod_seek(struct input_plugin_data *ip_data, double offset)
static int mod_read_comments(struct input_plugin_data *ip_data, struct keyval **comments)
{
struct mod_private *priv = ip_data->private;
- struct keyval *c;
- const char *name;
-
- c = xnew0(struct keyval, 2);
- name = ModPlug_GetName(priv->file);
- if (name != NULL && *name != 0) {
- c[0].key = xstrdup("title");
- c[0].val = xstrdup(name);
- }
- *comments = c;
+ GROWING_KEYVALS(c);
+ const char *val;
+
+ val = ModPlug_GetName(priv->file);
+ if (val && val[0])
+ comments_add_const(&c, "title", val);
+
+ val = ModPlug_GetMessage(priv->file);
+ if (val && val[0])
+ comments_add_const(&c, "comment", val);
+
+ keyvals_terminate(&c);
+ *comments = c.keyvals;
return 0;
}
--
1.7.5
Johannes Weißl
2011-05-04 05:24:36 UTC
Permalink
---
Doc/cmus.txt | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Doc/cmus.txt b/Doc/cmus.txt
index cb901a2..477d656 100644
--- a/Doc/cmus.txt
+++ b/Doc/cmus.txt
@@ -561,6 +561,9 @@ set <option>
Display option value. Vim compatible *set <option>?* is also
supported.

+shell <command>
+ Execute a command via /bin/sh.
+
showbind <context> <key>
Show key binding.
--
1.7.5
Gregory Petrosyan
2011-05-04 09:28:07 UTC
Permalink
Post by Johannes Weißl
+shell <command>
+ Execute a command via /bin/sh.
+
Merged to master and maint, thanks!

Gregory

Gregory Petrosyan
2011-05-04 09:27:20 UTC
Permalink
Post by Johannes Weißl
---
modplug.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
Merged to master, thanks!

Gregory
Loading...