On 05/28/2013 09:27 AM, Kevin Wolf wrote: > No reason to treat it different from other commands. Move it to > qemu-io-cmds.c, adapt the coding style and register it like any other > command. > > Signed-off-by: Kevin Wolf <[email protected]> > --- > cmd.c | 79 > ---------------------------------------------------------- > cmd.h | 1 - > qemu-io-cmds.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++- > 3 files changed, 66 insertions(+), 81 deletions(-)
> -void
> -help_init(void)
> -{
> - help_cmd.name = _("help");
> - help_cmd.altname = _("?");
> - help_cmd.cfunc = help_f;
> - help_cmd.argmin = 0;
> - help_cmd.argmax = 1;
> - help_cmd.flags = CMD_FLAG_GLOBAL;
> - help_cmd.args = _("[command]");
> - help_cmd.oneline = _("help for one or all commands");
The old code marked strings for translation with _(), ...
> +static const cmdinfo_t help_cmd = {
> + .name = "help",
> + .altname = "?",
> + .cfunc = help_f,
> + .argmin = 0,
> + .argmax = 1,
> + .flags = CMD_FLAG_GLOBAL,
> + .args = "[command]",
> + .oneline = "help for one or all commands",
...whereas the new code uses fixed literals. Then again, po/messages.po
doesn't contain any mention of cmd.c, so it's not like we were actually
translating the strings, even if they were marked for translation. So
no real change.
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
