Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / silcerrno.c
index 1739b2da64877e8107031b50769de2cd3054dd11..c8245c647e6b330fc127d219e21fcb41b8f153da 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2007 Pekka Riikonen
+  Copyright (C) 2007 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 /* Get last error */
 
@@ -44,8 +44,6 @@ void silc_set_errno(SilcResult error)
       return;
   }
 
-  SILC_LOG_DEBUG(("Error: %s (%d)", silc_errno_string(error), error));
-
   tls->error_reason[0] = '\0';
   tls->error = error;
 }
@@ -59,8 +57,6 @@ void silc_set_errno_nofail(SilcResult error)
   if (!tls)
     return;
 
-  SILC_LOG_DEBUG(("Error: %s (%d)", silc_errno_string(error), error));
-
   tls->error_reason[0] = '\0';
   tls->error = error;
 }
@@ -83,9 +79,6 @@ void silc_set_errno_reason(SilcResult error, const char *format, ...)
   silc_vsnprintf(tls->error_reason, sizeof(tls->error_reason), format, va);
   va_end(va);
 
-  SILC_LOG_DEBUG(("Error: %s (%d): %s", silc_errno_string(error), error,
-                 tls->error_reason));
-
   tls->error = error;
 }
 
@@ -103,9 +96,6 @@ void silc_set_errno_reason_nofail(SilcResult error, const char *format, ...)
   silc_vsnprintf(tls->error_reason, sizeof(tls->error_reason), format, va);
   va_end(va);
 
-  SILC_LOG_DEBUG(("Error: %s (%d): %s", silc_errno_string(error), error,
-                 tls->error_reason));
-
   tls->error = error;
 }
 
@@ -350,6 +340,20 @@ const char *silc_errno_strings[] =
   "Interrupted",
   "Not valid",
   "Limit reached",
+  "Syntax error",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
 
   "No such file or directory",
   "Already exists",
@@ -364,6 +368,23 @@ const char *silc_errno_strings[] =
   "I/O error",
   "Bad file descriptor",
   "End of file",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
 
   "Bad IP address",
   "Unknown IP address",
@@ -379,8 +400,30 @@ const char *silc_errno_strings[] =
   "Address already in use",
   "Network is down",
   "End of stream",
-
-  NULL
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+  "",
+
+  "Badly placed parenthesis",
+  "Bad hexadecimal number",
+  "Bad match register number",
+  "Badly placed special character",
+  "Regular expression too complex",
+  "Bad regular expression opcode",
+  "Bad repeat value",
 };
 
 /* Map error to string */