quelques petits essais
This commit is contained in:
12
srcs/main.c
12
srcs/main.c
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/10 08:50:20 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/10 15:13:26 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -70,3 +70,13 @@ int main(int argc, char *argv[], char *envp[])
|
||||
shell_loop(&c);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** idea about malloc protection :
|
||||
** have them(mallocand similar) done in a specific function that would check their return and accordingly exit the program or continue
|
||||
** -> so that it can be done in one line
|
||||
** void calloc_or_exit(int num, int size);
|
||||
** and possibly give it a pointer to a function that will clean before exit
|
||||
** void calloc_or_exit(int num, int size, void (*f)(void *ptr), void *ptr);
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user