aboutsummaryrefslogtreecommitdiff
path: root/c10/ex01/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'c10/ex01/helper.c')
-rw-r--r--c10/ex01/helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/c10/ex01/helper.c b/c10/ex01/helper.c
index 8a1c13e..a6a9acd 100644
--- a/c10/ex01/helper.c
+++ b/c10/ex01/helper.c
@@ -6,13 +6,14 @@
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/16 10:14:16 by cacharle #+# #+# */
-/* Updated: 2019/07/16 10:26:44 by cacharle ### ########.fr */
+/* Updated: 2019/07/16 13:42:08 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <libgen.h>
#include "include.h"
void ft_putstr_err(char *str)
@@ -25,7 +26,7 @@ void handle_error(char *program_name, char *arg)
{
char *error_msg;
- ft_putstr_err(program_name);
+ ft_putstr_err(basename(program_name));
ft_putstr_err(": ");
ft_putstr_err(arg);
ft_putstr_err(": ");