- switch (t.v_type) {
- case V_ERR:
- cmd = 0;
- break;
- case V_STR:
- cmd = t.v_str;
- break;
- case V_NUM:
- if ((cmd = str_itoa(t.v_num)) == 0) {
- p_memerror();
- return -1;
- }
- }
- if (token == T_ASSIGN) {
-#ifdef DEBUG
- error("command: assignment %s.", cmd == 0 ? "ERR" : cmd);
-#endif
- if (p_assign(cmd, &t, flag) < 0) {
- str_free(cmd);
- return -1;
- }
- } else {
-#ifdef DEBUG
- error("command: function %s.", cmd == 0 ? "ERR" : cmd);
-#endif
- if (p_function(cmd, &t, flag) < 0) {
+ if (token != T_ASSIGN && p_convstr(&t) < 0)
+ return -1;
+ cmd = t.v_type == V_STR ? t.v_str : 0;
+ if ((*(token == T_ASSIGN ? p_assign : p_function))(cmd, &t, flag) < 0) {
+ if (cmd)