]> git.tue.mpg.de Git - paraslash.git/commitdiff
play: Convert com_tasks() to lopsub.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 28 Mar 2016 03:51:23 +0000 (03:51 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
Nothing to see here: only the usual changes to the command handler,
and no changes to the help text.

m4/lls/play_cmd.suite.m4
play.c
play.cmd

index d0d82f1504ddb0c2378ec3567c65fce82206eaa7..1f54f2af0c3abb702d03bacb1175f12311b0077a 100644 (file)
@@ -77,3 +77,9 @@ caption = list of commands
                When paused, it is still possible to jump around in
                the file via the jmp and ff commands.
        [/description]
+
+[subcommand tasks]
+       purpose = print list of active tasks
+       [description]
+               Mainly useful for debugging.
+       [/description]
diff --git a/play.c b/play.c
index cab2504d263629f78c2703556d5f23331779cc5e..e608c6cb4364d9da3135fa08b0f6d95d39314cc3 100644 (file)
--- a/play.c
+++ b/play.c
@@ -819,15 +819,13 @@ static void list_file(struct play_task *pt, int num)
        btr_add_output(buf, sz, pt->btrn);
 }
 
-static int com_tasks(struct play_task *pt, int argc, __a_unused char **argv)
+static int com_tasks(struct play_task *pt,
+               __a_unused struct lls_parse_result *lpr)
 {
        static char state;
        char *buf;
        size_t sz;
 
-       if (argc != 1)
-               return -E_PLAY_SYNTAX;
-
        buf = get_task_list(&sched);
        btr_add_output(buf, strlen(buf), pt->btrn);
        state = get_playback_state(pt);
@@ -835,6 +833,7 @@ static int com_tasks(struct play_task *pt, int argc, __a_unused char **argv)
        btr_add_output(buf, sz, pt->btrn);
        return 0;
 }
+EXPORT_PLAY_CMD_HANDLER(tasks);
 
 static int com_ls(struct play_task *pt,
        __a_unused struct lls_parse_result *lpr)
index 2d1999aa35a940ed01d1e2a7c56e74275b96168b..c0e8d7f13637ea3d100efbbe07dfb4cb3366df38 100644 (file)
--- a/play.cmd
+++ b/play.cmd
@@ -2,11 +2,6 @@ BN: play
 SF: play.c
 SN: list of commands
 ---
-N: tasks
-D: Print list of active tasks.
-U: tasks
-H: Mainly useful for debugging.
----
 N: quit
 D: Exit para_play.
 U: quit