| 1 | /* File: u8_error_info_unit.h; Copyright and License: see below */ |
| 2 | |
| 3 | #ifndef U8_ERROR_INFO_UNIT_H |
| 4 | #define U8_ERROR_INFO_UNIT_H |
| 5 | |
| 6 | /* public file for the doxygen documentation: */ |
| 7 | /*! |
| 8 | * \file |
| 9 | * \brief Defines unit and thereby semantics of data in u8_error_info_t |
| 10 | */ |
| 11 | |
| 12 | /*! |
| 13 | * \brief enumeration of units |
| 14 | * |
| 15 | * This is a simple enumeration, no semantics on single bits in integers. |
| 16 | */ |
| 17 | enum u8_error_info_unit_enum { |
| 18 | U8_ERROR_INFO_UNIT_VOID = 0, /*!< there is no information in the data fields of u8_error_info_t */ |
| 19 | U8_ERROR_INFO_UNIT_LINE = 1, /*!< u8_error_info_t describes a position, unit is line number, first line is 1 */ |
| 20 | U8_ERROR_INFO_UNIT_NAME = 2, /*!< u8_error_info_t describes an object, unit is its name/key */ |
| 21 | U8_ERROR_INFO_UNIT_LINE_NAME = 3, /*!< u8_error_info_t describes a position and an object, units are line and name */ |
| 22 | U8_ERROR_INFO_UNIT_MAX = 4, /*!< maximum number of units, can be used to iterate over all units */ |
| 23 | }; |
| 24 | |
| 25 | typedef enum u8_error_info_unit_enum u8_error_info_unit_t; |
| 26 | |
| 27 | #endif /* U8_ERROR_INFO_UNIT_H */ |
| 28 | |
| 29 | |
| 30 | /* |
| 31 | Copyright 2022-2026 Andreas Warnke |
| 32 | |
| 33 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 34 | you may not use this file except in compliance with the License. |
| 35 | You may obtain a copy of the License at |
| 36 | |
| 37 | http://www.apache.org/licenses/LICENSE-2.0 |
| 38 | |
| 39 | Unless required by applicable law or agreed to in writing, software |
| 40 | distributed under the License is distributed on an "AS IS" BASIS, |
| 41 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 42 | See the License for the specific language governing permissions and |
| 43 | limitations under the License. |
| 44 | */ |