Home | History | Annotate | Line # | Download | only in libopts
      1 /*	$NetBSD: option-value-type.h,v 1.5 2020/05/25 20:47:34 christos Exp $	*/
      2 
      3 /*   -*- buffer-read-only: t -*- vi: set ro:
      4  *
      5  *  DO NOT EDIT THIS FILE   (stdin.h)
      6  *
      7  *  It has been AutoGen-ed
      8  *  From the definitions    stdin
      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_OPTION_VALUE_TYPE_H_GUARD
     38 #define STR2ENUM_OPTION_VALUE_TYPE_H_GUARD 1
     39 #include <sys/types.h>
     40 #ifndef MISSING_INTTYPES_H
     41 # include <inttypes.h>
     42 #endif
     43 
     44 typedef enum {
     45     VTP_INVALID_CMD = 0,
     46     VTP_CMD_STRING         = 1,
     47     VTP_CMD_INTEGER        = 2,
     48     VTP_CMD_BOOL           = 3,
     49     VTP_CMD_BOOLEAN        = 4,
     50     VTP_CMD_KEYWORD        = 5,
     51     VTP_CMD_SET            = 6,
     52     VTP_CMD_SET_MEMBERSHIP = 7,
     53     VTP_CMD_NESTED         = 8,
     54     VTP_CMD_HIERARCHY      = 9,
     55     VTP_COUNT_CMD
     56 } option_value_type_enum_t;
     57 
     58 extern option_value_type_enum_t
     59 find_option_value_type_cmd(char const * str, size_t len);
     60 
     61 #endif /* STR2ENUM_OPTION_VALUE_TYPE_H_GUARD */
     62 /* end of option-value-type.h */
     63