From: Thadeu Lima de Souza Cascardo Date: Sun, 11 Dec 2016 13:41:21 +0000 (-0200) Subject: cmd: itera entre os comandos. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fdeclara.git;a=commitdiff_plain;h=fd5cc1bd7cf4b01b70796c3132af2ba823bb33f7 cmd: itera entre os comandos. --- diff --git a/lib/cmd.c b/lib/cmd.c index ad186a2..96697b2 100644 --- a/lib/cmd.c +++ b/lib/cmd.c @@ -55,3 +55,8 @@ int cmd_run(struct declaracao *dec, char *line) tokens_free(args); return r; } + +struct cmd * cmd_next(void **iter) +{ + return pmhash_next(cmds, iter); +} diff --git a/lib/cmd.h b/lib/cmd.h index 24ff5e0..f795d45 100644 --- a/lib/cmd.h +++ b/lib/cmd.h @@ -29,5 +29,6 @@ struct cmd { int cmd_init(void); int cmd_add(struct cmd *cmd); int cmd_run(struct declaracao *dec, char *line); +struct cmd * cmd_next(void **iter); #endif