| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/include/openssl/txt_db.h |
| Source code | Switch to Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | /* | - |
| 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. | - |
| 3 | * | - |
| 4 | * Licensed under the OpenSSL license (the "License"). You may not use | - |
| 5 | * this file except in compliance with the License. You can obtain a copy | - |
| 6 | * in the file LICENSE in the source distribution or at | - |
| 7 | * https://www.openssl.org/source/license.html | - |
| 8 | */ | - |
| 9 | - | |
| 10 | #ifndef HEADER_TXT_DB_H | - |
| 11 | # define HEADER_TXT_DB_H | - |
| 12 | - | |
| 13 | # include <openssl/opensslconf.h> | - |
| 14 | # include <openssl/bio.h> | - |
| 15 | # include <openssl/safestack.h> | - |
| 16 | # include <openssl/lhash.h> | - |
| 17 | - | |
| 18 | # define DB_ERROR_OK 0 | - |
| 19 | # define DB_ERROR_MALLOC 1 | - |
| 20 | # define DB_ERROR_INDEX_CLASH 2 | - |
| 21 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 | - |
| 22 | # define DB_ERROR_NO_INDEX 4 | - |
| 23 | # define DB_ERROR_INSERT_INDEX_CLASH 5 | - |
| 24 | # define DB_ERROR_WRONG_NUM_FIELDS 6 | - |
| 25 | - | |
| 26 | #ifdef __cplusplus | - |
| 27 | extern "C" { | - |
| 28 | #endif | - |
| 29 | - | |
| 30 | typedef OPENSSL_STRING *OPENSSL_PSTRING; | - |
| 31 | DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) executed 8 times by 1 test: end of blockExecuted by:
never executed: end of blocknever executed: end of blocknever executed: end of blockexecuted 27 times by 2 tests: return OPENSSL_sk_num((const OPENSSL_STACK *)sk);Executed by:
executed 30 times by 2 tests: return (OPENSSL_STRING *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);Executed by:
never executed: return (struct stack_st_OPENSSL_PSTRING *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);executed 8 times by 1 test: return (struct stack_st_OPENSSL_PSTRING *)OPENSSL_sk_new_null();Executed by:
never executed: return (struct stack_st_OPENSSL_PSTRING *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);never executed: return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n);never executed: return (OPENSSL_STRING *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);never executed: return (OPENSSL_STRING *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr);executed 9 times by 1 test: return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);Executed by:
never executed: return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr);never executed: return (OPENSSL_STRING *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);never executed: return (OPENSSL_STRING *)OPENSSL_sk_shift((OPENSSL_STACK *)sk);never executed: return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx);never executed: return (OPENSSL_STRING *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);never executed: return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);never executed: return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr);never executed: return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk);never executed: return (struct stack_st_OPENSSL_PSTRING *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);never executed: return (struct stack_st_OPENSSL_PSTRING *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, (OPENSSL_sk_copyfunc)copyfunc, (OPENSSL_sk_freefunc)freefunc);never executed: return (sk_OPENSSL_PSTRING_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); | 0-30 |
| 32 | - | |
| 33 | typedef struct txt_db_st { | - |
| 34 | int num_fields; | - |
| 35 | STACK_OF(OPENSSL_PSTRING) *data; | - |
| 36 | LHASH_OF(OPENSSL_STRING) **index; | - |
| 37 | int (**qual) (OPENSSL_STRING *); | - |
| 38 | long error; | - |
| 39 | long arg1; | - |
| 40 | long arg2; | - |
| 41 | OPENSSL_STRING *arg_row; | - |
| 42 | } TXT_DB; | - |
| 43 | - | |
| 44 | TXT_DB *TXT_DB_read(BIO *in, int num); | - |
| 45 | long TXT_DB_write(BIO *out, TXT_DB *db); | - |
| 46 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), | - |
| 47 | OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); | - |
| 48 | void TXT_DB_free(TXT_DB *db); | - |
| 49 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, | - |
| 50 | OPENSSL_STRING *value); | - |
| 51 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); | - |
| 52 | - | |
| 53 | #ifdef __cplusplus | - |
| 54 | } | - |
| 55 | #endif | - |
| 56 | - | |
| 57 | #endif | - |
| Source code | Switch to Preprocessed file |