The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
calc.h
Go to the documentation of this file.
1 
2 #pragma once
3 /*
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 /**
20  * $Id: 5e2ebb782a62d217d5e7f9d5b7f5fa70d57a7944 $
21  *
22  * @file lib/util/edit.h
23  * @brief Structures and prototypes for editing lists.
24  *
25  * @copyright 2021 Network RADIUS SAS (legal@networkradius.com)
26  */
27 RCSIDH(calc_h, "$Id: 5e2ebb782a62d217d5e7f9d5b7f5fa70d57a7944 $")
28 
29 #include <freeradius-devel/util/value.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint, fr_value_box_t const *a, fr_token_t op, fr_value_box_t const *b) CC_HINT(nonnull(2,4,6));
36 
37 int fr_value_calc_assignment_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t op, fr_value_box_t const *src) CC_HINT(nonnull(2,4));
38 
39 int fr_value_calc_unary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t op, fr_value_box_t const *src) CC_HINT(nonnull(1));
40 
41 int fr_value_calc_nary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t type, fr_token_t op, fr_value_box_t const *group) CC_HINT(nonnull(2,5));
42 
43 int fr_value_calc_list_op(TALLOC_CTX *ctx, fr_value_box_t *box, fr_token_t op, fr_value_box_list_t const *list);
44 
45 int fr_value_calc_list_cmp(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_list_t const *list1, fr_token_t op, fr_value_box_list_t const *list2) CC_HINT(nonnull);
46 
47 #ifdef __cplusplus
48 }
49 #endif
#define RCSIDH(h, id)
Definition: build.h:482
int fr_value_calc_list_cmp(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_list_t const *list1, fr_token_t op, fr_value_box_list_t const *list2)
Definition: calc.c:2688
int fr_value_calc_nary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t type, fr_token_t op, fr_value_box_t const *group))
Calculate DST = OP { A, B, C, ...
Definition: calc.c:2239
int fr_value_calc_list_op(TALLOC_CTX *ctx, fr_value_box_t *box, fr_token_t op, fr_value_box_list_t const *list)
Apply a set of operations in order to create an output box.
Definition: calc.c:2588
int fr_value_calc_assignment_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t op, fr_value_box_t const *src))
Calculate DST OP SRC.
Definition: calc.c:2399
int fr_value_calc_unary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t op, fr_value_box_t const *src))
Calculate unary operations.
Definition: calc.c:2460
int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint, fr_value_box_t const *a, fr_token_t op, fr_value_box_t const *b))
Calculate DST = A OP B.
Definition: calc.c:1894
fr_type_t
Definition: merged_model.c:80
fr_aka_sim_id_type_t type
enum fr_token fr_token_t
int nonnull(2, 5))