X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Ftxt_db%2Ftxt_db.h;h=6abe435bc8faf7b88738bf52ebf32f2e1bd9c8e2;hp=4775d5ecce2349b9a020bc8f04580c25f39b9126;hb=dc100d87b5746d80e762ee6a414c75cb694ceb50;hpb=eda1f21f1af8b6f77327e7b37573af9c1ba73726 diff --git a/crypto/txt_db/txt_db.h b/crypto/txt_db/txt_db.h index 4775d5ecce..6abe435bc8 100644 --- a/crypto/txt_db/txt_db.h +++ b/crypto/txt_db/txt_db.h @@ -1,5 +1,5 @@ /* crypto/txt_db/txt_db.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -59,12 +59,12 @@ #ifndef HEADER_TXT_DB_H #define HEADER_TXT_DB_H -#ifdef __cplusplus -extern "C" { +#include +#ifndef OPENSSL_NO_BIO +#include #endif - -#include "stack.h" -#include "lhash.h" +#include +#include #define DB_ERROR_OK 0 #define DB_ERROR_MALLOC 1 @@ -73,42 +73,37 @@ extern "C" { #define DB_ERROR_NO_INDEX 4 #define DB_ERROR_INSERT_INDEX_CLASH 5 +#ifdef __cplusplus +extern "C" { +#endif + +typedef OPENSSL_STRING *OPENSSL_PSTRING; +DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) + typedef struct txt_db_st { int num_fields; - STACK /* char ** */ *data; - LHASH **index; - int (**qual)(); + STACK_OF(OPENSSL_PSTRING) *data; + LHASH_OF(OPENSSL_STRING) **index; + int (**qual)(OPENSSL_STRING *); long error; long arg1; long arg2; - char **arg_row; + OPENSSL_STRING *arg_row; } TXT_DB; -#ifndef NOPROTO -#ifdef HEADER_BIO_H +#ifndef OPENSSL_NO_BIO TXT_DB *TXT_DB_read(BIO *in, int num); long TXT_DB_write(BIO *out, TXT_DB *db); #else TXT_DB *TXT_DB_read(char *in, int num); long TXT_DB_write(char *out, TXT_DB *db); #endif -int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(), - unsigned long (*hash)(),int (*cmp)()); +int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(OPENSSL_STRING *), + LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); void TXT_DB_free(TXT_DB *db); -char **TXT_DB_get_by_index(TXT_DB *db, int idx, char **value); -int TXT_DB_insert(TXT_DB *db,char **value); - -#else - -TXT_DB *TXT_DB_read(); -long TXT_DB_write(); -int TXT_DB_create_index(); -void TXT_DB_free(); -char **TXT_DB_get_by_index(); -int TXT_DB_insert(); - -#endif +OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value); +int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); #ifdef __cplusplus }