Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:51

0001 /*
0002  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
0003  *
0004  * Licensed under the Apache License 2.0 (the "License").  You may not use
0005  * this file except in compliance with the License.  You can obtain a copy
0006  * in the file LICENSE in the source distribution or at
0007  * https://www.openssl.org/source/license.html
0008  */
0009 
0010 #ifndef OPENSSL_STACK_H
0011 # define OPENSSL_STACK_H
0012 # pragma once
0013 
0014 # include <openssl/macros.h>
0015 # ifndef OPENSSL_NO_DEPRECATED_3_0
0016 #  define HEADER_STACK_H
0017 # endif
0018 
0019 #ifdef  __cplusplus
0020 extern "C" {
0021 #endif
0022 
0023 typedef struct stack_st OPENSSL_STACK; /* Use STACK_OF(...) instead */
0024 
0025 typedef int (*OPENSSL_sk_compfunc)(const void *, const void *);
0026 typedef void (*OPENSSL_sk_freefunc)(void *);
0027 typedef void *(*OPENSSL_sk_copyfunc)(const void *);
0028 
0029 int OPENSSL_sk_num(const OPENSSL_STACK *);
0030 void *OPENSSL_sk_value(const OPENSSL_STACK *, int);
0031 
0032 void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data);
0033 
0034 OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp);
0035 OPENSSL_STACK *OPENSSL_sk_new_null(void);
0036 OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n);
0037 int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n);
0038 void OPENSSL_sk_free(OPENSSL_STACK *);
0039 void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *));
0040 OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *,
0041                                     OPENSSL_sk_copyfunc c,
0042                                     OPENSSL_sk_freefunc f);
0043 int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where);
0044 void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc);
0045 void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p);
0046 int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data);
0047 int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data);
0048 int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum);
0049 int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data);
0050 int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data);
0051 void *OPENSSL_sk_shift(OPENSSL_STACK *st);
0052 void *OPENSSL_sk_pop(OPENSSL_STACK *st);
0053 void OPENSSL_sk_zero(OPENSSL_STACK *st);
0054 OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk,
0055                                             OPENSSL_sk_compfunc cmp);
0056 OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st);
0057 void OPENSSL_sk_sort(OPENSSL_STACK *st);
0058 int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st);
0059 
0060 # ifndef OPENSSL_NO_DEPRECATED_1_1_0
0061 #  define _STACK OPENSSL_STACK
0062 #  define sk_num OPENSSL_sk_num
0063 #  define sk_value OPENSSL_sk_value
0064 #  define sk_set OPENSSL_sk_set
0065 #  define sk_new OPENSSL_sk_new
0066 #  define sk_new_null OPENSSL_sk_new_null
0067 #  define sk_free OPENSSL_sk_free
0068 #  define sk_pop_free OPENSSL_sk_pop_free
0069 #  define sk_deep_copy OPENSSL_sk_deep_copy
0070 #  define sk_insert OPENSSL_sk_insert
0071 #  define sk_delete OPENSSL_sk_delete
0072 #  define sk_delete_ptr OPENSSL_sk_delete_ptr
0073 #  define sk_find OPENSSL_sk_find
0074 #  define sk_find_ex OPENSSL_sk_find_ex
0075 #  define sk_push OPENSSL_sk_push
0076 #  define sk_unshift OPENSSL_sk_unshift
0077 #  define sk_shift OPENSSL_sk_shift
0078 #  define sk_pop OPENSSL_sk_pop
0079 #  define sk_zero OPENSSL_sk_zero
0080 #  define sk_set_cmp_func OPENSSL_sk_set_cmp_func
0081 #  define sk_dup OPENSSL_sk_dup
0082 #  define sk_sort OPENSSL_sk_sort
0083 #  define sk_is_sorted OPENSSL_sk_is_sorted
0084 # endif
0085 
0086 #ifdef  __cplusplus
0087 }
0088 #endif
0089 
0090 #endif