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