gysiang / minishell

0 stars 1 forks source link

External Function #227

Closed gysiang closed 4 months ago

gysiang commented 4 months ago
if (ft_strcmp(s, "history -c") == 0)
{
    clear_history();
    return (1);
}

@axellee1994 there is still a forbidden history function in history.c here. The rest looks okay

             U access@GLIBC_2.2.5
             U chdir@GLIBC_2.2.5
             U clear_history
             U close@GLIBC_2.2.5
             U __ctype_b_loc@GLIBC_2.3
             w __cxa_finalize@GLIBC_2.2.5
             U dup2@GLIBC_2.2.5
             U dup@GLIBC_2.2.5
             U __errno_location@GLIBC_2.2.5
             U execve@GLIBC_2.2.5
             U exit@GLIBC_2.2.5
             U fork@GLIBC_2.2.5
             U free@GLIBC_2.2.5
             U getcwd@GLIBC_2.2.5
             U getenv@GLIBC_2.2.5
             w __gmon_start__
             w _ITM_deregisterTMCloneTable
             w _ITM_registerTMCloneTable
             U kill@GLIBC_2.2.5
             U __libc_start_main@GLIBC_2.34
             U malloc@GLIBC_2.2.5
             U memset@GLIBC_2.2.5
             U open@GLIBC_2.2.5
             U perror@GLIBC_2.2.5
             U pipe@GLIBC_2.2.5
             U __printf_chk@GLIBC_2.3.4
             U putchar@GLIBC_2.2.5
             U puts@GLIBC_2.2.5
             U read@GLIBC_2.2.5
             U readline
             U realloc@GLIBC_2.2.5
             U rl_clear_history
             U rl_on_new_line
             U rl_redisplay
             U rl_replace_line
             U signal@GLIBC_2.2.5
             U __stack_chk_fail@GLIBC_2.4
             U stat@GLIBC_2.33
             U stpcpy@GLIBC_2.2.5
             U strdup@GLIBC_2.2.5
             U strerror@GLIBC_2.2.5
             U strlen@GLIBC_2.2.5
             U waitpid@GLIBC_2.2.5
             U write@GLIBC_2.2.5
axellee1994 commented 4 months ago

@gysiang if you can just write ft_clear_history and test if it can clear the history.

If can't, just let me know and I'll fix later