#include "navit_nls.h"
/*
-gui.fullscreen()
+gui.fullscreen=!gui.fullscreen
gui.menu()
gui.get_data()
zoom_in()
if ((op[0] >= 'a' && op[0] <= 'z') || op[0] == '_') {
res->attr.type=attr_none;
res->var=op;
- while ((op[0] >= 'a' && op[0] <= 'z') || op[0] == '_') {
- res->varlen++;
- op++;
+ for (;;) {
+ while ((op[0] >= 'a' && op[0] <= 'z') || op[0] == '_') {
+ res->varlen++;
+ op++;
+ }
+ if (res->varlen == 3 && !strncmp(res->var,"new",3) && op[0] == ' ') {
+ res->varlen++;
+ op++;
+ } else
+ break;
}
ctx->expr=op;
return;
res->attr.type=list[0]->type;
res->attr.u.str=g_strdup(gettext(list[0]->u.str));
+ } else if (!strncmp(function,"new ",4)) {
+ enum attr_type attr_type=attr_from_name(function+4);
+ if (attr_type != attr_none) {
+ struct object_func *func=object_func_lookup(attr_type);
+ if (func && func->new) {
+ res->attr.type=attr_type;
+ res->attr.u.data=func->new(NULL, list);
+ }
+ }
} else {
if (command_object_get_attr(ctx, &res->attr, attr_callback_list, &cbl)) {
int valid;
+ struct attr **out=NULL;
dbg(1,"function call %s from %s\n",function, attr_to_name(res->attr.type));
- callback_list_call_attr_4(cbl.u.callback_list, attr_command, function, list, NULL, &valid);
- }
- res->attr.type=attr_none;
+ callback_list_call_attr_4(cbl.u.callback_list, attr_command, function, list, &out, &valid);
+ if (out && out[0]) {
+ attr_dup_content(out[0], &res->attr);
+ attr_list_free(out);
+ } else
+ res->attr.type=attr_none;
+ } else
+ res->attr.type=attr_none;
}
res->var=NULL;
res->varlen=0;