From 7ed8d43946952cc24bfb59899871935f779e5a76 Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Thu, 4 Apr 2024 10:58:42 +0200 Subject: [PATCH] Improve output text --- solution/jpeg_handling.c | 4 ++-- solution/main.c | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/solution/jpeg_handling.c b/solution/jpeg_handling.c index 6529938..589b0c8 100644 --- a/solution/jpeg_handling.c +++ b/solution/jpeg_handling.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/04 10:21:40 by ljiriste #+# #+# */ -/* Updated: 2024/04/04 10:36:49 by ljiriste ### ########.fr */ +/* Updated: 2024/04/04 10:52:14 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -74,7 +74,7 @@ void *mlx_jpeg_file_to_image(void *mlx_ptr, char *filename, source = fopen(filename, "rb"); if (!source) { - ft_dprintf(STDERR_FILENO, "Can't open %s\n", filename); + ft_dprintf(STDERR_FILENO, "Cannot open %s\n", filename); return (NULL); } cinfo.err = jpeg_std_error(&jerr); diff --git a/solution/main.c b/solution/main.c index d71e07d..6dceb66 100644 --- a/solution/main.c +++ b/solution/main.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/02 08:44:53 by ljiriste #+# #+# */ -/* Updated: 2024/04/04 10:47:06 by ljiriste ### ########.fr */ +/* Updated: 2024/04/04 10:58:21 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -49,7 +49,12 @@ void display(char **argv) int main(int argc, char **argv) { if (argc != 2) + { + ft_printf("Wrong invocation, it should be done as follows:\n" + "\t%s source_jpeg\n", + argv[0]); return (1); + } display(argv); return (0); } -- 2.30.2