]> git.tue.mpg.de Git - paraslash.git/commit
play: Link against lopsub and convert com_help() to lopsub.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Apr 2016 20:02:10 +0000 (22:02 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
commitdbb31185345c74b0fb1f475d17594e94ec30db5c
treef906552f9a263b7086ad7dc6e2940948f08524e0
parent65e9baadda287646ebc2e5593443d7996196c87a
play: Link against lopsub and convert com_help() to lopsub.

This introduces the play_cmd suite for the subcommands of para_play,
like play, pause, fg, bg, etc. The new suite contains only the
"help" subcommand so far. Other commands will be converted one by one
in subsequent patches.

We make use of the lopsub user_data feature to store a pointer to the
command handler in the lls_command structure generated by lopsubgen.
This pointer is initialized by the new EXPORT_PLAY_CMD_HANDLER macro
in play.c.

The suite has no supercommand, therefore lopsubgen adds a special
"unavailable" identifier to play.lsg.h. We must therefore provide a
dummy completer for the fake supercommand.

Until all subcommands are converted, the run_command() and com_help()
subcommand need to iterate over two command lists. Afterwards, this
compatibility code can be removed.
Makefile.real
error.h
m4/lls/play_cmd.suite.m4 [new file with mode: 0644]
play.c
play.cmd