Revision 508d9360 nest/cmds.c

View differences:

nest/cmds.c
13 13
#include "nest/cmds.h"
14 14
#include "lib/string.h"
15 15
#include "lib/resource.h"
16
#include "filter/filter.h"
16 17

  
17 18
extern int shutting_down;
18 19
extern int configuring;
......
90 91
  print_size("Total:", rmemsize(&root_pool));
91 92
  cli_msg(0, "");
92 93
}
94

  
95
extern const char *log_buffer_ptr;
96

  
97
void
98
cmd_eval(struct f_inst *expr)
99
{
100
  struct f_val v = f_eval(expr, this_cli->parser_pool);
101
  log_reset();
102

  
103
  if (v.type == T_RETURN)
104
    {
105
      cli_msg(8008, "runtime error");
106
      return;
107
    }
108

  
109
  val_print(v);
110
  cli_msg(23, "%s", log_buffer_ptr);
111
  log_reset();
112
}

Also available in: Unified diff