diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-09-21 20:28:26 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-09-21 20:28:26 +0000 |
commit | 162637a8219dbe14a03c7b004beaf09a0d7ecbcb (patch) | |
tree | 92a2f67642230760fae97b349b2edbf6a9dc5a92 | |
parent | 38ece164e14cd867c6947d3df25d04b623997e83 (diff) | |
download | gnutls-162637a8219dbe14a03c7b004beaf09a0d7ecbcb.tar.gz |
Don't use error module until program_name problem is solved.
-rw-r--r-- | src/certtool-cfg.c | 5 | ||||
-rw-r--r-- | src/certtool.c | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c index 6fdbaa168d..0cd4589541 100644 --- a/src/certtool-cfg.c +++ b/src/certtool-cfg.c @@ -34,7 +34,6 @@ /* Gnulib portability files. */ #include <getpass.h> -#include "error.h" #include "readline.h" extern int batch; @@ -219,14 +218,14 @@ int read_int(const char *input_str) if (*endptr != '\0') { - error (0, 0, "Trailing garbage ignored: `%s'", endptr); + fprintf (stderr, "Trailing garbage ignored: `%s'\n", endptr); free (in); return 0; } if (l <= INT_MIN || l >= INT_MAX) { - error (0, 0, "Integer out of range: `%s'", in); + fprintf (stderr, "Integer out of range: `%s'\n", in); free (in); return 0; } diff --git a/src/certtool.c b/src/certtool.c index dea604deb6..4cb7f60a59 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -38,8 +38,6 @@ /* Gnulib portability files. */ #include <getline.h> -#include <error.h> -const char *program_name = "certtool"; static void print_crl_info(gnutls_x509_crl crl, FILE * out, int all); int generate_prime(int bits, int how); @@ -2862,16 +2860,20 @@ void smime_to_pkcs7(void) do { len = getline(&lineptr, &linesize, infile); if (len == -1) - error(EXIT_FAILURE, 0, - "Cannot find RFC 2822 header/body separator"); + { + fprintf (stderr, "Cannot find RFC 2822 header/body separator\n"); + exit (1); + } } while (strcmp(lineptr, "\r\n") != 0 && strcmp(lineptr, "\n") != 0); do { len = getline(&lineptr, &linesize, infile); if (len == -1) - error(EXIT_FAILURE, 0, - "Message has RFC 2822 header but no body"); + { + fprintf (stderr, "Message has RFC 2822 header but no body\n"); + exit (1); + } } while (strcmp(lineptr, "\r\n") == 0 && strcmp(lineptr, "\n") == 0); |