int ft_minishell(t_env *e) { int len; prompt(e); while ((len = read(e->fd, e->buf, READ_SIZE)) > 0) { //printf("%d %d %d %d %d %d %d %d\n", e->buf[0], e->buf[1], e->buf[2], e->buf[3], e->buf[4], e->buf[5], e->buf[6], e->buf[7]); if (KEYPAD(e) || K_SUPPR(e) || CTRL_C(e)) keypad_command(e); else if (COPY_KEY(e)) copy_command(e); else if (CTRL_D(e)) { if (*e->hist->cmd == '\0') break ; } else read_command(len, e->buf, e); if (!SHFT_KEY(e) && !CT_SH_KEY(e) && e->cpy.cpy != 0) rewrite_command(e); ft_memset(e->buf, 0, len); } return (len); }
static void mod_S_func(scene_state_t *ss, exec_state_t *NOTUSED(es), command_state_t *NOTUSED(cs), tele_command_t *sub_command) { if (ss->stack_op.top < STACK_OP_SIZE) { copy_command(&ss->stack_op.commands[ss->stack_op.top], sub_command); ss->stack_op.top++; if (ss->stack_op.top == 1) tele_s(1); } }
static job * new_job (command *ptr) { job *ret = xmalloc (sizeof (*ret)); if (ret != NULL) { ret->content = copy_command (ptr); ret->next = NULL; ret->prev = NULL; } return ret; }
int interpret_command(const char *command) { char buf[BUFSIZE]; strcpy(buf, command); char *s = strtok(buf, " "); char c = tolower(s[0]); switch (c) { case 'l': line_command(); break; case 'q': return COM_QUIT; case 'r': rec_command(); break; case'c': circle_command(); break; case 'u': undo_command(); break; /*case 'f': fill_command(); break;*/ case 'a': copy_command(); break; case 'p': paste_command(); break; default: break; } return COM_OTHER; }
void wgt_bird_hand_command::on_pushButton_copy_clicked() { copy_command(); }
void wgt_bird_hand_command::init_and_copy_slot() { init(); copy_command(); }