err.c revision 65c4736d9c0ebc6d9b1d991593b55566909da9cd
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
ef1963d83d69d03a006a882afcddbff48cd747d0Tinderbox User * All rights reserved.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This package is an SSL implementation written
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * by Eric Young (eay@cryptsoft.com).
ef1963d83d69d03a006a882afcddbff48cd747d0Tinderbox User * The implementation was written so as to conform with Netscapes SSL.
ef1963d83d69d03a006a882afcddbff48cd747d0Tinderbox User * This library is free for commercial and non-commercial use as long as
ef1963d83d69d03a006a882afcddbff48cd747d0Tinderbox User * the following conditions are aheared to. The following conditions
7865ea9545f28f12f046b32d24c989e8441b9812Mark Andrews * apply to all code found in this distribution, be it the RC4, RSA,
7865ea9545f28f12f046b32d24c989e8441b9812Mark Andrews * lhash, DES, etc., code; not just the SSL code. The SSL documentation
7865ea9545f28f12f046b32d24c989e8441b9812Mark Andrews * included with this distribution is covered by the same copyright terms
#include <stdio.h>
#include <stdarg.h>
#include "cryptlib.h"
#ifndef NO_ERR
{0,NULL},
#ifdef WINDOWS
{0,NULL},
{0,NULL},
#define err_clear_data(p,i) \
(p)->err_data_flags[i]=0;
if(s == NULL)
for (i=0; i<ERR_NUM_ERRORS; i++)
err_clear_data(s,i);
Free(s);
void ERR_load_ERR_strings(void)
if (init)
if (init == 0)
init=0;
#ifndef NO_ERR
str++;
void ERR_free_strings(void)
int line)
#ifdef _OSD_POSIX
char *end;
void ERR_clear_error(void)
for (i=0; i<ERR_NUM_ERRORS; i++)
unsigned long ERR_get_error(void)
int *line)
unsigned long ERR_peek_error(void)
int *line)
unsigned long ret;
if (inc)
return(ret);
l=ERR_GET_LIB(e);
f=ERR_GET_FUNC(e);
r=ERR_GET_REASON(e);
return(ret);
return(error_hash);
return(thread_hash);
const char *ERR_lib_error_string(unsigned long e)
l=ERR_GET_LIB(e);
const char *ERR_func_error_string(unsigned long e)
l=ERR_GET_LIB(e);
f=ERR_GET_FUNC(e);
const char *ERR_reason_error_string(unsigned long e)
l=ERR_GET_LIB(e);
r=ERR_GET_REASON(e);
if (p == NULL)
unsigned long ret,l;
l=a->error;
if (pid == 0)
unsigned long pid;
MemCheck_off();
MemCheck_on();
for (i=0; i<ERR_NUM_ERRORS; i++)
return(ret);
int ERR_get_next_error_library(void)
return(value++);
char *str,*p,*a;
for (i=0; i<num; i++)
if (a != NULL)
n+=strlen(a);
if (p == NULL)
str=p;