| 1 |
/* |
| 2 |
* Copyright (c) 2021-2025 Symas Corporation |
| 3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without |
| 5 |
* modification, are permitted provided that the following conditions are |
| 6 |
* met: |
| 7 |
* |
| 8 |
* * Redistributions of source code must retain the above copyright |
| 9 |
* notice, this list of conditions and the following disclaimer. |
| 10 |
* * Redistributions in binary form must reproduce the above |
| 11 |
* copyright notice, this list of conditions and the following disclaimer |
| 12 |
* in the documentation and/or other materials provided with the |
| 13 |
* distribution. |
| 14 |
* * Neither the name of the Symas Corporation nor the names of its |
| 15 |
* contributors may be used to endorse or promote products derived from |
| 16 |
* this software without specific prior written permission. |
| 17 |
* |
| 18 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 |
*/ |
| 30 |
#ifndef STRUCTS_H__ |
| 31 |
#define STRUCTS_H__ |
| 32 |
|
| 33 |
extern tree var_decl_node_p_of( cbl_field_t *var ); |
| 34 |
|
| 35 |
// Simple fetch |
| 36 |
extern tree member(tree var, const char *member_name); |
| 37 |
extern tree member(cbl_field_t *var, const char *member_name); |
| 38 |
extern tree member(cbl_refer_t refer, const char *member_name); |
| 39 |
|
| 40 |
extern tree member(cbl_file_t *var, const char *member_name); |
| 41 |
extern tree member2(tree var, const char *member_name, const char *submember); |
| 42 |
|
| 43 |
// assignment |
| 44 |
extern void member(tree var, const char *member_name, int value); |
| 45 |
extern void member(tree var, const char *member_name, tree value); |
| 46 |
extern void member(cbl_field_t *var, const char *member_name, tree value); |
| 47 |
|
| 48 |
extern void member2(tree var, const char *member_name, const char *submember, int value); |
| 49 |
extern void member2(tree var, const char *member_name, const char *submember, tree value); |
| 50 |
extern void member3(tree var, const char *mem, const char *sub1, const char *sub2, tree value); |
| 51 |
|
| 52 |
extern GTY(()) tree cblc_field_type_node; |
| 53 |
extern GTY(()) tree cblc_field_p_type_node; |
| 54 |
extern GTY(()) tree cblc_field_pp_type_node; |
| 55 |
extern GTY(()) tree cblc_file_type_node; |
| 56 |
extern GTY(()) tree cblc_file_p_type_node; |
| 57 |
extern GTY(()) tree cbl_enabled_exception_type_node; |
| 58 |
extern GTY(()) tree cblc_goto_type_node; |
| 59 |
|
| 60 |
extern void create_our_type_nodes(); |
| 61 |
|
| 62 |
#endif |