Exemple #1
0
t_shell		*init_struct(char **env)
{
	t_shell	*sh;

	if (!(sh = (t_shell *)malloc(sizeof(t_shell))))
		return (NULL);
	sh->env = init_env(env);
	deal_with_file(sh);
	sh->hist = sh->hist->next;
	sh->hist = create_hist();
	sh->return_val = 0;
	push_hist(&sh->head, sh->hist);
	return (sh);
}
Exemple #2
0
/* 执行两件文的操作 */
void WWidget::exec_remove_lines()
{
    bool exist = false;

    fir_file_str = fir_file_le.text();
    sec_file_str = sec_file_le.text();
    exist = judge_file(fir_file_str);
    if (!exist)
    {
        return;
    }
    exist = judge_file(sec_file_str);
    if (!exist)
    {
        return;
    }

    deal_with_file(fir_file_str, sec_file_str);
}