aboutsummaryrefslogtreecommitdiff
path: root/src/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/error.c b/src/error.c
index 96ef3b1..e094a0a 100644
--- a/src/error.c
+++ b/src/error.c
@@ -6,22 +6,26 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/22 07:02:59 by cacharle #+# #+# */
-/* Updated: 2020/07/27 14:59:41 by charles ### ########.fr */
+/* Updated: 2020/08/02 09:23:37 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ssl.h"
-/* void error_command(char *command) */
-/* { */
-/* ft_putstr_fd("ft_ssl: Error: '", STDERR_FILENO); */
-/* ft_putstr_fd(command, STDERR_FILENO); */
-/* ft_putendl_fd("' is an invalid command.", STDERR_FILENO); */
-/* ft_putstr_fd("\nStandard commands:\n" */
-/* "\nMessage Digest commands:\n" */
-/* "md5\n" */
-/* "sha256\n" */
-/* "\nCipher commands:\n", */
-/* STDERR_FILENO */
-/* ); */
-/* } */
+// use in error message
+/* extern t_compression_entry g_compression_table[]; */
+
+void error_command(char *command)
+{
+ // argv[0]?
+ ft_putstr_fd("ft_ssl: Error: '", STDERR_FILENO);
+ ft_putstr_fd(command, STDERR_FILENO);
+ ft_putendl_fd("' is an invalid command.", STDERR_FILENO);
+ ft_putstr_fd("\nStandard commands:\n"
+ "\nMessage Digest commands:\n"
+ "md5\n"
+ "sha256\n"
+ "\nCipher commands:\n",
+ STDERR_FILENO
+ );
+}