aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/err
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-04-17 21:25:43 +0000
committerBen Laurie <ben@openssl.org>1999-04-17 21:25:43 +0000
commite778802f53c8d47e96a6e4cbc776eb6e1d4c461a (patch)
tree719d4dd0fc69b355c6d8329af1f90b2c4f603548 /crypto/err
parentd77b3054cd87c2b13fa0169931f74b8e0dac5252 (diff)
downloadopenssl-e778802f53c8d47e96a6e4cbc776eb6e1d4c461a.tar.gz
Massive constification.
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c30
-rw-r--r--crypto/err/err.h24
-rw-r--r--crypto/err/err_prn.c4
3 files changed, 29 insertions, 29 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index ef47252736..46f69e187a 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -73,8 +73,8 @@ static unsigned long err_hash(ERR_STRING_DATA *a);
static int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b);
static unsigned long pid_hash(ERR_STATE *pid);
static int pid_cmp(ERR_STATE *a,ERR_STATE *pid);
-static unsigned long get_error_values(int inc,char **file,int *line,
- char **data,int *flags);
+static unsigned long get_error_values(int inc,const char **file,int *line,
+ const char **data,int *flags);
static void ERR_STATE_free(ERR_STATE *s);
#else
static unsigned long err_hash();
@@ -256,7 +256,7 @@ void ERR_free_strings()
void ERR_put_error(lib,func,reason,file,line)
int lib,func,reason;
-char *file;
+const char *file;
int line;
{
ERR_STATE *es;
@@ -296,14 +296,14 @@ unsigned long ERR_get_error()
{ return(get_error_values(1,NULL,NULL,NULL,NULL)); }
unsigned long ERR_get_error_line(file,line)
-char **file;
+const char **file;
int *line;
{ return(get_error_values(1,file,line,NULL,NULL)); }
unsigned long ERR_get_error_line_data(file,line,data,flags)
-char **file;
+const char **file;
int *line;
-char **data;
+const char **data;
int *flags;
{ return(get_error_values(1,file,line,data,flags)); }
@@ -311,22 +311,22 @@ unsigned long ERR_peek_error()
{ return(get_error_values(0,NULL,NULL,NULL,NULL)); }
unsigned long ERR_peek_error_line(file,line)
-char **file;
+const char **file;
int *line;
{ return(get_error_values(0,file,line,NULL,NULL)); }
unsigned long ERR_peek_error_line_data(file,line,data,flags)
-char **file;
+const char **file;
int *line;
-char **data;
+const char **data;
int *flags;
{ return(get_error_values(0,file,line,data,flags)); }
static unsigned long get_error_values(inc,file,line,data,flags)
int inc;
-char **file;
+const char **file;
int *line;
-char **data;
+const char **data;
int *flags;
{
int i=0;
@@ -381,7 +381,7 @@ unsigned long e;
char *ret;
{
static char buf[256];
- char *ls,*fs,*rs;
+ const char *ls,*fs,*rs;
unsigned long l,f,r;
int i;
@@ -422,7 +422,7 @@ LHASH *ERR_get_err_state_table()
return(thread_hash);
}
-char *ERR_lib_error_string(e)
+const char *ERR_lib_error_string(e)
unsigned long e;
{
ERR_STRING_DATA d,*p=NULL;
@@ -443,7 +443,7 @@ unsigned long e;
return((p == NULL)?NULL:p->string);
}
-char *ERR_func_error_string(e)
+const char *ERR_func_error_string(e)
unsigned long e;
{
ERR_STRING_DATA d,*p=NULL;
@@ -465,7 +465,7 @@ unsigned long e;
return((p == NULL)?NULL:p->string);
}
-char *ERR_reason_error_string(e)
+const char *ERR_reason_error_string(e)
unsigned long e;
{
ERR_STRING_DATA d,*p=NULL;
diff --git a/crypto/err/err.h b/crypto/err/err.h
index f06ed383e8..52202942da 100644
--- a/crypto/err/err.h
+++ b/crypto/err/err.h
@@ -87,7 +87,7 @@ typedef struct err_state_st
unsigned long err_buffer[ERR_NUM_ERRORS];
char *err_data[ERR_NUM_ERRORS];
int err_data_flags[ERR_NUM_ERRORS];
- char *err_file[ERR_NUM_ERRORS];
+ const char *err_file[ERR_NUM_ERRORS];
int err_line[ERR_NUM_ERRORS];
int top,bottom;
} ERR_STATE;
@@ -207,26 +207,26 @@ typedef struct err_state_st
typedef struct ERR_string_data_st
{
unsigned long error;
- char *string;
+ const char *string;
} ERR_STRING_DATA;
#ifndef NOPROTO
-void ERR_put_error(int lib, int func,int reason,char *file,int line);
+void ERR_put_error(int lib, int func,int reason,const char *file,int line);
void ERR_set_error_data(char *data,int flags);
unsigned long ERR_get_error(void );
-unsigned long ERR_get_error_line(char **file,int *line);
-unsigned long ERR_get_error_line_data(char **file,int *line,
- char **data, int *flags);
+unsigned long ERR_get_error_line(const char **file,int *line);
+unsigned long ERR_get_error_line_data(const char **file,int *line,
+ const char **data, int *flags);
unsigned long ERR_peek_error(void );
-unsigned long ERR_peek_error_line(char **file,int *line);
-unsigned long ERR_peek_error_line_data(char **file,int *line,
- char **data,int *flags);
+unsigned long ERR_peek_error_line(const char **file,int *line);
+unsigned long ERR_peek_error_line_data(const char **file,int *line,
+ const char **data,int *flags);
void ERR_clear_error(void );
char *ERR_error_string(unsigned long e,char *buf);
-char *ERR_lib_error_string(unsigned long e);
-char *ERR_func_error_string(unsigned long e);
-char *ERR_reason_error_string(unsigned long e);
+const char *ERR_lib_error_string(unsigned long e);
+const char *ERR_func_error_string(unsigned long e);
+const char *ERR_reason_error_string(unsigned long e);
#ifndef NO_FP_API
void ERR_print_errors_fp(FILE *fp);
#endif
diff --git a/crypto/err/err_prn.c b/crypto/err/err_prn.c
index ecd0e7c4fa..e52a062eb6 100644
--- a/crypto/err/err_prn.c
+++ b/crypto/err/err_prn.c
@@ -70,7 +70,7 @@ FILE *fp;
{
unsigned long l;
char buf[200];
- char *file,*data;
+ const char *file,*data;
int line,flags;
unsigned long es;
@@ -89,7 +89,7 @@ BIO *bp;
unsigned long l;
char buf[256];
char buf2[256];
- char *file,*data;
+ const char *file,*data;
int line,flags;
unsigned long es;