Commit 118cda6c authored by Niels Möller's avatar Niels Möller
Browse files

* src/command.h (command_2): Made invoke a method, not a function

pointer. Updated users.
(COMMAND_2_INVOKE): New macro.
(collect_info_3): Deleted class.
(collect_info_2): Deleted class.
(collect_info_1): Deleted class.
(STATIC_COLLECT_1): Deleted macro.
(STATIC_COLLECT_2): Deleted macro.
(STATIC_COLLECT_2_FINAL): Deleted macro.
(STATIC_COLLECT_3_FINAL): Deleted macro.

Rev: src/command.h:1.58
parent 15609758
...@@ -334,71 +334,6 @@ do_catch_report_collect(struct command_simple *s, ...@@ -334,71 +334,6 @@ do_catch_report_collect(struct command_simple *s,
#define STATIC_CATCH_REPORT(i) \ #define STATIC_CATCH_REPORT(i) \
{ STATIC_COMMAND_SIMPLE(do_catch_report_collect), i } { STATIC_COMMAND_SIMPLE(do_catch_report_collect), i }
/* Commands that need to collect some arguments before actually doing
* anything. */
/* The collect_info_n classes keeps track about what to do with the
* next argument. As long as we collect arguments without doing
* anything, the f field in collect_info_n will point to the
* constructor make_collect_state_n. */
/* GABA:
(class
(name collect_info_3)
(vars
(f method "struct lsh_object *"
"struct lsh_object *" "struct lsh_object *"
"struct lsh_object *")))
*/
/* GABA:
(class
(name collect_info_2)
(vars
(f method "struct lsh_object *"
"struct lsh_object *" "struct lsh_object *")
(next object collect_info_3)))
*/
/* GABA:
(class
(name collect_info_1)
(super command_simple)
(vars
(f method "struct lsh_object *"
"struct lsh_object *")
(next object collect_info_2)))
*/
struct lsh_object *
do_collect_1(struct command_simple *s, struct lsh_object *a);
struct lsh_object *
make_collect_state_1(struct collect_info_1 *info,
struct lsh_object *a);
struct lsh_object *
make_collect_state_2(struct collect_info_2 *info,
struct lsh_object *a,
struct lsh_object *b);
#define STATIC_COLLECT_1(next) \
{ { { STATIC_HEADER, do_call_simple_command }, do_collect_1}, \
make_collect_state_1, next }
#define STATIC_COLLECT_2(next) \
{ STATIC_HEADER, make_collect_state_2, next }
#define STATIC_COLLECT_2_FINAL(f) \
{ STATIC_HEADER, f, NULL }
#define STATIC_COLLECT_3_FINAL(f) \
{ STATIC_HEADER, f }
extern struct command command_die_on_null;
#if DEBUG_TRACE #if DEBUG_TRACE
struct command *make_trace(const char *name, struct command *real); struct command *make_trace(const char *name, struct command *real);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment