… | |
… | |
142 | if (char *colon = strchr (str, ':')) |
142 | if (char *colon = strchr (str, ':')) |
143 | { |
143 | { |
144 | if (strncmp (str, "command:", 8) == 0) |
144 | if (strncmp (str, "command:", 8) == 0) |
145 | term->cmdbuf_append (str + 8, strlen (str) - 8); |
145 | term->cmdbuf_append (str + 8, strlen (str) - 8); |
146 | else if (strncmp (str, "string:", 7) == 0) |
146 | else if (strncmp (str, "string:", 7) == 0) |
147 | term->tt_write (colon + 1, strlen (colon + 1)); |
147 | term->tt_write_user_input (colon + 1, strlen (colon + 1)); |
148 | else if (strncmp (str, "perl:", 8) == 0) |
148 | else if (strncmp (str, "perl:", 8) == 0) |
149 | HOOK_INVOKE ((term, HOOK_USER_COMMAND, DT_STR, colon + 1, DT_END)); |
149 | HOOK_INVOKE ((term, HOOK_USER_COMMAND, DT_STR, colon + 1, DT_END)); |
150 | else |
150 | else |
151 | HOOK_INVOKE ((term, HOOK_KEYBOARD_DISPATCH, DT_STR_LEN, str, colon - str, DT_STR, colon + 1, DT_END)); |
151 | HOOK_INVOKE ((term, HOOK_KEYBOARD_DISPATCH, DT_STR_LEN, str, colon - str, DT_STR, colon + 1, DT_END)); |
152 | } |
152 | } |
153 | else |
153 | else |
154 | term->tt_write (str, strlen (str)); |
154 | term->tt_write_user_input (str, strlen (str)); |
155 | |
155 | |
156 | free (str); |
156 | free (str); |
157 | |
157 | |
158 | return true; |
158 | return true; |
159 | } |
159 | } |