1 /* $NetBSD: save-flags.h,v 1.2 2024/08/18 20:47:25 christos Exp $ */ 2 3 /* -*- buffer-read-only: t -*- vi: set ro: 4 * 5 * DO NOT EDIT THIS FILE (save-flags.h) 6 * 7 * It has been AutoGen-ed 8 * From the definitions /tmp/.ag-ufBbQe/save-flags.def 9 * and the template file str2enum 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. Neither the name ``Bruce Korb'' nor the name of any other 20 * contributor may be used to endorse or promote products derived 21 * from this software without specific prior written permission. 22 * 23 * str2enum IS PROVIDED BY Bruce Korb ``AS IS'' AND ANY EXPRESS 24 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL Bruce Korb OR ANY OTHER CONTRIBUTORS 27 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 * 35 * Command/Keyword Dispatcher 36 */ 37 #ifndef STR2ENUM_SAVE_FLAGS_H_GUARD 38 #define STR2ENUM_SAVE_FLAGS_H_GUARD 1 39 #include <sys/types.h> 40 #include <inttypes.h> 41 42 /** integral type for holding save_flags masks */ 43 typedef uint32_t save_flags_mask_t; 44 45 /** bits defined for save_flags_mask_t */ 46 /** include default values in commentary */ 47 #define SVFL_DEFAULT 0x0001U 48 /** include usage text in commentary */ 49 #define SVFL_USAGE 0x0002U 50 /** replace or append state */ 51 #define SVFL_UPDATE 0x0004U 52 53 /** bits in USAGE_DEFAULT mask: 54 * usage default */ 55 #define SVFL_USAGE_DEFAULT_MASK 0x0003U 56 57 /** all bits in save_flags_mask_t masks */ 58 #define SVFL_MASK_ALL 0x0007U 59 60 /** no bits in save_flags_mask_t */ 61 #define SVFL_NONE 0x0000U 62 63 /** buffer size needed to hold all bit names for save_flags_mask_t masks */ 64 #define MAX_SAVE_FLAGS_NAME_SIZE 21 65 66 extern save_flags_mask_t 67 save_flags_str2mask(char const * str, save_flags_mask_t old); 68 69 #endif /* STR2ENUM_SAVE_FLAGS_H_GUARD */ 70 /* end of save-flags.h */ 71