Improve output text
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 4 Apr 2024 08:58:42 +0000 (10:58 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 4 Apr 2024 08:58:42 +0000 (10:58 +0200)
solution/jpeg_handling.c
solution/main.c

index 6529938e5089857e6241c493b221d42844dd9719..589b0c8a8da0f38580e7f9c830cd0f92b3168ffc 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   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);
index d71e07db73a852b31304d8713fcafbe69a6f1442..6dceb66bc8280b13ddf0a78559fa622ad60dbac7 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   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);
 }