Commit d868fb95 authored by Niels Möller's avatar Niels Möller
Browse files

New function werror_mpz.

Rev: src/werror.c:1.8
Rev: src/werror.h:1.7
parent f768a59a
...@@ -69,7 +69,7 @@ void verbose(char *format, ...) ...@@ -69,7 +69,7 @@ void verbose(char *format, ...)
} }
} }
void wash_char(UINT8 c) static void wash_char(UINT8 c)
{ {
switch(c) switch(c)
{ {
...@@ -93,7 +93,7 @@ void wash_char(UINT8 c) ...@@ -93,7 +93,7 @@ void wash_char(UINT8 c)
} }
/* Escape non-printable characters. */ /* Escape non-printable characters. */
void werror_washed(UINT32 length, UINT8 *msg) static void werror_washed(UINT32 length, UINT8 *msg)
{ {
int i; int i;
...@@ -166,3 +166,9 @@ void fatal(char *format, ...) ...@@ -166,3 +166,9 @@ void fatal(char *format, ...)
abort(); abort();
} }
void werror_mpz(mpz_t n)
{
mpz_out_str(stderr, 16, n);
putc('\n', stderr);
}
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "lsh_types.h" #include "lsh_types.h"
#include "bignum.h"
/* Global variables */ /* Global variables */
extern int debug_flag; extern int debug_flag;
extern int quiet_flag; extern int quiet_flag;
...@@ -46,4 +48,6 @@ void werror_safe_utf8(UINT32 length, UINT8 *msg); ...@@ -46,4 +48,6 @@ void werror_safe_utf8(UINT32 length, UINT8 *msg);
void fatal(char *format, ...) PRINTF_STYLE(1,2) NORETURN; void fatal(char *format, ...) PRINTF_STYLE(1,2) NORETURN;
void werror_mpz(mpz_t n);
#endif /* LSH_ERROR_H_INCLUDED */ #endif /* LSH_ERROR_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment