crypto/aes/asm/aesni-x86[_64].pl update, up to 14% improvement on
[openssl.git] / crypto / txt_db / txt_db.h
index 4775d5ecce2349b9a020bc8f04580c25f39b9126..6abe435bc8faf7b88738bf52ebf32f2e1bd9c8e2 100644 (file)
@@ -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
 #ifndef HEADER_TXT_DB_H
 #define HEADER_TXT_DB_H
 
-#ifdef  __cplusplus
-extern "C" {
+#include <openssl/opensslconf.h>
+#ifndef OPENSSL_NO_BIO
+#include <openssl/bio.h>
 #endif
-
-#include "stack.h"
-#include "lhash.h"
+#include <openssl/stack.h>
+#include <openssl/lhash.h>
 
 #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
 }